chore(docs): update document site style (#7052)

* chore(docs): update document site style

- enhance document site css rules

* fix: update docs/.vitepress/vitepress/styles/content/table-of-content.scss

Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
This commit is contained in:
黄忠忠 2022-04-08 17:16:10 +08:00 committed by GitHub
parent 5e68255e11
commit 4442ca31ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 16 deletions

View File

@ -14,14 +14,8 @@
}
@include respond-to('xxl') {
padding-left: calc(
(100vw - var(--vp-screen-max-width)) / 2 +
var(--vp-sidebar-width-small) - 42px
);
}
@include respond-to('max') {
padding-left: calc(
(100vw - var(--vp-screen-max-width)) / 2 +
var(--vp-sidebar-width-small) - 4px
(100% - var(--vp-screen-max-width)) / 2 +
var(--vp-sidebar-width-small)
);
}
}

View File

@ -26,4 +26,8 @@
padding: 64px 0 96px 64px;
display: flex;
}
@include respond-to('max') {
padding: 64px 0 96px 96px;
display: flex;
}
}

View File

@ -7,7 +7,7 @@
.toc-content {
position: sticky;
top: calc(var(--header-height) + 32px);
margin-top: 32px;
margin-top: 0;
padding: 4px 8px 4px 12px;
margin-bottom: 32px;
width: 200px;
@ -68,4 +68,9 @@
@include respond-to('xxl') {
display: block;
}
@include respond-to('max') {
padding-left: 96px;
display: block;
}
}

View File

@ -1,3 +1,4 @@
@use './mixins' as *;
// css variables
:root {
// layouts
@ -32,11 +33,20 @@
--nav-height: 55px; // alias of --header-height
/* Screen Size */
--vp-screen-max-width: 1376px;
--vp-screen-max-width: 1362px;
@include respond-to('xxl') {
--vp-sidebar-width-small: 234px;
}
@include respond-to('max') {
--vp-screen-max-width: 1482px;
--vp-sidebar-width-small: 290px;
}
// sidebar
--vp-sidebar-width-mobile: 320px;
--vp-sidebar-width-small: 272px;
--vp-sidebar-width-small: 266px;
--sidebar-width-sm: 16rem;
--sidebar-width-xs: 20rem;

View File

@ -38,7 +38,7 @@
@include respond-to('max') {
// 36 = 2 * 18 for each side.
max-width: calc(var(--vp-screen-max-width) + 36px);
max-width: calc(var(--vp-screen-max-width));
}
}

View File

@ -40,7 +40,7 @@
}
@include respond-to('md') {
width: calc(var(--vp-sidebar-width-small) - $scrollbar-size);
width: calc(var(--vp-sidebar-width-small));
}
@include respond-to('lg') {
@ -53,13 +53,12 @@
padding: 48px 32px 96px calc((100% - var(--vp-screen-max-width)) / 2);
width: calc(
(100% - var(--vp-screen-max-width)) / 2 + var(--vp-sidebar-width-small) -
$scrollbar-size - 32px
(100% - var(--vp-screen-max-width)) / 2 + var(--vp-sidebar-width-small)
);
}
@include respond-to('max') {
padding: 48px 48px 96px calc((100% - var(--vp-screen-max-width)) / 2 - 18px);
padding: 48px 48px 96px calc((100% - var(--vp-screen-max-width)) / 2);
width: calc(
(100% - var(--vp-screen-max-width)) / 2 + var(--vp-sidebar-width-small)