diff --git a/demo/src/layout.md b/demo/src/layout.md index 6c60f1f10..6e2b416e1 100644 --- a/demo/src/layout.md +++ b/demo/src/layout.md @@ -25,7 +25,7 @@ This is just a demo, you should add styles according to your own needs. text-align center .content__page-top, .content__page-bottom, .content__content-top, .content__content-bottom - @extend $wrapper + wrapper() padding-top 0 padding-bottom 0 text-align center diff --git a/demo/src/zh/layout.md b/demo/src/zh/layout.md index 59d5fb173..393755d64 100644 --- a/demo/src/zh/layout.md +++ b/demo/src/zh/layout.md @@ -25,7 +25,7 @@ icon: layout text-align center .content__page-top, .content__page-bottom, .content__content-top, .content__content-bottom - @extend $wrapper + wrapper() padding-top 0 padding-bottom 0 text-align center diff --git a/docs/theme/src/config/stylus.md b/docs/theme/src/config/stylus.md index 315bd54ed..e078f852b 100644 --- a/docs/theme/src/config/stylus.md +++ b/docs/theme/src/config/stylus.md @@ -33,7 +33,7 @@ $navbarMobileHorizontalPadding ?= 1rem $navbarVerticalPadding ?= 0.7rem $navbarMobileVerticalPadding ?= 0.4rem $sidebarWidth ?= 18rem -$mobileSidebarWidth ?= $sidebarWidth +$sidebarMobileWidth ?= $sidebarWidth $contentWidth ?= 740px $homePageWidth ?= 960px ``` @@ -77,7 +77,7 @@ $badgeErrorColor ?= #DA5961 $contentClass ?= '.theme-default-content' /* code block */ -$lineNumbersWrapperWidth ?= 2.5rem +$lineNumbersWidth ?= 2.5rem $codeLang ?= js ts html md vue css sass scss less stylus go java c sh yaml py docker dockerfile makefile ``` diff --git a/docs/theme/src/zh/config/stylus.md b/docs/theme/src/zh/config/stylus.md index b247c328a..2961450b2 100644 --- a/docs/theme/src/zh/config/stylus.md +++ b/docs/theme/src/zh/config/stylus.md @@ -33,7 +33,7 @@ $navbarMobileHorizontalPadding ?= 1rem $navbarVerticalPadding ?= 0.7rem $navbarMobileVerticalPadding ?= 0.4rem $sidebarWidth ?= 18rem -$mobileSidebarWidth ?= $sidebarWidth +$sidebarMobileWidth ?= $sidebarWidth $contentWidth ?= 740px $homePageWidth ?= 960px ``` @@ -77,7 +77,7 @@ $badgeErrorColor ?= #DA5961 $contentClass ?= '.theme-default-content' /* code block */ -$lineNumbersWrapperWidth ?= 2.5rem +$lineNumbersWidth ?= 2.5rem $codeLang ?= js ts html md vue css sass scss less stylus go java c sh yaml py docker dockerfile makefile ``` diff --git a/packages/comment/src/client/components/Valine.vue b/packages/comment/src/client/components/Valine.vue index 52011fe23..4ceb38505 100644 --- a/packages/comment/src/client/components/Valine.vue +++ b/packages/comment/src/client/components/Valine.vue @@ -11,7 +11,7 @@ .page { .valine-wrapper { - @extend $wrapper; + wrapper(); .v[data-class=v] { * { diff --git a/packages/comment/src/client/styles/waline.styl b/packages/comment/src/client/styles/waline.styl index 45e3de9c8..e61ba10de 100644 --- a/packages/comment/src/client/styles/waline.styl +++ b/packages/comment/src/client/styles/waline.styl @@ -3,15 +3,15 @@ .page { .waline-wrapper { - @extend $wrapper; + wrapper(); --waline-accent-color: var(--accent-color); --waline-text-color: var(--text-color); - --waline-active-color: var(--accent-color-l10); + --waline-active-color: var(--accent-color-light); --waline-border: none; --waline-box-shadow: 0 12px 40px rgba(134, 151, 168, 0.25); html.dark & { - --waline-active-color: var(--accent-color-d10); + --waline-active-color: var(--accent-color-dark); --waline-box-shadow: 0 12px 40px #0f0e0d; } } diff --git a/packages/components/src/client/BreadCrumb.vue b/packages/components/src/client/BreadCrumb.vue index 297322878..f252afc84 100644 --- a/packages/components/src/client/BreadCrumb.vue +++ b/packages/components/src/client/BreadCrumb.vue @@ -48,7 +48,7 @@ h1, h2, h3, h4, h5, h6 { } .breadcrumb { - @extend $wrapper; + wrapper(); position: relative; margin-top: $navbarHeight + 0.5rem; margin-bottom: 0.5rem - $navbarHeight; @@ -113,10 +113,10 @@ h1, h2, h3, h4, h5, h6 { } &:hover { - color: var(--accent-color-l10, lighten($accentColor, 10%)); + color: var(--accent-color-light, lighten($accentColor, 10%)); html.dark & { - color: var(--accent-color-d10, darken($accentColor, 10%)); + color: var(--accent-color-dark, darken($accentColor, 10%)); } } } diff --git a/packages/components/src/client/PageInfo.vue b/packages/components/src/client/PageInfo.vue index 4deda045a..ca3f8298e 100644 --- a/packages/components/src/client/PageInfo.vue +++ b/packages/components/src/client/PageInfo.vue @@ -34,7 +34,7 @@ $pageInfoTextSize ?= 14px; .page { .page-title { - @extend $wrapper; + wrapper(); padding-bottom: 0.2rem; position: relative; z-index: 1; diff --git a/packages/copy-code/src/client/style/code.styl b/packages/copy-code/src/client/style/code.styl index 9b23ba0e9..3992b4e0a 100644 --- a/packages/copy-code/src/client/style/code.styl +++ b/packages/copy-code/src/client/style/code.styl @@ -52,7 +52,7 @@ outline: none; &:hover { - background-color: var(--code-hl-bg-color, rgb(0 0 0 / 66%)); + background-color: var(--code-hl-bg-color, rgba(0, 0, 0, 66%)); cursor: pointer !important; } diff --git a/packages/create/template/layout.md b/packages/create/template/layout.md index 6c60f1f10..6e2b416e1 100644 --- a/packages/create/template/layout.md +++ b/packages/create/template/layout.md @@ -25,7 +25,7 @@ This is just a demo, you should add styles according to your own needs. text-align center .content__page-top, .content__page-bottom, .content__content-top, .content__content-bottom - @extend $wrapper + wrapper() padding-top 0 padding-bottom 0 text-align center diff --git a/packages/create/template/zh/layout.md b/packages/create/template/zh/layout.md index ab09f532f..4fabbee76 100644 --- a/packages/create/template/zh/layout.md +++ b/packages/create/template/zh/layout.md @@ -25,7 +25,7 @@ icon: layout text-align center .content__page-top, .content__page-bottom, .content__content-top, .content__content-bottom - @extend $wrapper + wrapper() padding-top 0 padding-bottom 0 text-align center diff --git a/packages/pwa/src/client/components/PWAInstallModal.vue b/packages/pwa/src/client/components/PWAInstallModal.vue index 9a3ddaf4f..725fe7249 100644 --- a/packages/pwa/src/client/components/PWAInstallModal.vue +++ b/packages/pwa/src/client/components/PWAInstallModal.vue @@ -406,7 +406,7 @@ color: var(--white, #fff); &:hover, &:focus { - background: var(--accent-color-l10, $accentColor); + background: var(--accent-color-light, $accentColor); } @media (max-width: $MQMobileNarrow) { @@ -421,7 +421,7 @@ color: var(--accent-color, $accentColor); &:hover, &:focus { - background: var(--accent-color-l10, $accentColor); + background: var(--accent-color-light, $accentColor); color: var(--white, #fff); } } diff --git a/packages/shared/styles/wrapper.styl b/packages/shared/styles/wrapper.styl index 9a532a82c..8e52c4bd1 100644 --- a/packages/shared/styles/wrapper.styl +++ b/packages/shared/styles/wrapper.styl @@ -1,4 +1,4 @@ -$wrapper { +wrapper() { max-width: $contentWidth; margin: 0 auto; padding: 2rem 2.5rem; @@ -12,7 +12,7 @@ $wrapper { } } -$horizontal-wrapper { +horizontal-wrapper() { max-width: var(--content-width); margin-right: auto; margin-left: auto; diff --git a/packages/theme/components/Blog/ArticleItem.vue b/packages/theme/components/Blog/ArticleItem.vue index c5cc64d95..915597a0c 100644 --- a/packages/theme/components/Blog/ArticleItem.vue +++ b/packages/theme/components/Blog/ArticleItem.vue @@ -128,7 +128,7 @@ // line number fix .line-numbers-mode { pre { - padding-left: ($lineNumbersWrapperWidth + 1) rem; + padding-left: ($lineNumbersWidth + 1) rem; } } diff --git a/packages/theme/components/Blog/BlogInfoList.vue b/packages/theme/components/Blog/BlogInfoList.vue index f1d7ea22c..1980e04bb 100644 --- a/packages/theme/components/Blog/BlogInfoList.vue +++ b/packages/theme/components/Blog/BlogInfoList.vue @@ -164,11 +164,11 @@ &.active { html.light & { - background: var(--accent-color-l10); + background: var(--accent-color-light); } html.dark & { - background: var(--accent-color-d10); + background: var(--accent-color-dark); } } diff --git a/packages/theme/components/Blog/CategoryList.vue b/packages/theme/components/Blog/CategoryList.vue index 3e95ac2fb..774e06da6 100644 --- a/packages/theme/components/Blog/CategoryList.vue +++ b/packages/theme/components/Blog/CategoryList.vue @@ -91,7 +91,7 @@ for $color, $index in $colors { } &.active { - background: var(--accent-color-d10); + background: var(--accent-color-dark); color: var(--white); } } diff --git a/packages/theme/components/Home.vue b/packages/theme/components/Home.vue index b84d4ced1..ab1634c69 100644 --- a/packages/theme/components/Home.vue +++ b/packages/theme/components/Home.vue @@ -20,20 +20,15 @@