mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 05:13:33 -06:00
Replace sass lighten()
and darken()
with color.adjust()
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
// Colored button
|
||||
|
||||
@use "sass:color";
|
||||
|
||||
@mixin btn-color($fg, $bg) {
|
||||
color: $fg;
|
||||
background-color: darken($bg, 2%);
|
||||
background-image: linear-gradient(lighten($bg, 5%), darken($bg, 2%));
|
||||
background-color: color.adjust($bg, $lightness: -2%);
|
||||
background-image: linear-gradient(color.adjust($bg, $lightness: 5%), color.adjust($bg, $lightness: -2%));
|
||||
box-shadow:
|
||||
0 1px 3px rgba(0, 0, 0, 0.25),
|
||||
0 4px 10px rgba(0, 0, 0, 0.12);
|
||||
@@ -11,19 +13,19 @@
|
||||
&:hover,
|
||||
&.zeroclipboard-is-hover {
|
||||
color: $fg;
|
||||
background-color: darken($bg, 4%);
|
||||
background-image: linear-gradient((lighten($bg, 2%), darken($bg, 4%)));
|
||||
background-color: color.adjust($bg, $lightness: -4%);
|
||||
background-image: linear-gradient((color.adjust($bg, $lightness: 2%), color.adjust($bg, $lightness: -4%)));
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.selected,
|
||||
&.zeroclipboard-is-active {
|
||||
background-color: darken($bg, 5%);
|
||||
background-color: color.adjust($bg, $lightness: -5%);
|
||||
background-image: none;
|
||||
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
&.selected:hover {
|
||||
background-color: darken($bg, 10%);
|
||||
background-color: color.adjust($bg, $lightness: -10%);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user