Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vw and vh units to the custom font size picker #60607

Merged
merged 9 commits into from
May 23, 2024
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

### Enhancements

- `UnforwardedFontSizePicker`: Add `vw` and `vh` units to the font size picker ([#60507]((https://github.com/WordPress/gutenberg/pull/60607)).
carolinan marked this conversation as resolved.
Show resolved Hide resolved
- `Tooltip`: Make tests faster ([#60897](https://github.com/WordPress/gutenberg/pull/60897)).
- `ExternalLink`: Use unicode arrow instead of svg icon ([#60255](https://github.com/WordPress/gutenberg/pull/60255)).
- `ProgressBar`: Move the indicator width styles from emotion to a CSS variable ([#60388](https://github.com/WordPress/gutenberg/pull/60388)).
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/font-size-picker/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function FontSizePicker( {
const label = __( 'Font Size' );

const units = useCustomUnits( {
availableUnits: [ 'px', 'em', 'rem' ],
availableUnits: [ 'px', 'em', 'rem', 'vw', 'vh' ],
} );

const accessibilityLabel = sprintf(
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/font-size-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const UnforwardedFontSizePicker = (
} = props;

const units = useCustomUnits( {
availableUnits: unitsProp || [ 'px', 'em', 'rem' ],
availableUnits: unitsProp || [ 'px', 'em', 'rem', 'vw', 'vh' ],
} );

const shouldUseSelectControl = fontSizes.length > 5;
Expand Down
Loading