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

Use rem units for typography #1760

Merged
merged 3 commits into from
Sep 23, 2022
Merged

Use rem units for typography #1760

merged 3 commits into from
Sep 23, 2022

Conversation

robinmetral
Copy link
Contributor

@robinmetral robinmetral commented Sep 22, 2022

Closes #1679

Purpose

Switches typography units to rem, for accessibility reasons.

This change will ensure that text scales based on user font size settings.

This is a major (therefore targeting next) because apps will need to make sure they're not changing the default rem value (it should be 16px).

This is how the Storybook looks when making font size "very large" on Chrome:

change the Chrome setting in Appearance > font size

Before (prod) After (preview)
font size isn't increased at all font size is increased

Approach and changes

  • update typography design tokens
  • use design tokens in Badge component (unsure why it was hardcoding typography values before)
  • update snapshots (this is the bulk of the diff)

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

@sumup-clark
Copy link

sumup-clark bot commented Sep 22, 2022

Hey @robinmetral,
we are super excited that you are contributing! 🎉There's one more thing you need to do. Please accept our Contributor License Agreement. It helps you and us to collaborate on clear terms and focus on what we love most: code.

Thanks!

@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2022

🦋 Changeset detected

Latest commit: ecbd4cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sumup/circuit-ui Major
@sumup/design-tokens Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
oss-circuit-ui ✅ Ready (Inspect) Visit Preview Sep 22, 2022 at 4:17PM (UTC)

@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Merging #1760 (ecbd4cd) into next (b03da80) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #1760   +/-   ##
=======================================
  Coverage   91.60%   91.60%           
=======================================
  Files         172      172           
  Lines        3526     3526           
  Branches     1177     1173    -4     
=======================================
  Hits         3230     3230           
  Misses        275      275           
  Partials       21       21           
Impacted Files Coverage Δ
packages/circuit-ui/components/Badge/Badge.tsx 100.00% <ø> (ø)
packages/design-tokens/themes/shared.ts 0.00% <ø> (ø)

@robinmetral robinmetral added the ♿ accessibility Improves usability label Sep 22, 2022
@robinmetral robinmetral marked this pull request as ready for review September 22, 2022 16:26
@robinmetral robinmetral requested a review from a team as a code owner September 22, 2022 16:26
@robinmetral robinmetral requested review from connor-baer and removed request for a team September 22, 2022 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants