-
Notifications
You must be signed in to change notification settings - Fork 1.1k
USWDS - Footer: Remove additional space. Fixes #5214 (Bug) #5234
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the issue is coming from the nested grid row's. Specifically .usa-footer__logo.grid-row.mobile-lg:grid-col-6 mobile-lg:grid-gap-2
.
Maybe we should consider simplifying the markup by removing the grid rows for footer logo, social logos, and addresses. I know we kept the grid classes in Banner rework #5000, but there's a lot more here so worth removing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mejiaj Going off of your comment, it looks like there are margins being set by .grid-row.grid-gap>*
that is causing that space on the right.
Should we consider this a breaking change because we're editing markdown?
Yes, it'd be a breaking change because of markup. I've added the |
Happy to tackle simplifying the HTML/CSS upon your discussion. Let me know if we'd like to remove the grid utilities on just the sections @mejiaj mentioned, or the whole component. (Or any other requirements that emerge.) |
@danbrady after discussing with the team let's move forward with removing grid classes from component ― starting with the problematic areas. |
@mejiaj To confirm, the goal for the next step is to remove all grid classes from problem areas (footer logo, social logos, and addresses) and get equivalent layout using flex utilities, but leave the grid classes (and |
@danbrady sorry I missed this message. Yes, we're keeping grid classes (to prevent breaking change), but removing the grid layout dependency in SASS. |
aa4b4bc
to
724e1eb
Compare
fd2853c
to
2c43db2
Compare
This updates the markup to remove the errant space defined in the issue. I've updated the markup, but only to use existing classes so I don't believe it's a breaking change? Thanks! |
Hey there @danbrady! Any changes to component markup are considered breaking changes because they require users to manually update the markup in their component code. It'd probably be a better idea to return to a scss based solution for this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danbrady thanks for creating this.
As @mahoneycm's mentioned; any markup changes would be considered breaking. Would you be able to follow his suggestion and use a SCSS-based approach?
Hi @mahoneycm / @mejiaj! Sure, I'll take a look and see if we can fix it with SCSS alone and not change any markup. We'll probably have to override grid/flex classes for this case. So I understand for next time, can you explain to me why this instance would be a breaking change? I understand that if a user updates markup and it refers to updated CSS that hasn't been published it would actually break a component. However, while this change does change the markup, it only changes markup that refers to existing/unchanged styles. If it doesn't reference any new or changed classes, the change should operate ok whether the user updates the markup or not, no? (BTW, I'm not disagreeing. Just want to learn :) Note: PR updated! |
@danbrady historically these types of changes bring difficulties to users, especially those on small teams trying to stay up-to-date with USWDS. We're working on improving how we communicate breaking changes & how we can make upgrading easier. In the meantime, we're trying to avoid changing markup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Short and effective! Love to see it. Thanks @danbrady ! Looks great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice scoped fix
Summary
Fix alignment in Footer Removes additional space that prevents the correct right alignment of elements.
Breaking change
This is not a breaking change.
Related issue
Resolves #5214
Preview link
Current state:

Proposed fix:

Problem statement
Additional padding on right side of footer within the secondary section could cause misalignment with other sections.
Solution
Modified HTML structure to use a layout that prevents additional padding/space. (No new styles/classes created.)
Testing and review