From d6af5a23eabbc4bbd357638637758210f5dde41b Mon Sep 17 00:00:00 2001 From: benjobs Date: Sat, 8 Jun 2024 14:18:23 +0800 Subject: [PATCH] [Improve] code style improvement (#381) Co-authored-by: benjobs --- docs/components/TableData.less | 5 ++--- src/css/custom/index.less | 31 +++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/docs/components/TableData.less b/docs/components/TableData.less index e6b7565ce..99b036c5a 100644 --- a/docs/components/TableData.less +++ b/docs/components/TableData.less @@ -1,8 +1,7 @@ .table-data { font-size: 14px; - th, td { - padding: 0.6rem + padding: 0.6rem; } .icon-check { @@ -69,4 +68,4 @@ background: rgba(0, 0, 0, .5); color: #fff; font-size: 14px; -} \ No newline at end of file +} diff --git a/src/css/custom/index.less b/src/css/custom/index.less index fe9bfe08b..4f64b4cea 100644 --- a/src/css/custom/index.less +++ b/src/css/custom/index.less @@ -160,16 +160,21 @@ article[itemprop="blogPost"] { } code { - font-weight: 600; - padding: 1px 2px; - font-size: 12px; - background-color: var(--ifm-code-background) !important; - + background-color: #edf2fa; + border: none; + word-break: normal; + padding: 3px 4px; + border-radius: 4px; span { font-style: normal !important; } } +[data-theme='dark'] code { + background-color: var(--ifm-code-background) !important; + font-weight: bolder; +} + .markdown h1:first-child { font-size: 32px !important; } @@ -201,9 +206,7 @@ code { } .table-of-contents__link:hover, -.table-of-contents__link:hover code, -.table-of-contents__link--active, -.table-of-contents__link--active code { +.table-of-contents__link--active { font-weight: 600; color: var(--click-color-text); } @@ -930,7 +933,7 @@ button.DocSearch { fill: white; } -// -- custom -- +// -- custom -- /** global */ @@ -1155,4 +1158,12 @@ img { max-width: 1920px !important; min-width: 1200px !important; } -} \ No newline at end of file +} + +.table-data { + thead tr td { + background-color: var(--ifm-table-head-background); + } + border: 1px solid var(--ifm-table-head-background); +} +