From 441a26504e2ac45d382d9b6f11884a5147cbb1f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=97=8D+85CD?= <50108258+kwaa@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:37:26 +0800 Subject: [PATCH] fix: style --- src/styles.css | 18 +++--------------- uno.config.ts | 3 ++- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/styles.css b/src/styles.css index 2958366..5e2775c 100644 --- a/src/styles.css +++ b/src/styles.css @@ -57,23 +57,11 @@ body { } figure[data-rehype-pretty-code-figure] { - &>figcaption[data-rehype-pretty-code-title] { + &>figcaption { background-color: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface-variant); - padding: 0.25rem 0.5rem 0.5rem 0.5rem; - margin-bottom: -1.25rem; - margin-left: -2rem; - margin-right: -2rem; - } - - &>figcaption[data-rehype-pretty-code-caption] { - background-color: var(--md-sys-color-surface-container-high); - color: var(--md-sys-color-on-surface-variant); - padding: 0.5rem 0.5rem 0.25rem 0.5rem; - margin-top: -1.25rem; - margin-bottom: 1.25rem; - margin-left: -2rem; - margin-right: -2rem; + margin: 0 -2rem; + padding: 0.25rem 2rem; } } diff --git a/uno.config.ts b/uno.config.ts index f2b6368..fb4d423 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -42,9 +42,10 @@ export default { 'color': 'var(--md-sys-color-on-primary)', }, 'pre': { + 'border-radius': 0, 'padding': '0.75rem 0', 'position': 'relative', - 'margin': '-2rem', + 'margin': '0 -2rem', 'overflow-y': 'hidden', }, 'pre,code': {