Skip to content

Commit

Permalink
[Switch] Add transitions for Switch thumb and track colors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrause committed Nov 17, 2024
1 parent 94ec559 commit f412d87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/forms/controls/Switch/Switch.module.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

@use '../../../../styling/defs.scss' as bk;

/* Note: `light-dark()` does not seem to be animatable in Chrome 125, even with `@property` */
// @property --bk-switch-track-color { syntax: '<color>'; inherits: true; initial-value: bk.$color-grey-600; }
// @property --bk-switch-thumb-color { syntax: '<color>'; inherits: true; initial-value: bk.$color-grey-400; }
/* Give these custom properties types to allow them to be animated */
@property --bk-switch-pos { syntax: '<length-percentage>'; inherits: true; initial-value: 50%; }
@property --bk-switch-track-color { syntax: '<color>'; inherits: true; initial-value: transparent; }
@property --bk-switch-thumb-color { syntax: '<color>'; inherits: true; initial-value: transparent; }

@layer baklava.components {
.bk-switch {
Expand Down

0 comments on commit f412d87

Please sign in to comment.