refactor: update the sass mixed declarations (#1872)

See: https://sass-lang.com/d/mixed-decls
This commit is contained in:
Andrew 2024-08-09 01:24:30 -04:00 committed by Cotes Chung
parent e347d0632f
commit 23729c9c8f
No known key found for this signature in database
GPG key ID: 0D9E54843167A808
4 changed files with 28 additions and 28 deletions

View file

@ -1,6 +1,8 @@
/* The common styles */ /* The common styles */
html { html {
font-size: 16px;
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
&:not([data-mode]), &:not([data-mode]),
&[data-mode='light'] { &[data-mode='light'] {
@ -22,8 +24,6 @@ html {
@include light-scheme; @include light-scheme;
} }
} }
font-size: 16px;
} }
body { body {
@ -218,13 +218,13 @@ i {
#access-lastmod { #access-lastmod {
a { a {
color: inherit;
&:hover { &:hover {
@extend %link-hover; @extend %link-hover;
} }
@extend %no-bottom-border; @extend %no-bottom-border;
color: inherit;
} }
} }
@ -682,15 +682,15 @@ $btn-mb: 0.5rem;
background: var(--sidebar-bg); background: var(--sidebar-bg);
border-right: 1px solid var(--sidebar-border-color); border-right: 1px solid var(--sidebar-border-color);
/* Hide scrollbar for IE, Edge and Firefox */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
/* Hide scrollbar for Chrome, Safari and Opera */ /* Hide scrollbar for Chrome, Safari and Opera */
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
/* Hide scrollbar for IE, Edge and Firefox */
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
%sidebar-link-hover { %sidebar-link-hover {
&:hover { &:hover {
color: var(--sidebar-active-color); color: var(--sidebar-active-color);
@ -1036,6 +1036,9 @@ search {
padding-bottom: 3rem; padding-bottom: 3rem;
a { a {
font-size: 1.4rem;
line-height: 2.5rem;
&:hover { &:hover {
@extend %link-hover; @extend %link-hover;
} }
@ -1043,9 +1046,6 @@ search {
@extend %link-color; @extend %link-color;
@extend %no-bottom-border; @extend %no-bottom-border;
@extend %heading; @extend %heading;
font-size: 1.4rem;
line-height: 2.5rem;
} }
> article { > article {

View file

@ -50,13 +50,13 @@ html {
@extend %rounded; @extend %rounded;
@extend %code-snippet-bg; @extend %code-snippet-bg;
overflow: auto;
padding-bottom: 0.75rem;
@at-root figure#{&} { @at-root figure#{&} {
@extend %code-snippet-bg; @extend %code-snippet-bg;
} }
overflow: auto;
padding-bottom: 0.75rem;
pre { pre {
margin-bottom: 0; margin-bottom: 0;
font-size: $code-font-size; font-size: $code-font-size;

View file

@ -84,27 +84,29 @@
--prompt-danger-bg: rgb(86, 28, 8, 0.8); --prompt-danger-bg: rgb(86, 28, 8, 0.8);
--prompt-danger-icon-color: #cd0202; --prompt-danger-icon-color: #cd0202;
/* tags */ /* Tags */
--tag-border: rgb(59, 79, 88); --tag-border: rgb(59, 79, 88);
--tag-shadow: rgb(32, 33, 33); --tag-shadow: rgb(32, 33, 33);
--dash-color: rgb(63, 65, 68); --dash-color: rgb(63, 65, 68);
--search-tag-bg: #292828; --search-tag-bg: #292828;
/* categories */ /* Categories */
--categories-border: rgb(64, 66, 69, 0.5); --categories-border: rgb(64, 66, 69, 0.5);
--categories-hover-bg: rgb(73, 75, 76); --categories-hover-bg: rgb(73, 75, 76);
--categories-icon-hover-color: white; --categories-icon-hover-color: white;
/* archives */ /* Archive */
--timeline-node-bg: rgb(150, 152, 156); --timeline-node-bg: rgb(150, 152, 156);
--timeline-color: rgb(63, 65, 68); --timeline-color: rgb(63, 65, 68);
--timeline-year-dot-color: var(--timeline-color); --timeline-year-dot-color: var(--timeline-color);
color-scheme: dark;
.light { .light {
display: none; display: none;
} }
/* categories */ /* Categories */
.categories.card, .categories.card,
.list-group-item { .list-group-item {
background-color: var(--card-bg); background-color: var(--card-bg);
@ -138,8 +140,6 @@
); );
} }
color-scheme: dark;
/* stylelint-disable-next-line selector-id-pattern */ /* stylelint-disable-next-line selector-id-pattern */
#disqus_thread { #disqus_thread {
color-scheme: none; color-scheme: none;

View file

@ -92,14 +92,6 @@
--tag-hover: rgb(222, 226, 230); --tag-hover: rgb(222, 226, 230);
--search-tag-bg: #f8f9fa; --search-tag-bg: #f8f9fa;
[class^='prompt-'] {
--link-underline-color: rgb(219, 216, 216);
}
.dark {
display: none;
}
/* Categories */ /* Categories */
--categories-border: rgba(0, 0, 0, 0.125); --categories-border: rgba(0, 0, 0, 0.125);
--categories-hover-bg: var(--btn-border-color); --categories-hover-bg: var(--btn-border-color);
@ -109,4 +101,12 @@
--timeline-color: rgba(0, 0, 0, 0.075); --timeline-color: rgba(0, 0, 0, 0.075);
--timeline-node-bg: #c2c6cc; --timeline-node-bg: #c2c6cc;
--timeline-year-dot-color: #ffffff; --timeline-year-dot-color: #ffffff;
[class^='prompt-'] {
--link-underline-color: rgb(219, 216, 216);
}
.dark {
display: none;
}
} /* light-scheme */ } /* light-scheme */