-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Global styles: convert preset font size values to CSS vars (#44967)
* messing around seeing how we can use the preset slug + css var instead of the clamp value in global styles. * Fixed import and formatting * Create a new hook specifically for font size. * Refactor useFontSizeStyleWithReset so that it exports named methods and values. Ensure that we allow presets for all font size preset, not only while fluid typography is activated * CHANGELOG.md update * Updated onChange mock arg expectations to include the second arg: fontSize object argument. * Updating tests to include explicit args for mock onChange expectations * Use find as an alternative to the deleted `getSelectedFontSize` method to pass the immediate, currently-selected font size object containing preset slug information to the consuming parent component. Updated tests. General post-rebase chicanery * Now that we're setting font sizes using their presets we don't have to clampify incoming values for the site editor font size picker * Remove confusing comment, because it had nothing to do with the code changes. * Updating method name for clarity.
- Loading branch information
Showing
5 changed files
with
90 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters