department-of-veterans-affairs / vets-design-system-documentation

Repository for design.va.gov website
https://design.va.gov
38 stars 58 forks source link

h1 font size should be in rem for browser font size scaling #3291

Open randimays opened 1 week ago

randimays commented 1 week ago

Bug Report

What happened

Slack thread for context: https://dsva.slack.com/archives/C01DBGX4P45/p1726850241972959

What I expected to happen

Font size for <h1> element should be in rem so it will scale with browser font size settings and zoom.

Reproducing

Screenshot 2024-09-20 at 12 26 58 PM Screenshot 2024-09-20 at 12 26 58 PM

Urgency

How urgent is this request? Please select the appropriate option below and/or provide details

randimays commented 1 week ago

In general, font sizes should all be in rem so they will scale appropriately with browser font size settings. Per Laura Flannery:

Yes, it's important that fonts are able to resize according to the user's specific setting, it's especially important for when the user is using a larger than typical setting. A 24px heading is always going to be 24px regardless of my font settings but a 1.5rem heading will become larger. according to what I need/would like to use for my own site viewing purposes

jamigibbs commented 1 week ago

Some things we might want to check:

  1. Formation: https://github.com/department-of-veterans-affairs/veteran-facing-services-tools/blob/master/packages/formation/sass/mobile-typography.scss
  2. CSS Library: https://github.com/department-of-veterans-affairs/component-library/blob/main/packages/css-library/src/stylesheets/mobile-typography.scss
  3. Documentation Site: https://design.va.gov/foundation/typography#semantic-typography-tokens
  4. Header Utility classes: https://github.com/department-of-veterans-affairs/component-library/blob/main/packages/css-library/dist/stylesheets/utilities.css
caw310 commented 1 week ago

Hey team! Please add your planning poker estimate with Zenhub @Andrew565 @ataker @harshil1793 @it-harrison @jamigibbs @micahchiang @powellkerry @rsmithadhoc