1414$_md-sys-motion : tokens .md-sys-motion-values ();
1515$_easing-standard : map .get ($_md-sys-motion , ' easing-standard' );
1616
17- @mixin styles () {
17+ @mixin styles ($tokens ) {
1818 @layer styles {
1919 .handle-container {
2020 display : flex ;
@@ -25,7 +25,9 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
2525 transition : margin 300ms cubic-bezier (0.175 , 0.885 , 0.32 , 1.275 );
2626 }
2727
28- $margin : calc (var (--_track-width ) - var (--_track-height ));
28+ $margin : calc (
29+ map .get ($tokens , ' track-width' ) - map .get ($tokens , ' track-height' )
30+ );
2931
3032 .selected .handle-container {
3133 margin-inline-start : $margin ;
@@ -41,12 +43,12 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
4143
4244 .handle {
4345 // Handle shape
44- border-start-start-radius : var ( --_handle- shape-start-start );
45- border-start-end-radius : var ( --_handle- shape-start-end );
46- border-end-end-radius : var ( --_handle- shape-end-end );
47- border-end-start-radius : var ( --_handle- shape-end-start );
48- height : var ( --_handle- height );
49- width : var ( --_handle- width );
46+ border-start-start-radius : map . get ( $tokens , ' handle- shape-start-start' );
47+ border-start-end-radius : map . get ( $tokens , ' handle- shape-start-end' );
48+ border-end-end-radius : map . get ( $tokens , ' handle- shape-end-end' );
49+ border-end-start-radius : map . get ( $tokens , ' handle- shape-end-start' );
50+ height : map . get ( $tokens , ' handle- height' );
51+ width : map . get ( $tokens , ' handle- width' );
5052
5153 transform-origin : center ;
5254 transition-property : height , width ;
@@ -71,90 +73,93 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
7173 }
7274
7375 .selected .handle {
74- height : var ( --_selected- handle-height );
75- width : var ( --_selected- handle-width );
76+ height : map . get ( $tokens , ' selected- handle-height' );
77+ width : map . get ( $tokens , ' selected- handle-width' );
7678 }
7779
7880 .handle.with-icon {
79- height : var ( --_with- icon-handle-height );
80- width : var ( --_with- icon-handle-width );
81+ height : map . get ( $tokens , ' with- icon-handle-height' );
82+ width : map . get ( $tokens , ' with- icon-handle-width' );
8183 }
8284
8385 .selected :not (.disabled ):active .handle ,
8486 .unselected :not (.disabled ):active .handle {
85- height : var ( --_pressed- handle-height );
86- width : var ( --_pressed- handle-width );
87+ height : map . get ( $tokens , ' pressed- handle-height' );
88+ width : map . get ( $tokens , ' pressed- handle-width' );
8789 transition-timing-function : linear ;
8890 transition-duration : 100ms ;
8991 }
9092
9193 .selected .handle ::before {
92- background-color : var ( --_selected- handle-color );
94+ background-color : map . get ( $tokens , ' selected- handle-color' );
9395 }
9496
9597 .selected :hover .handle ::before {
96- background-color : var ( --_selected- hover-handle-color );
98+ background-color : map . get ( $tokens , ' selected- hover-handle-color' );
9799 }
98100
99101 .selected :focus-within .handle ::before {
100- background-color : var ( --_selected- focus-handle-color );
102+ background-color : map . get ( $tokens , ' selected- focus-handle-color' );
101103 }
102104
103105 .selected :active .handle ::before {
104- background-color : var ( --_selected- pressed-handle-color );
106+ background-color : map . get ( $tokens , ' selected- pressed-handle-color' );
105107 }
106108
107109 .selected.disabled .handle ::before {
108- background-color : var ( --_disabled- selected-handle-color );
109- opacity : var ( --_disabled- selected-handle-opacity );
110+ background-color : map . get ( $tokens , ' disabled- selected-handle-color' );
111+ opacity : map . get ( $tokens , ' disabled- selected-handle-opacity' );
110112 }
111113
112114 .unselected .handle ::before {
113- background-color : var ( --_handle- color );
115+ background-color : map . get ( $tokens , ' handle- color' );
114116 }
115117
116118 .unselected :hover .handle ::before {
117- background-color : var ( --_hover- handle-color );
119+ background-color : map . get ( $tokens , ' hover- handle-color' );
118120 }
119121
120122 .unselected :focus-within .handle ::before {
121- background-color : var ( --_focus- handle-color );
123+ background-color : map . get ( $tokens , ' focus- handle-color' );
122124 }
123125
124126 .unselected :active .handle ::before {
125- background-color : var ( --_pressed- handle-color );
127+ background-color : map . get ( $tokens , ' pressed- handle-color' );
126128 }
127129
128130 .unselected.disabled .handle ::before {
129- background-color : var ( --_disabled- handle-color );
130- opacity : var ( --_disabled- handle-opacity );
131+ background-color : map . get ( $tokens , ' disabled- handle-color' );
132+ opacity : map . get ( $tokens , ' disabled- handle-opacity' );
131133 }
132134
133135 md-ripple {
134- border-radius : var ( --_state- layer-shape );
135- height : var ( --_state- layer-size );
136+ border-radius : map . get ( $tokens , ' state- layer-shape' );
137+ height : map . get ( $tokens , ' state- layer-size' );
136138 inset : unset ;
137- width : var ( --_state- layer-size );
139+ width : map . get ( $tokens , ' state- layer-size' );
138140 }
139141
140142 .selected md-ripple {
141143 @include ripple .theme (
142144 (
143- ' hover-color' : var (--_selected-hover-state-layer-color ),
144- ' pressed-color' : var (--_selected-pressed-state-layer-color ),
145- ' hover-opacity' : var (--_selected-hover-state-layer-opacity ),
146- ' pressed-opacity' : var (--_selected-pressed-state-layer-opacity ),
145+ ' hover-color' : map .get ($tokens , ' selected-hover-state-layer-color' ),
146+ ' pressed-color' :
147+ map .get ($tokens , ' selected-pressed-state-layer-color' ),
148+ ' hover-opacity' :
149+ map .get ($tokens , ' selected-hover-state-layer-opacity' ),
150+ ' pressed-opacity' :
151+ map .get ($tokens , ' selected-pressed-state-layer-opacity' ),
147152 )
148153 );
149154 }
150155
151156 .unselected md-ripple {
152157 @include ripple .theme (
153158 (
154- ' hover-color' : var ( --_hover- state-layer-color ),
155- ' pressed-color' : var ( --_pressed- state-layer-color ),
156- ' hover-opacity' : var ( --_hover- state-layer-opacity ),
157- ' pressed-opacity' : var ( --_pressed- state-layer-opacity ),
159+ ' hover-color' : map . get ( $tokens , ' hover- state-layer-color' ),
160+ ' pressed-color' : map . get ( $tokens , ' pressed- state-layer-color' ),
161+ ' hover-opacity' : map . get ( $tokens , ' hover- state-layer-opacity' ),
162+ ' pressed-opacity' : map . get ( $tokens , ' pressed- state-layer-opacity' ),
158163 )
159164 );
160165 }
0 commit comments