mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2026-01-05 08:43:09 -08:00
Add: SASS - default theme mixins
This commit is contained in:
parent
1035b88253
commit
6e652bea49
2 changed files with 112 additions and 1 deletions
|
|
@ -1,12 +1,29 @@
|
|||
@use "sass:selector";
|
||||
|
||||
$_lightdark: "[lwtheme-mozlightdark]"; /* Legacy - FF v96 */
|
||||
$_lwTheme: ":-moz-lwtheme";
|
||||
|
||||
$_lightdark: "[lwtheme-mozlightdark]"; // Legacy - FF v96
|
||||
$_lightText: '[lwthemetextcolor="bright"]';
|
||||
$_darkText: ":not(#{$_lightText})";
|
||||
|
||||
$_sysDark: "[lwt-default-theme-in-dark-mode]";
|
||||
$_lightStyle: '[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"]';
|
||||
$_darkStyle: '[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"]';
|
||||
|
||||
@function built-in-default-theme() {
|
||||
$oldDefault: selector.append(":root", $_lightdark);
|
||||
$newDefault: selector.append(":root", ":is(#{$_lightStyle}, #{$_darkStyle})");
|
||||
|
||||
@return "#{$oldDefault}, #{$newDefault}";
|
||||
}
|
||||
|
||||
@function system-default-theme() {
|
||||
$sysLight: selector.append(":root", ":not(#{$_lwTheme})");
|
||||
$sysDark: selector.append(":root", $_sysDark);
|
||||
|
||||
@return "#{$sysLight}, #{$sysDark}";
|
||||
}
|
||||
|
||||
@function built-in-light-theme() {
|
||||
$oldLight: selector.append(":root", $_lightdark, $_darkText);
|
||||
$newLight: selector.append(":root", $_lightStyle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue