From cbd294bc809cc8c503d09f12f4d337f2797067f9 Mon Sep 17 00:00:00 2001 From: yuyinws Date: Tue, 3 Jun 2025 10:10:46 +0800 Subject: [PATCH 1/3] fix: note style --- packages/client/styles/code.css | 6 ++++++ packages/client/uno.config.ts | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/client/styles/code.css b/packages/client/styles/code.css index 3d844d96b4..7bab2213d7 100644 --- a/packages/client/styles/code.css +++ b/packages/client/styles/code.css @@ -123,6 +123,7 @@ html:not(.dark) .shiki span { } /* Inline Code */ +.slidev-note :not(pre) > code, .slidev-layout :not(pre) > code { font-size: 0.9em; background: var(--slidev-code-background); @@ -130,6 +131,11 @@ html:not(.dark) .shiki span { --uno: font-light py-0.5 px-1.5; } +.slidev-note :not(pre) > code:after, +.slidev-note :not(pre) > code:before { + content: ''; +} + .slidev-layout :not(pre) > code:before { margin-right: -0.08em; } diff --git a/packages/client/uno.config.ts b/packages/client/uno.config.ts index c29eb7e199..5fbc36f322 100644 --- a/packages/client/uno.config.ts +++ b/packages/client/uno.config.ts @@ -53,7 +53,14 @@ export default defineConfig({ presets: [ presetWind3(), presetAttributify(), - presetTypography(), + presetTypography({ + cssExtend: { + ul: { + 'margin': '0', + 'line-height': 1.75, + }, + }, + }), /* Preset Icons is added in ../node/setups/unocss.ts */ ], transformers: [ From 496af4a19cdbc397963ce21619765c83964c5cb2 Mon Sep 17 00:00:00 2001 From: yuyinws Date: Thu, 5 Jun 2025 16:41:28 +0800 Subject: [PATCH 2/3] fix: overwrite ul style on slidev-note --- packages/client/styles/code.css | 4 ++++ packages/client/uno.config.ts | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/client/styles/code.css b/packages/client/styles/code.css index 7bab2213d7..67ce8308e5 100644 --- a/packages/client/styles/code.css +++ b/packages/client/styles/code.css @@ -136,6 +136,10 @@ html:not(.dark) .shiki span { content: ''; } +.slidev-note ul { + margin: 0; +} + .slidev-layout :not(pre) > code:before { margin-right: -0.08em; } diff --git a/packages/client/uno.config.ts b/packages/client/uno.config.ts index 5fbc36f322..c29eb7e199 100644 --- a/packages/client/uno.config.ts +++ b/packages/client/uno.config.ts @@ -53,14 +53,7 @@ export default defineConfig({ presets: [ presetWind3(), presetAttributify(), - presetTypography({ - cssExtend: { - ul: { - 'margin': '0', - 'line-height': 1.75, - }, - }, - }), + presetTypography(), /* Preset Icons is added in ../node/setups/unocss.ts */ ], transformers: [ From 2c3e844332b8fcf30bbcdac8d8ee38d3829eedc9 Mon Sep 17 00:00:00 2001 From: yuyinws Date: Thu, 5 Jun 2025 16:48:46 +0800 Subject: [PATCH 3/3] chore: change style position --- packages/client/styles/code.css | 4 ---- packages/client/styles/index.css | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/client/styles/code.css b/packages/client/styles/code.css index 67ce8308e5..7bab2213d7 100644 --- a/packages/client/styles/code.css +++ b/packages/client/styles/code.css @@ -136,10 +136,6 @@ html:not(.dark) .shiki span { content: ''; } -.slidev-note ul { - margin: 0; -} - .slidev-layout :not(pre) > code:before { margin-right: -0.08em; } diff --git a/packages/client/styles/index.css b/packages/client/styles/index.css index 54b06c148f..ba14566ad6 100644 --- a/packages/client/styles/index.css +++ b/packages/client/styles/index.css @@ -144,3 +144,7 @@ html { transform: scale(calc(1 * var(--slidev-slide-scale))); transform-origin: 30px top; } + +.slidev-note ul { + margin: 0; +}