From 549db33d49482c4c3f2442dd4e8632705215f191 Mon Sep 17 00:00:00 2001 From: sendevia Date: Sun, 9 Nov 2025 23:17:37 +0800 Subject: [PATCH] fix: improve button and article layout styling --- .vitepress/theme/components/Button.vue | 1 + .vitepress/theme/layouts/Article.vue | 6 ++++-- .vitepress/theme/styles/_components/table.scss | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.vitepress/theme/components/Button.vue b/.vitepress/theme/components/Button.vue index cc608c5..4012c46 100644 --- a/.vitepress/theme/components/Button.vue +++ b/.vitepress/theme/components/Button.vue @@ -43,6 +43,7 @@ const props = withDefaults(defineProps(), { position: relative; text-decoration: none !important; + vertical-align: middle; border-color: transparent; border-style: solid; diff --git a/.vitepress/theme/layouts/Article.vue b/.vitepress/theme/layouts/Article.vue index b7b1d80..8d9baa2 100644 --- a/.vitepress/theme/layouts/Article.vue +++ b/.vitepress/theme/layouts/Article.vue @@ -602,7 +602,7 @@ section { display: inline-block; - width: 100%; + width: max-content; padding-block: 24px; @@ -680,7 +680,9 @@ section { } img { - width: 50%; + width: calc(50% - 6px); + + margin-inline: 3px; border-radius: var(--md-sys-shape-corner-small); } diff --git a/.vitepress/theme/styles/_components/table.scss b/.vitepress/theme/styles/_components/table.scss index 8cca364..b30cd20 100644 --- a/.vitepress/theme/styles/_components/table.scss +++ b/.vitepress/theme/styles/_components/table.scss @@ -67,5 +67,9 @@ table { :is(td, th) { border: 1px solid var(--md-sys-color-outline); + + code { + padding-block: 0px !important; + } } }