From f01cfe98ae11f1eb2b5a3fc75ef50017e6703ad1 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sat, 30 Dec 2023 08:16:58 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/2.preview/主题效果预览.md | 17 +++++++++++++ .../client/components/Nav/NavBarSearch.vue | 24 +++++++++++-------- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/docs/2.preview/主题效果预览.md b/docs/2.preview/主题效果预览.md index 3755c67c..1af82946 100644 --- a/docs/2.preview/主题效果预览.md +++ b/docs/2.preview/主题效果预览.md @@ -60,6 +60,11 @@ _斜体文字_ 2. 有序列表2 3. 有序列表3 +- [ ] 任务列表1 +- [ ] 任务列表2 +- [x] 任务列表3 +- [x] 任务列表4 + | Tables | Are | Cool | | ------------- |:-------------:| -----:| | col 3 is | right-aligned | $1600 | @@ -97,6 +102,18 @@ _斜体文字_ const a = 1 const b = 2 const c = a + b + +const obj = { + toLong: { + deep: { + deep: { + deep: { + value: 'this is to long text. this is to long text. this is to long text. this is to long text.', // [!code highlight] + } + } + } + } +} ``` **代码分组** diff --git a/theme/src/client/components/Nav/NavBarSearch.vue b/theme/src/client/components/Nav/NavBarSearch.vue index b2325296..974287fc 100644 --- a/theme/src/client/components/Nav/NavBarSearch.vue +++ b/theme/src/client/components/Nav/NavBarSearch.vue @@ -46,33 +46,37 @@ --docsearch-hit-shadow: none; } -.DocSearch-Button { +.navbar-search .DocSearch-Button { display: flex; justify-content: center; align-items: center; margin: 0; padding: 0; width: 32px; - height: 55px; - background: transparent; + height: 32px; + background: var(--docsearch-searchbox-background); transition: border-color 0.25s; } -.DocSearch-Button:hover { - background: transparent; +.navbar-search .DocSearch-Button:hover { + background: var(--docsearch-searchbox-focus-background); } -.DocSearch-Button:focus { +.navbar-search .DocSearch-Button:focus { outline: 1px dotted; outline: 5px auto -webkit-focus-ring-color; } -.DocSearch-Button:focus:not(:focus-visible) { +.navbar-search .DocSearch-Button:focus:not(:focus-visible) { outline: none !important; } +.navbar-search #docsearch-container { + min-width: 32px; + } + @media (min-width: 768px) { - .DocSearch-Button { + .navbar-search .DocSearch-Button { justify-content: flex-start; border: 1px solid transparent; border-radius: 8px; @@ -82,9 +86,9 @@ background-color: var(--vp-c-bg-alt); } - .DocSearch-Button:hover { + .navbar-search .DocSearch-Button:hover { border-color: var(--vp-c-brand-1); - background: var(--vp-c-bg-alt); + background: var(--docsearch-searchbox-focus-background); } }