Re: [csswg-drafts] [css-position-3] Absolute positioning - Is the new inset & auto-size behaviour web-compatible? (#11195)

Actually, it has already been fixed in the spec (#11902): https://drafts.csswg.org/css-position-3/#abspos-auto-size

<blockquote>

The [automatic size](https://drafts.csswg.org/css-sizing-3/#automatic-size) of an [absolutely positioned box](https://drafts.csswg.org/css-position-3/#absolute-position) is resolved against its [inset-modified containing block](https://drafts.csswg.org/css-position-3/#inset-modified-containing-block) as follows:

<dl>
<dt>

If its [self-alignment property](https://drafts.csswg.org/css-align-3/#self-alignment-properties) in the relevant axis is [stretch](https://drafts.csswg.org/css-align-3/#valdef-align-self-stretch) and neither of its [inset properties](https://drafts.csswg.org/css-position-3/#inset-properties) nor [margins](https://drafts.csswg.org/css-box-4/#margin) in that axis are auto

</dt>
<dt>

Or if it is [normal](https://drafts.csswg.org/css-align-3/#valdef-align-self-normal) and the box is [non-replaced](https://drafts.csswg.org/css-display-4/#non-replaced), not a [table wrapper box](https://drafts.csswg.org/css-tables-3/#table-wrapper-box), and has no [auto](https://drafts.csswg.org/css-position-3/#valdef-top-auto) [inset](https://drafts.csswg.org/css-position-3/#inset-properties) in the relevant axis

</dt>
<dd>

Its [automatic size](https://drafts.csswg.org/css-sizing-3/#automatic-size) is its [stretch-fit size](https://drafts.csswg.org/css-sizing-3/#stretch-fit-size).

</dd>
<dt>

Otherwise

</dt>
<dd>

Its [automatic size](https://drafts.csswg.org/css-sizing-3/#automatic-size) is its [fit-content size](https://drafts.csswg.org/css-sizing-3/#fit-content-size).

</dd>
</dl>

</blockquote>

Well, the "nor [margins](https://drafts.csswg.org/css-box-4/#margin) in that axis are auto" is wrong: browsers still allow stretching.

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


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

Received on Tuesday, 15 April 2025 23:36:03 UTC