File tree Expand file tree Collapse file tree 7 files changed +18
-8
lines changed
Expand file tree Collapse file tree 7 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ $rmd-app-bar-keyline: 1rem !default;
4848/// @require $rmd-button-icon-size
4949/// @type Number
5050$rmd-app-bar-nav-margin : $rmd-app-bar-keyline -
51- (($rmd-button-icon-size - $rmd-icon-size ) / 2 );
51+ (($rmd-button-icon-size - $rmd-icon-size ) * 0.5 );
5252
5353/// The keyline for the `AppBarTitle` to use when used with the `AppBarNav` or
5454/// the `offset` prop is enabled.
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ $rmd-switch-container-vertical-padding: 0.5rem !default;
128128/// enough so that the ball does not overlap the label or other elements.
129129///
130130/// @type Number
131- $rmd-switch-container-horizontal-padding : $rmd-switch-ball-size / 2 !default ;
131+ $rmd-switch-container-horizontal-padding : $rmd-switch-ball-size * 0.5 !default ;
132132
133133/// The color to use for the switch's ball when it is toggled on and disabled.
134134///
Original file line number Diff line number Diff line change 22/// @group media
33/// /
44
5+ @use " sass:math" ;
6+
57@import ' ~@react-md/theme/dist/mixins' ;
68@import ' ~@react-md/utils/dist/functions' ;
79@import ' ./variables' ;
2527/// @param {Number} width - The width to enforce for the responsive media
2628/// @param {Number} height - The height to enforce for the responsive media
2729@mixin rmd-media-aspect-ratio ($width , $height ) {
28- padding-bottom : percentage ($height / $width );
30+ padding-bottom : percentage (math . div ( $height , $width ) );
2931}
3032
3133/// Creates the styles for a media container that should enforce a specific
Original file line number Diff line number Diff line change 22/// @group media
33/// /
44
5+ @use " sass:math" ;
6+
57@import ' ~@react-md/theme/dist/color-palette' ;
68
79/// The background color for a media overlay.
@@ -21,7 +23,7 @@ $rmd-media-selectors: (img '>svg' iframe video embed object) !default;
2123/// enforced.
2224///
2325/// @type Number
24- $rmd-media-default-aspect-ratio : percentage (9 / 16 ) !default ;
26+ $rmd-media-default-aspect-ratio : percentage (math . div ( 9 , 16 ) ) !default ;
2527
2628/// A Map including the default aspect ratios to create for responsive media
2729/// with a forced aspect ratio. Each key must be a string for a class name
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ $rmd-circular-progress-start-offset: $rmd-circular-progress-dasharray !default;
242242/// The ending dashoffset for the ciruclar progress animation. This will be used
243243/// for the `50%` value in the animation keyframes by default.
244244/// @type Number
245- $rmd-circular-progress-end-offset : $rmd-circular-progress-dasharray / 4 !default ;
245+ $rmd-circular-progress-end-offset : $rmd-circular-progress-dasharray * 0.25 !default ;
246246
247247/// The circular progress styles to apply for the rotation transition. Each key
248248/// in this map will be set immediately at the root of the `keyframes` and then
Original file line number Diff line number Diff line change 22/// @group theme
33/// /
44
5+ @use " sass:math" ;
6+
57@import ' ./color-palette' ;
68
79/// This is the default contrast ratio to use for color accessibility between
@@ -190,8 +192,10 @@ $rmd-theme-linear-channel-values: (
190192 $back-luminance : rmd-theme-luminance ($back ) + 0.05 ;
191193 $front-luminance : rmd-theme-luminance ($front ) + 0.05 ;
192194
193- @return max ($back-luminance , $front-luminance ) /
194- min ($back-luminance , $front-luminance );
195+ @return math .div (
196+ max ($back-luminance , $front-luminance ),
197+ min ($back-luminance , $front-luminance )
198+ );
195199}
196200
197201/// Determines if a provided color is considered light or dark.
Original file line number Diff line number Diff line change 22/// @group typography
33/// /
44
5+ @use " sass:math" ;
6+
57/// Gets the global variable value for a provided typography style name. This
68/// assumes that the global variable exists already.
79///
7678/// @param {Number} font-size - The font size to use
7779/// @return {Number} the letter spacing value in em
7880@function rmd-typography-get-letter-spacing ($tracking , $font-size ) {
79- @return $tracking / ( $font-size * 16 ) * 1em ;
81+ @return math . div ( $tracking , $font-size * 16 ) * 1em ;
8082}
8183
8284/// The font family to use throughout the entire application.
You can’t perform that action at this time.
0 commit comments