mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-21 12:20:39 +00:00
fix: replace deprecated darken/lighten scss functions (#891)
This commit is contained in:
parent
d587968b58
commit
1d84cc878a
@ -2,7 +2,7 @@
|
||||
@each $name, $color in $hint-colors {
|
||||
&.#{$name} {
|
||||
border-left-color: $color;
|
||||
background-color: scale-color($color, $lightness: 95%, $saturation: -30%);
|
||||
background-color: color.scale($color, $lightness: 95%, $saturation: -30%);
|
||||
color: $body-font-color;
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@
|
||||
padding: $padding-4 $padding-16 !important;
|
||||
|
||||
&:first-child {
|
||||
background-color: scale-color($gray-600, $alpha: -95%);
|
||||
background-color: color.scale($gray-600, $alpha: -95%);
|
||||
font-weight: bold;
|
||||
|
||||
&.icon {
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
--mark-color: #{$mark-color};
|
||||
|
||||
--button-background: #{lighten($main-color, 2)};
|
||||
--button-background: #{color.scale($main-color, $lightness: 15%)};
|
||||
--button-border-color: #{$main-color};
|
||||
|
||||
--link-color: #{$link-color};
|
||||
@ -20,7 +20,7 @@
|
||||
--accent-color: #{$gray-200};
|
||||
--accent-color-lite: #{$gray-100};
|
||||
|
||||
--control-icons: #{lighten($body-font-color, 50)};
|
||||
--control-icons: #{color.scale($body-font-color, $lightness: 40%)};
|
||||
|
||||
--footer-background: #{$second-color};
|
||||
--footer-font-color: #{$white};
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
.gdoc-hint__title,
|
||||
.admonitionblock table td:first-child {
|
||||
background-color: scale-color($gray-600, $alpha: -95%);
|
||||
background-color: color.scale($gray-600, $alpha: -95%);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -52,11 +52,11 @@
|
||||
--header-font-color: #{$white};
|
||||
|
||||
--body-background: #{$body-background-dark};
|
||||
--body-font-color: #{lighten($body-background-dark, 60)};
|
||||
--body-font-color: #{color.scale($body-background-dark, $lightness: 70%)};
|
||||
|
||||
--mark-color: #{$mark-color};
|
||||
|
||||
--button-background: #{lighten($main-color, 2)};
|
||||
--button-background: #{color.scale($main-color, $lightness: 15%)};
|
||||
--button-border-color: #{$main-color};
|
||||
|
||||
--link-color: #{$link-color-dark};
|
||||
@ -65,11 +65,11 @@
|
||||
--hint-link-color: #{$link-color};
|
||||
--hint-link-color-visited: #{$link-color-visited};
|
||||
|
||||
--accent-color-dark: #{darken($body-background-dark, 8)};
|
||||
--accent-color: #{darken($body-background-dark, 4)};
|
||||
--accent-color-lite: #{darken($body-background-dark, 2)};
|
||||
--accent-color-dark: #{color.scale($body-background-dark, $lightness: -60%)};
|
||||
--accent-color: #{color.scale($body-background-dark, $lightness: -30%)};
|
||||
--accent-color-lite: #{color.scale($body-background-dark, $lightness: -15%)};
|
||||
|
||||
--control-icons: #{lighten($body-font-color, 50)};
|
||||
--control-icons: #{color.scale($body-font-color, $lightness: 40%)};
|
||||
|
||||
--footer-background: #{$second-color};
|
||||
--footer-font-color: #{$white};
|
||||
@ -102,7 +102,7 @@
|
||||
|
||||
.gdoc-hint__title,
|
||||
.admonitionblock table td:first-child {
|
||||
background-color: scale-color($gray-600, $alpha: -85%);
|
||||
background-color: color.scale($gray-600, $alpha: -85%);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -112,14 +112,14 @@
|
||||
|
||||
& {
|
||||
--code-background: #{$code-background-dark};
|
||||
--code-accent-color: #{darken($code-background-dark, 4)};
|
||||
--code-accent-color-lite: #{darken($code-background-dark, 2)};
|
||||
--code-accent-color: #{color.scale($code-background-dark, $lightness: -30%)};
|
||||
--code-accent-color-lite: #{color.scale($code-background-dark, $lightness: -15%)};
|
||||
--code-font-color: #{$code-font-color-dark};
|
||||
|
||||
--code-copy-background: #{$code-background-dark};
|
||||
--code-copy-font-color: #{darken($code-font-color-dark, 15)};
|
||||
--code-copy-border-color: #{darken($code-font-color-dark, 20)};
|
||||
--code-copy-success-color: #{scale-color(map.get($hint-colors, "ok"), $alpha: -55%)};
|
||||
--code-copy-font-color: #{color.scale($code-font-color-dark, $lightness: -15%)};
|
||||
--code-copy-border-color: #{color.scale($code-font-color-dark, $lightness: -20%)};
|
||||
--code-copy-success-color: #{color.scale(map.get($hint-colors, "ok"), $alpha: -55%)};
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,13 +128,13 @@
|
||||
|
||||
& {
|
||||
--code-background: #{$code-background};
|
||||
--code-accent-color: #{darken($code-background, 6)};
|
||||
--code-accent-color-lite: #{darken($code-background, 2)};
|
||||
--code-accent-color: #{color.scale($code-background, $lightness: -45%)};
|
||||
--code-accent-color-lite: #{color.scale($code-background, $lightness: -15%)};
|
||||
--code-font-color: #{$code-font-color};
|
||||
|
||||
--code-copy-background: #{$code-background};
|
||||
--code-copy-font-color: #{lighten($code-font-color, 15)};
|
||||
--code-copy-border-color: #{lighten($code-font-color, 20)};
|
||||
--code-copy-font-color: #{color.scale($code-font-color, $lightness: 20%)};
|
||||
--code-copy-border-color: #{color.scale($code-font-color, $lightness: 40%)};
|
||||
--code-copy-success-color: #{map.get($hint-colors, "ok")};
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
@use "sass:color";
|
||||
|
||||
// Used in layout
|
||||
$padding-2: 0.125rem !default;
|
||||
$padding-4: 0.25rem !default;
|
||||
@ -68,7 +70,7 @@ $link-color-dark: rgba(110, 168, 212, 1) !default;
|
||||
$link-color-visited-dark: rgba(186, 142, 240) !default;
|
||||
|
||||
$code-background: $gray-100 !default;
|
||||
$code-background-dark: darken($body-background-dark, 3) !default;
|
||||
$code-background-dark: color.scale($body-background-dark, $lightness: -15%) !default;
|
||||
|
||||
$header-font-family: "Metropolis", sans-serif !default;
|
||||
$header-height: 3.5rem !default;
|
||||
|
@ -140,13 +140,13 @@
|
||||
@each $name, $color in $hint-colors {
|
||||
&.#{$name} {
|
||||
border-left-color: $color;
|
||||
background-color: scale-color($color, $lightness: 95%, $saturation: -30%);
|
||||
background-color: color.scale($color, $lightness: 95%, $saturation: -30%);
|
||||
color: $body-font-color;
|
||||
padding: 0;
|
||||
|
||||
code,
|
||||
pre {
|
||||
background-color: scale-color($color, $lightness: 80%, $saturation: -75%);
|
||||
background-color: color.scale($color, $lightness: 80%, $saturation: -75%);
|
||||
color: $code-font-color;
|
||||
}
|
||||
}
|
||||
@ -154,9 +154,9 @@
|
||||
|
||||
&__title {
|
||||
padding: $padding-4 $padding-16;
|
||||
background-color: scale-color($gray-600, $alpha: -95%);
|
||||
background-color: color.scale($gray-600, $alpha: -95%);
|
||||
font-weight: bold;
|
||||
color: scale-color($body-font-color, $alpha: -15%);
|
||||
color: color.scale($body-font-color, $alpha: -15%);
|
||||
|
||||
i.fa::after {
|
||||
content: attr(title);
|
||||
@ -226,8 +226,8 @@
|
||||
|
||||
@each $name, $color in $hint-colors {
|
||||
&__tag.#{$name} {
|
||||
border-color: scale-color($color, $lightness: 90%, $saturation: -30%);
|
||||
background-color: scale-color($color, $lightness: 95%, $saturation: -30%);
|
||||
border-color: color.scale($color, $lightness: 90%, $saturation: -30%);
|
||||
background-color: color.scale($color, $lightness: 95%, $saturation: -30%);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
@use "sass:map";
|
||||
@use "sass:meta";
|
||||
@use "sass:color";
|
||||
|
||||
@import "_defaults";
|
||||
@import "_color_mode";
|
||||
|
Loading…
Reference in New Issue
Block a user