Skip to content

LG-3878 remove BassCSS typography#5972

Merged
solipet merged 10 commits intomainfrom
dprice-lg-3878-remove-basscss-typography
Feb 22, 2022
Merged

LG-3878 remove BassCSS typography#5972
solipet merged 10 commits intomainfrom
dprice-lg-3878-remove-basscss-typography

Conversation

@solipet
Copy link
Contributor

@solipet solipet commented Feb 18, 2022

Why: As a user, I expect that login.gov has a consistent visual style, and that my page load times are not prolonged by loading redundant CSS. As a developer, I expect that existing references to BassCSS module classes are replaced with equivalent USWDS or ad hoc alternatives, so that we can successfully migrate away from and eliminate our dependency on BassCSS.

Styles being removed:

All of the variables defined in the type-scale module of BassCSS were already in the idp stylesheets or unused. We can simply delete the inclusion of the BassCSS type-scale module.

The utility-typography classes map to the uswds classes as follows:

BassCSS USWDS
bold text-bold
regular text-normal
left-align text-left
center text-center
right-align text-right
justify text-justify
nowrap text-nowrap

The BassCSS class list-reset was mapped to usa-list--unstyled with no noticeable difference in layout:

list-reset usa-list--unstyled
list-style: none; list-style-type:none;
padding-left: 0; padding-left:0;
margin-bottom:0;
margin-top:0;

The following two classes that didn't have a clear replacement and have been copied into the design-system-waiting-room:

.break-word { word-wrap: break-word }

.truncate {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@solipet solipet requested review from aduth and peggles2 February 18, 2022 20:44
Copy link
Contributor

Choose a reason for hiding this comment

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

This file isn't currently being imported anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, it's created in #5944 - I'll be sure to wait for that to merge then resolve conflicts before merging mine.

.erb-lint.yml Outdated
Comment on lines 61 to 62
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we consolidate overlapping patterns on line 22-24?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup! 39d66bed0

@solipet solipet force-pushed the dprice-lg-3878-remove-basscss-typography branch from 6c89781 to 3025f09 Compare February 22, 2022 21:36
changelog: Improvements, Typography, Use design system for typography utilities
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@solipet solipet merged commit 7b9628f into main Feb 22, 2022
@solipet solipet deleted the dprice-lg-3878-remove-basscss-typography branch February 22, 2022 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants