Re: [csswg-drafts] [css-grid-2] Resolving padding in indefinite intrinsic size calculation and using that to resolve indefinite size? (#8963)

> E.g. this yeilds better results for cases like: https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=11788

Here the `padding: 10%` is not cyclic, the container has a definite size, so I think it's something different.

> %-padding on the container almost never matters, except for height resolution, and now in grid as its resolving min/max widths

I don't think this is something new, I think these should behave the same (like they do on Firefox): https://www.software.hixie.ch/utilities/js/live-dom-viewer/saved/11789

```html
<!DOCTYPE html>
<style>
.wrapper { width: min-content; border: solid 3px }
.target { background: gray; box-sizing: border-box; padding: 10%; width: min-content; max-width: 200px; }
.target.grid { display: grid; grid-template-columns: repeat(auto-fill, 100px); grid-template-rows: 100px }
.target::before { content: ""; display: block; background: lime }
.target.block::before { width: 200px; max-width: max(-1%, 100px); height: 100px }
</style>
<div class="wrapper">
  <div class="target block"></div>
</div>
<div class="wrapper">
  <div class="target grid"></div>
</div>
```

In both cases we have some contents with a width of 200px during intrinsic sizing which shrinks to 100px when laying out for real. But the padding area of `.target.block` keeps being 200px, I son't see why it should be different for `.target-grid`.

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


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

Received on Tuesday, 13 June 2023 22:33:41 UTC