You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
has a default width, whether it's a fixed width or a keyword other than auto (e.g. 200px or fit-content)
stretches properly when placed in a grid layout with justify-items: stretch, without any contextual override (i.e. no &:is(.grid > *) { width: auto; })
The solution
A new default-width property that defines the width of a width: auto element, while allowing it to stretch in a grid context.
stretches properly when placed in a grid layout with justify-items: stretch, without any contextual override (i.e. no &:is(.grid > *) { width: auto; })
Note: this is also a problem with a column flex container (with the default align-items which stretches items horizontally).
The problem
It is impossible to write a CSS component that:
auto
(e.g.200px
orfit-content
)justify-items: stretch
, without any contextual override (i.e. no&:is(.grid > *) { width: auto; }
)The solution
A new
default-width
property that defines the width of awidth: auto
element, while allowing it to stretch in a grid context.Here's a Codepen that has a good visual explanation.
Related to #7427, and could fix #3226 (comment)
The text was updated successfully, but these errors were encountered: