GSA / digitalgov.gov

Digital.gov: Better websites. Better government.
https://digital.gov
Other
218 stars 299 forks source link

Bug: Refactor footnote to a component #7813

Closed clmedders closed 1 month ago

clmedders commented 1 month ago

Summary

Addressing bug that was causing content to extend past content wrapper

Before and After Screenshot 2024-07-25 at 10 58 52 AM Screenshot 2024-07-25 at 10 59 13 AM

Solution

TL;DR: Updated footer element within the file to be a div to match up with best practices and applied styles to the list item to help with word wrapping

  1. Address a few other issues with markup and styles 1a. The footnote was being applied as a footer, this is not best practice since we are already using a footer 1b. Updated the footer tag to a div and added BEM naming to this new div and added new styles to the lito help with the word wrapping

This solution was chosen for a few reasons, the style solution was to help with the wrapping of the link to help address the issue with content extending past the wrapper and the update to the footer was updated to a div using BEM to align with our projects best practices and also help with mark up and remove a footer that was not truly the footer.

How To Test

  1. visit preview page and adjust screen size to mobile and verify that there is no longer an issue with content going past the wrapper

Tagging supervisor - @rayestrada

github-actions[bot] commented 1 month ago

:mag: Preview in Federalist

nick-mon1 commented 1 month ago

Thanks to @klin2020 for noting that word-break is deprecated and we should use overflow-wrap instead.

mejiaj commented 1 month ago

@RileySeaburg BEM is recommended for clarity and consistency in 18F Engineering Guide - CSS | 18F Engineering.

It's important if we're implementing a component-based approach.