File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,21 @@ $base-font-size: 16px !default;
2727 @return math .div ($px , $base-font-size ) * 1rem ;
2828}
2929
30+ /// This function causes an error when using sass > 1.65.0
31+ /// Replaced with `to-rem` function
32+ /// @param {Number} $px - Number with px unit
33+ /// @return {Number} Number with rem unit
34+ /// @access public
35+ /// @deprecated
36+ /// @group @carbon/layout
37+ @function rem ($px ) {
38+ @if unit ($px ) != ' px' {
39+ @error " Expected argument $px to be of type `px`, instead received: `#{unit ($px )} `" ;
40+ }
41+
42+ @return math .div ($px , $base-font-size ) * 1rem ;
43+ }
44+
3045/// Convert a given px unit to a em unit
3146/// @param {Number} $px - Number with px unit
3247/// @return {Number} Number with em unit
Original file line number Diff line number Diff line change @@ -27,6 +27,21 @@ $base-font-size: 16px !default;
2727 @return math .div ($px , $base-font-size ) * 1rem ;
2828}
2929
30+ /// This function causes an error when using sass > 1.65.0
31+ /// Replaced with `to-rem` function
32+ /// @param {Number} $px - Number with px unit
33+ /// @return {Number} Number with rem unit
34+ /// @access public
35+ /// @deprecated
36+ /// @group @carbon/layout
37+ @function rem ($px ) {
38+ @if unit ($px ) != ' px' {
39+ @error " Expected argument $px to be of type `px`, instead received: `#{unit ($px )} `" ;
40+ }
41+
42+ @return math .div ($px , $base-font-size ) * 1rem ;
43+ }
44+
3045/// Convert a given px unit to a em unit
3146/// @param {Number} $px - Number with px unit
3247/// @return {Number} Number with em unit
Original file line number Diff line number Diff line change @@ -26,6 +26,21 @@ $base-font-size: 16px !default;
2626 @return math .div ($px , $base-font-size ) * 1rem ;
2727}
2828
29+ /// This function causes an error when using sass > 1.65.0
30+ /// Replaced with `to-rem` function
31+ /// @param {Number} $px - Number with px unit
32+ /// @return {Number} Number with rem unit
33+ /// @access public
34+ /// @deprecated
35+ /// @group @carbon/layout
36+ @function rem ($px ) {
37+ @if unit ($px ) != ' px' {
38+ @error " Expected argument $px to be of type `px`, instead received: `#{unit ($px )} `" ;
39+ }
40+
41+ @return math .div ($px , $base-font-size ) * 1rem ;
42+ }
43+
2944/// Convert a given px unit to a em unit
3045/// @param {Number} $px - Number with px unit
3146/// @return {Number} Number with em unit
You can’t perform that action at this time.
0 commit comments