Skip to content

feat(label): support dynamic type - #27962

Merged
brandyscarney merged 7 commits into
FW-4146from
FW-4433
Aug 17, 2023
Merged

feat(label): support dynamic type#27962
brandyscarney merged 7 commits into
FW-4146from
FW-4433

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Aug 9, 2023

Copy link
Copy Markdown
Member

Issue number: N/A


What is the current behavior?

Labels do not support dynamic type.

What is the new behavior?

  • Adds support for dynamic type by converting font-size to use rem units
    • I did not add font-size: 1rem to ion-label because doing this breaks the label font sizes inside of other components such as items, list header, and chip (unless you override it with font-size: inherit inside of those), when this CSS is not needed for label to dynamically size
  • Adds test for scaling the font which checks the default label, label with wrapping text, stacked label and a label containing headings & a paragraph at 310%

I also made changes to item-divider in this PR because it used a shared variable with label to change the paragraph font-size:

  • Removed heading styles that were not used because they were overridden by typography.
  • Adds test for headings inside of an ion-label in an ion-item-divider

Does this introduce a breaking change?

  • Yes
  • No

Other information

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added the package: core @ionic/core package label Aug 9, 2023
@brandyscarney
brandyscarney force-pushed the FW-4433 branch 2 times, most recently from 1586b11 to b09affb Compare August 9, 2023 20:17
@brandyscarney
brandyscarney marked this pull request as ready for review August 9, 2023 21:04
@brandyscarney
brandyscarney requested review from a team and mapsandapps and removed request for a team August 9, 2023 21:04
Comment thread core/src/components/label/label.md.scss

@mapsandapps mapsandapps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good to me. nice cleanup of unused styles 👍🏻

@brandyscarney
brandyscarney merged commit b3948d6 into FW-4146 Aug 17, 2023
@brandyscarney
brandyscarney deleted the FW-4433 branch August 17, 2023 14:51
sean-perkins pushed a commit that referenced this pull request Aug 18, 2023
Adds support for dynamic type by converting `font-size` to use `rem` units.
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.

3 participants