Skip to content

refactor(many): convert dynamic type rem values to Sass functions - #28209

Merged
brandyscarney merged 2 commits into
FW-4146from
bc-refactor-rem-units
Sep 28, 2023
Merged

refactor(many): convert dynamic type rem values to Sass functions#28209
brandyscarney merged 2 commits into
FW-4146from
bc-refactor-rem-units

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Sep 21, 2023

Copy link
Copy Markdown
Member

Converts some of the rem units for dynamic font scaling to use the dynamic-font functions that didn't exist when these were implemented.

There were a few other components that still use the old functions clamp, min, max (chip, datetime) but I did not implement those so I don't know the purpose of leaving them. I can migrate if desired.


/// @prop - Font size of the list header
$list-header-ios-font-size: min(1.375rem, 56px) !default;
$list-header-ios-font-size: dynamic-font-max(22px, 2.55) !default;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

22px * 2.55 = 56.1px which may be causing the weird screenshot diffs from the max being 56px previously

/// The minimum and maximum font sizes for a toolbar button are
/// 100% and 135%, respectively, of their default font size
$toolbar-ios-button-font-size: clamp(17px, 1.0625rem, 21px) !default;
$toolbar-ios-button-font-size: dynamic-font-clamp(1, 17px, 1.24) !default;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

17px * 1.24 = 21.08px which may be causing the weird screenshot diffs from the max being 21px previously

@brandyscarney
brandyscarney marked this pull request as ready for review September 28, 2023 14:39
@brandyscarney
brandyscarney requested a review from a team September 28, 2023 14:39
@brandyscarney
brandyscarney merged commit e68dfcf into FW-4146 Sep 28, 2023
@brandyscarney
brandyscarney deleted the bc-refactor-rem-units branch September 28, 2023 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants