diff --git a/UNRELEASED-v8.md b/UNRELEASED-v8.md index 53a4bfe34be..7f112ab3624 100644 --- a/UNRELEASED-v8.md +++ b/UNRELEASED-v8.md @@ -21,6 +21,7 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t - Removed the `duration()` scss function and replaced any instances with tokens ([#4699](https://github.com/Shopify/polaris-react/pull/4699)) - Removed the `$duration-data` global variable ([#4699](https://github.com/Shopify/polaris-react/pull/4699)) - Removed the `spacing()` scss function and replaced any instances with tokens ([#4691](https://github.com/Shopify/polaris-react/pull/4691/)) +- Removed the `px()` scss function ([#4751](https://github.com/Shopify/polaris-react/pull/4751)) ### New components diff --git a/src/styles/foundation/_utilities.scss b/src/styles/foundation/_utilities.scss index 85c28bda793..9e44531e3c4 100644 --- a/src/styles/foundation/_utilities.scss +++ b/src/styles/foundation/_utilities.scss @@ -21,26 +21,6 @@ $base-font-size: 10px; } } -/// Returns the value in pixels for a given rem value. -/// @param {Number} $value - The rem value to be converted. -/// @return {Number} The converted value in pixels. - -@function px($value) { - $unit: unit($value); - - @if $value == 0 { - @return 0; - } @else if $unit == 'px' { - @return $value; - } @else if $unit == 'em' { - @return ($value / 1em) * $base-font-size; - } @else if $unit == 'rem' { - @return ($value / 1rem) * $base-font-size; - } @else { - @error 'Value must be in rem, em, or px.'; - } -} - /// Returns the value in ems for a given pixel value. Note that this /// only works for elements that have had no font-size changes. /// @param {Number} $value - The pixel value to be converted.