From 312f01c16c9c625f3c237b1d82f3b49179c23268 Mon Sep 17 00:00:00 2001 From: yuyinws Date: Wed, 4 Dec 2024 13:54:57 +0800 Subject: [PATCH] fix: title bar style --- src/codegen.ts | 4 ++++ test/__snapshots__/codegen.test.ts.snap | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/codegen.ts b/src/codegen.ts index 9e2e67b..aa4b785 100644 --- a/src/codegen.ts +++ b/src/codegen.ts @@ -30,6 +30,10 @@ export async function generateCSS(labels: Set, options: Options) { box-shadow: inset 0 -1px var(--vp-code-tab-divider); } +.custom-block .vp-code-block-title-bar { + margin: 16px 0 0 0; +} + @media (min-width: 640px) { .vp-code-block-title-bar { margin: 16px 0 0 0; diff --git a/test/__snapshots__/codegen.test.ts.snap b/test/__snapshots__/codegen.test.ts.snap index aac3797..9fedbe3 100644 --- a/test/__snapshots__/codegen.test.ts.snap +++ b/test/__snapshots__/codegen.test.ts.snap @@ -28,6 +28,10 @@ exports[`generate css > builtin icon 1`] = ` box-shadow: inset 0 -1px var(--vp-code-tab-divider); } +.custom-block .vp-code-block-title-bar { + margin: 16px 0 0 0; +} + @media (min-width: 640px) { .vp-code-block-title-bar { margin: 16px 0 0 0; @@ -85,6 +89,10 @@ exports[`generate css > custom icon 1`] = ` box-shadow: inset 0 -1px var(--vp-code-tab-divider); } +.custom-block .vp-code-block-title-bar { + margin: 16px 0 0 0; +} + @media (min-width: 640px) { .vp-code-block-title-bar { margin: 16px 0 0 0; @@ -146,6 +154,10 @@ exports[`generate css > duplicate label 1`] = ` box-shadow: inset 0 -1px var(--vp-code-tab-divider); } +.custom-block .vp-code-block-title-bar { + margin: 16px 0 0 0; +} + @media (min-width: 640px) { .vp-code-block-title-bar { margin: 16px 0 0 0;