rachelandrew / gridbugs

A curated list of Grid interop issues
MIT License
1.18k stars 25 forks source link

Wrapped pre element in a grid container grows column albeit overflow being auto/scroll #26

Closed kleinfreund closed 5 years ago

kleinfreund commented 6 years ago

(I’m not sure whether that’s a bug or as per specification. Atleast for me, it is unexpected.)

  1. An element specifies display: grid and some maximum width (e.g. 400px)
  2. A child pre element has overflow: auto or overflow: scroll. If it overflows, it triggers scrollbars. The one grid column will then grow to the specified maximum width
  3. Now, another pre element is wrapped in another element (it’s no longer a direct child of the grid container). It has the same properties as the other pre element. If it overflows, it grows as wide as its content demands. The one grid column will then grow just as wide.

Is this to be expected?

Let me know if additional info is needed. :)

kleinfreund commented 5 years ago

Closing as intentional.

For more information, read css-tricks.com: Preventing a Grid Blowout.