Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED-v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 0 additions & 20 deletions src/styles/foundation/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down