File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,13 @@ $slider-off-color: rgba(black, 0.26);
1515$slider-focused-color : rgba (black , 0.38 );
1616$slider-disabled-color : rgba (black , 0.26 );
1717
18+ @function center-vertically ($outerHeight , $innerHeight ) {
19+ @return ($outerHeight / 2 ) - ($innerHeight / 2 );
20+ }
21+
1822@mixin slider-thumb-position ($width : $slider-thumb-width , $height : $slider-thumb-height ) {
1923 position : absolute ;
20- top : ($slider-size / 2 ) - ( $height / 2 );
24+ top : center-vertically ($slider-size , $height );
2125 width : $width ;
2226 height : $height ;
2327 border-radius : max ($width , $height );
@@ -53,7 +57,7 @@ md-slider *::after {
5357.md-slider-track-container {
5458 width : 100% ;
5559 position : absolute ;
56- top : ($slider-size / 2 ) - ( $slider-track-height ) / 2 ;
60+ top : center-vertically ($slider-size , $slider-track-height );
5761 height : $slider-track-height ;
5862}
5963
You can’t perform that action at this time.
0 commit comments