Re: [csswg-drafts] [css-sizing][css-overflow][css-flexbox] Ability to control the sizing of the overflown content area (#8725)

> So you should be able to just add .item.oh { min-width: min-content; min-height: min-content }. No need to change the HTML structure as you seem to assume?

The problem is not to handle things on the children, but control this on the parent. If we would think of the elements as isolated components, then we need to be able to make the parent container not shrink children regardless of what styles are on them.

We can achieve this with 2 wrappers — top one with the overflow, and the one inside with flex, but we cannot achieve this with only one wrapper — this is the problem.

> Also, consider `overflow: clip` instead of hidden

Can you elaborate? I've tried it on the `.oh`, and it didn't change anything for me. And this also means modifying a child, while the goal is to make the parent work correctly.

> The only problem is that browsers still treat min-content as auto in the block axis. So it doesn't work in the column case.

The column case is what I actually have in practice, in the product code where we stumbled upon this :)

And, lastly, even if all children would not get shrunk (see the case where we add the `flex-shrink` to all of them), we would be left with the issue of `justify-content`, where if we'd want to set it to `center` (or to almost any other value), we'd get things clipped over the start of the container due to it only considering the width of it for where to place them.

-- 
GitHub Notification of comment by kizu
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8725#issuecomment-1509969925 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 15 April 2023 21:10:53 UTC