Skip to content

Remove USWDS prose styles from application stylesheet#9445

Merged
aduth merged 1 commit intomainfrom
aduth-rm-uswds-prose
Oct 25, 2023
Merged

Remove USWDS prose styles from application stylesheet#9445
aduth merged 1 commit intomainfrom
aduth-rm-uswds-prose

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Oct 25, 2023

🛠 Summary of changes

Removes USWDS Prose component styles from the application stylesheet, to further optimize its output size and compile times.

We only had a single reference to this in the accordion component. While the source example component code for accordion does prescribe usa-prose, the only meaningful impact I could tell is the enforcement of a maximum width on the text. Since our Figma references for the accordion component don't apply this maximum text width (cc @nickttng) and we generally don't use "prose" styling, I think it should be safe and consistent to remove.

This also updates asset size budgets to be more aggressively small.

An upstream pull request to USWDS at uswds/uswds#5577 will further optimize size by about 0.1kb Brotli'd when paired with this change. I couldn't find an elegant way to monkey-patch it here.

Performance

NODE_ENV=production yarn build:css && brotli-size app/assets/builds/application.css

Before: 26.9kb
After: 25.3kb
Diff: -1.6kb (-5.9%)

📜 Testing Plan

Verify there are no visual regressions, particularly in the use of accordion components.

changelog: Internal, Performance, Reduce size of application stylesheet
@aduth aduth merged commit 7613be4 into main Oct 25, 2023
@aduth aduth deleted the aduth-rm-uswds-prose branch October 25, 2023 14:43
@mdiarra3 mdiarra3 mentioned this pull request Oct 26, 2023
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