/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devtools/projects/ng-devtools/src/styles/_theme.scss
28 строк
657 B
hawkgs
refactor(devtools): save theme preference (#63050)
08 авг 2025, 18:58
08 авг 2025, 18:58
c0bfe23
Код
Авторство
О чём код?
/* Keep class names in sync with ThemeService */ $dark-theme-class: 'dark-theme'; $light-theme-class: 'light-theme'; /* $top-level-style is required when the mixin is used in a global/top-level stylesheet. */ @mixin _theme($theme, $top-level-style: false) { @if $top-level-style == false { :host-context(:root.#{$theme}) { @content; } } @else { .#{$theme} { @content; } } } @mixin dark-theme($top-level-style: false) { @include _theme($dark-theme-class, $top-level-style) { @content; } } @mixin light-theme($top-level-style: false) { @include _theme($light-theme-class, $top-level-style) { @content; } }