🎨 Style: change scss varible $prefix

This commit is contained in:
Cell
2022-09-13 10:12:54 +08:00
parent b67517c3d1
commit 17cb4e6a86
6 changed files with 13 additions and 9 deletions
+4
View File
@@ -44,6 +44,10 @@
@each $color, $value in $theme-colors {
.text-#{$color} {
color: #{$value} !important;
[data-theme='dark'] & {
color: #{darken($value, 5%)} !important;
}
}
}
+2 -2
View File
@@ -3,9 +3,9 @@
// Theme colors varibles
@each $color, $value in $theme-colors {
--#{$prefix}-#{$color}: #{$value};
--#{$prefix}#{$color}: #{$value};
}
@each $color, $value in $theme-colors {
--#{$prefix}-#{$color}-dark: #{darken($value, 5%)};
--#{$prefix}#{$color}-dark: #{darken($value, 5%)};
}
}
+2 -2
View File
@@ -10,13 +10,13 @@
line-height: 140%;
.icon-repost {
color: var(--fi-success);
color: var(--#{$prefix}success);
display: inline-block;
width: max-content;
margin-right: 0.25rem;
[data-theme='dark'] & {
color: var(--fi-success-dark);
color: var(--#{$prefix}success-dark);
}
}
}
@@ -1,5 +1,5 @@
.noscript-warning {
background-color: var(--fi-danger);
background-color: var(--#{$prefix}danger);
color: white;
font-size: 1rem;
font-weight: bold;
@@ -11,6 +11,6 @@
z-index: 150;
[data-theme='dark'] & {
background-color: var(--fi-danger-dark);
background-color: var(--#{$prefix}danger-dark);
}
}
@@ -2,11 +2,11 @@
--progress: 0;
height: var(--progress-h, 2px);
width: var(--progress);
background-color: var(--bg-progress, var(--fi-info));
background-color: var(--bg-progress, var(--#{$prefix}info));
z-index: 150;
position: fixed;
[data-theme="dark"] & {
background-color: var(--bg-progress-dark, var(--fi-info-dark));
background-color: var(--bg-progress-dark, var(--#{$prefix}info-dark));
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
// ========== Global ========== //
// Prefix for :root CSS variables.
$prefix: fi !default;
$prefix: fi- !default;
// Font and Line Height
$global-font-family: system-ui, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft YaHei UI, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica, Arial, sans-serif !default;