Skip to content

USWDS - Utilities: Add "full-percent" palettes to top, left, right#5633

Merged
thisisdano merged 1 commit into
developfrom
al-full-utility-class
Dec 6, 2023
Merged

USWDS - Utilities: Add "full-percent" palettes to top, left, right#5633
thisisdano merged 1 commit into
developfrom
al-full-utility-class

Conversation

@amyleadem

@amyleadem amyleadem commented Nov 21, 2023

Copy link
Copy Markdown
Contributor

Summary

Fixed a bug that prevented the CSS from generating .left-full, .right-full, and .top-full utility classes.

Breaking change

This is not a breaking change.

Related issue

Closes #5632

Related pull requests

Changelog PR

Problem statement

Our documentation for .left-, .right-, and .top- utility classes state that USWDS offers .left-full, .right-full, and .top-full classes. However, these do not appear in the default USWDS CSS. USWDS CSS does currently provide a .bottom-full class.

Solution

Added "full-percent" palettes to .top-, .left-, .right- utility classes.

Testing and review

  • Confirm that USWDS should include .left-full, .right-full, and .top-full classes.
  • Confirm that the generated CSS now includes .left-full, .right-full, and .top-full classes.
  • Confirm that the new classes generate the expected property values

@mejiaj

mejiaj commented Nov 21, 2023

Copy link
Copy Markdown
Contributor

@amyleadem two questions;

  1. How does this affect compiled CSS size?
  2. Is this fixing a regression?

@amyleadem

Copy link
Copy Markdown
Contributor Author

@mejiaj

  1. Updating this adds 1KB to the CSS
    • Before: 652KB (30002 lines)
    • After: 653KB (30014 lines)
  2. It doesn't appear to be a regression.
    • The bottom property received "full-percent" 5 years ago in A bunch of little fixes #2504. I don't see any history of left, right, or top having "full-percent".
    • For reference, in uswds-site the .left-full class was added to the docs at about the same time 5 years ago.

@mejiaj mejiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for addressing this

@mahoneycm mahoneycm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works like a charm!

  • Pattern matches bottom-full which previously worked
  • Correctly adds top, left, and right relative positioning

@thisisdano thisisdano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Simple and effective

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.

USWDS - Bug: "full" display position utility classes do not generate

4 participants