File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1919/// @group @carbon/layout
2020@function -key-by-index ($map , $index ) {
2121 $keys : map .keys ($map );
22- @return nth ($keys , $index );
22+ @return list . nth ($keys , $index );
2323}
2424
2525/// Get the value of the next breakpoint, or null for the last breakpoint
Original file line number Diff line number Diff line change 281281/// @group @carbon/layout
282282@function -key-by-index ($map , $index ) {
283283 $keys : map .keys ($map );
284- @return nth ($keys , $index );
284+ @return list . nth ($keys , $index );
285285}
286286
287287/// Generate the CSS for a grid for the given breakpoints and gutters
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ $base-font-size: 16px !default;
2020/// @access public
2121/// @group @carbon/layout
2222@function to-rem ($px ) {
23- @if unit ($px ) != ' px' {
23+ @if math . unit ($px ) != ' px' {
2424 @error " Expected argument $px to be of type `px`, instead received: `#{unit ($px )} `" ;
2525 }
2626
@@ -35,7 +35,7 @@ $base-font-size: 16px !default;
3535/// @deprecated
3636/// @group @carbon/layout
3737@function rem ($px ) {
38- @if unit ($px ) != ' px' {
38+ @if math . unit ($px ) != ' px' {
3939 @error " Expected argument $px to be of type `px`, instead received: `#{unit ($px )} `" ;
4040 }
4141
@@ -48,7 +48,7 @@ $base-font-size: 16px !default;
4848/// @access public
4949/// @group @carbon/layout
5050@function em ($px ) {
51- @if unit ($px ) != ' px' {
51+ @if math . unit ($px ) != ' px' {
5252 @error " Expected argument $px to be of type `px`, instead received: `#{unit ($px )} `" ;
5353 }
5454
Original file line number Diff line number Diff line change 2828/// @group @carbon/layout
2929@function key-by-index ($map , $index ) {
3030 $keys : map .keys ($map );
31- @return nth ($keys , $index );
31+ @return list . nth ($keys , $index );
3232}
3333
3434/// Pass in a map, and get the last one in the list back
Original file line number Diff line number Diff line change 77
88@use ' @carbon/layout' ;
99@use ' sass:list' ;
10+ @use ' sass:math' ;
1011
1112/// Compute the type size for the given type scale step
1213/// @param {Number} $step
1819 @return 12px ;
1920 }
2021 // Yn = Yn-1 + {INT[(n-2)/4] + 1} * 2
21- @return get-type-size ($step - 1 ) + (floor (($step - 2 ) * 0.25 ) + 1 ) * 2 ;
22+ @return get-type-size ($step - 1 ) + (math . floor (($step - 2 ) * 0.25 ) + 1 ) * 2 ;
2223}
2324
2425/// Type scale follows a custom formula for determining each step size and supports sizes from 12px to 92px
@@ -36,7 +37,7 @@ $type-scale: ();
3637/// @access public
3738/// @group @carbon/type
3839@function type-scale ($step ) {
39- @return nth ($type-scale , $step );
40+ @return list . nth ($type-scale , $step );
4041}
4142
4243/// Set the font-size value of a selector with the value at the given `$step`
You can’t perform that action at this time.
0 commit comments