BlackbirdDigital / wp-theme-scaffold

Blackbird's WordPress Theme Scaffold
GNU General Public License v2.0
30 stars 1 forks source link

Prevent horizontal blowout without overflow:hidden #35

Closed cr0ybot closed 2 years ago

cr0ybot commented 2 years ago

Currently in the site module, horizontal overflow is prevented with overflow: hidden. This prevents the use of position: sticky, and removing it means that some elements will force the width to be wider than the viewport.

The reason for the overflow: hidden is given in a comment: "Resolves issue with

 elements forcing full width". It actually happens with many other elements, mainly media and flex layouts. The reason it happens is because a grid cell will not shrink past its contents' minimum width, and the solution is to set the min-width of the grid items to 0.