@@ -201,11 +201,11 @@ $_md-sys-shape: tokens.md-sys-shape-values();
201201 }
202202
203203 // rtl for active track clipping
204- @include _get-rtl-selectors ( ' .track' , ' :: after' ) {
204+ .track :dir ( rtl ) :: after {
205205 clip-path : inset (0 $_active-track-start-clip 0 $_active-track-end-clip );
206206 }
207207
208- @include _get-rtl-selectors ( ' .tickmarks' , ' :: after' ) {
208+ .tickmarks :dir ( rtl ) :: after {
209209 clip-path : inset (0 $_active-track-start-clip 0 $_active-track-end-clip );
210210 }
211211
@@ -440,7 +440,7 @@ $_md-sys-shape: tokens.md-sys-shape-values();
440440 }
441441
442442 // in 'rtl', clip right side of "lesser" input
443- @include _get-rtl-selectors ( ' .ranged input.start' ) {
443+ .ranged input .start :dir ( rtl ) {
444444 clip-path : inset (0 0 0 $_clip-to-end );
445445 }
446446
@@ -450,7 +450,7 @@ $_md-sys-shape: tokens.md-sys-shape-values();
450450 }
451451
452452 // in 'rtl', clip left side of "greater" input
453- @include _get-rtl-selectors ( ' .ranged input.end' ) {
453+ .ranged input .end :dir ( rtl ) {
454454 clip-path : inset (0 $_clip-to-start 0 0 );
455455 }
456456
@@ -477,28 +477,6 @@ $_md-sys-shape: tokens.md-sys-shape-values();
477477 }
478478}
479479
480- // Creates a mixin of rtl selectors to construct distinct rulesets. If `:dir` is
481- // supported, then it will take precedence over `:host-context` via a `@supports
482- // not selector(:dir(rtl))` at-rule. Seprating rulesets ensure they are not
483- // dropped on browsers where one is not supported;
484- // Note, `:where` cannot be used to create compound selectors that contain
485- // pseudo elements
486- // (e.g. this does not work: `:where(:host([dir="rtl"]) .foo::after)`),
487- @mixin _get-rtl-selectors ($selector : ' ' , $suffix : ' ' ) {
488- $host-context-selectors : ' :host-context([dir="rtl"]) #{$selector }#{$suffix } , :host([dir="rtl"]) #{$selector }#{$suffix } ' ;
489- $dir-selector : ' #{$selector } :dir(rtl)#{$suffix } ' ;
490-
491- @supports not selector (:dir (rtl )) {
492- #{$host-context-selectors } {
493- @content ;
494- }
495- }
496-
497- #{$dir-selector } {
498- @content ;
499- }
500- }
501-
502480// Returns a background-image with sized circular ticks of the given color.
503481@function _get-tick-image ($color ) {
504482 @return radial-gradient (
@@ -537,10 +515,7 @@ $_md-sys-shape: tokens.md-sys-shape-values();
537515 transform : translateX (var (--_x-translate ));
538516 }
539517
540- @include _get-rtl-selectors (
541- ' input.#{$start-or-end } ' ,
542- ' ::-webkit-slider-thumb'
543- ) {
518+ input .#{$start-or-end } :dir (rtl )::-webkit-slider-thumb {
544519 transform : translateX (calc (-1 * var (--_x-translate )));
545520 }
546521}
0 commit comments