Files
angular__angular/devtools/projects/ng-devtools/src/styles/_theme.scss
T
hawkgs 77b5eed024 refactor(devtools): extract and organize colors into themes (#60374)
Extract all colors from the stylesheets, reduce their number by merging the similar ones and organize them into themes represented by CSS variables.

PR Close #60374
2025-03-27 18:10:28 +00:00

31 lines
699 B
SCSS

/* Keep class names in sync with ThemeService */
$dark-theme-class: 'dark-theme';
$light-theme-class: 'light-theme';
/* $browser expects 'chrome', 'firefox' or 'safari' */
@mixin _theme($theme, $browser: '') {
@if $browser == '' {
:host-context(:root.#{$theme}) {
@content;
}
} @else {
/* Keep browser class name in sync with BrowserService. */
$browser-class: $browser + '-ui';
:host-context(:root.#{$theme}.#{$browser-class}) {
@content;
}
}
}
@mixin dark-theme($browser: '') {
@include _theme($dark-theme-class, $browser) {
@content;
}
}
@mixin light-theme($browser: '') {
@include _theme($light-theme-class, $browser) {
@content;
}
}