This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bar-indicator): Changes styling to use custom properties
- Loading branch information
1 parent
e33547a
commit 193b3e5
Showing
2 changed files
with
11 additions
and
22 deletions.
There are no files selected for viewing
27 changes: 11 additions & 16 deletions
27
libs/barista-components/bar-indicator/src/_bar-indicator-theme.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
@import '../../core/src/theming/theming'; | ||
|
||
@mixin dt-theme-bar-indicator($theme) { | ||
$palette-names: 'main', 'recovered', 'error'; | ||
$default-palette: 'main'; | ||
:host.dt-color-main { | ||
--dt-bar-indicator-background-color: var(--dt-theme-main-default-color); | ||
} | ||
|
||
@each $name in $palette-names { | ||
$palette: dt-get-theme-palette($theme, $name); | ||
$default-color: dt-get-theme-color($palette, 'default'); | ||
:host.dt-color-error { | ||
--dt-bar-indicator-background-color: var(--dt-error-default-color); | ||
} | ||
|
||
$namespace: ':host'; | ||
@if $name != $default-palette { | ||
$namespace: ':host.dt-color-#{$name}'; | ||
} | ||
:host.dt-color-recovered { | ||
--dt-bar-indicator-background-color: var(--dt-recovered-default-color); | ||
} | ||
|
||
#{$namespace} .dt-bar-indicator-bar { | ||
background-color: $default-color; | ||
} | ||
} | ||
:host .dt-bar-indicator-bar { | ||
background: var(--dt-bar-indicator-background-color); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters