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

Formation Deprecation - Step 2 - Discovery: Migrate DST playground applications base font-size #2223

Closed
1 task
micahchiang opened this issue Oct 2, 2023 · 4 comments

Comments

@micahchiang
Copy link
Contributor

micahchiang commented Oct 2, 2023

Description

A fundamental step necessary in the deprecation of Formation in favor of the new CSS Library is the use of a base font-size consistent with USWDS.

Formation currently sets font-size by doing two things:

html { font-size: 10px; }
body { font-size: 1.6rem; }

USWDS does something similar by doing this:

html { font-size: 100%; }
body { font-size: 16px; }

Problem Statement

Formation bases rem values off of 10px while USWDS bases them off of 16px. Simply changing the base font-size in Formation would result in a significant increase in size:

// .vads-base-font as an example

// Current:
10px * 1.6rem = 16px
// Browser default (uswds)
16px * 1.6rem = 25.6px

How does VA.gov, from both a sitewide and application specific perspective, move to the USWDS base font-size without disrupting content flow?

Considerations

  • Import minimal.scss into DST playground applications but override font-size declarations in formation/sass/base/va
  • add font-size declarations to css-library/src/stylesheets/elements.scss and import this for base font-size declaration.
  • link local instances of formation, css-library, and formation together to test this locally

Acceptance Criteria

  • Discovery has determined whether or not app by app imports is a viable way to migrate font-size. If it isn't, then an alternate solution is proposed.
@micahchiang micahchiang changed the title Formation Deprecation - Migrate font size to CSS Library Formation Deprecation - Discovery: Migrate DST playground applications base font-size Oct 2, 2023
@micahchiang micahchiang changed the title Formation Deprecation - Discovery: Migrate DST playground applications base font-size Formation Deprecation - Step 2 - Discovery: Migrate DST playground applications base font-size Oct 2, 2023
@caw310
Copy link
Contributor

caw310 commented Oct 5, 2023

@jamigibbs jamigibbs self-assigned this Oct 11, 2023
@rmessina1010 rmessina1010 self-assigned this Oct 13, 2023
@jamigibbs jamigibbs transferred this issue from department-of-veterans-affairs/va.gov-team Oct 23, 2023
@caw310
Copy link
Contributor

caw310 commented Oct 23, 2023

This will go into the next sprint as Jami and Ray have been busy working on other things so need more time.

@jamigibbs
Copy link
Contributor

We have added our discovery notes to this Confluence doc for discussion: https://vfs.atlassian.net/wiki/spaces/DST/pages/2817130631/Discovery+Formation+base+font-size

@jamigibbs
Copy link
Contributor

jamigibbs commented Nov 7, 2023

A follow-up ticket has been created about deciding on the approach:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants