W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2019

[csswg-drafts] [css-containment] Layout containment should block percentage resolution sizing (#4255)

From: Chris Harrelson via GitHub <sysbot+gh@w3.org>
Date: Fri, 30 Aug 2019 17:45:25 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-487600082-1567187124-sysbot+gh@w3.org>
chrishtr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-containment] Layout containment should block percentage resolution sizing ==
Percentage sizes resolve against the containing block for auto sized children. In quirks mode this can follow a whole chain of containing blocks, and in non-quirks mode it stops at the first containing block.


This is a problem for layout containment, because it weakens the isolation between layout below contain:layout and outside. The behavior is also problematic in general because, especially in quirks mode, there is "action at a distance" happening in layout.

The containment spec should be amended to specify that percentage size resolution stops at a contain:layout element.

<div style="height: 100px;">
    <div style="height: 50%;"> </div>

In this example, the height of the inner div resolves to 50% of the outer div, i.e. 50px.

If the intermediate div had `contain:layout`, then the resolved height of the inner div should be 0px.

@tabatkins @bfgeek 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4255 using your GitHub account
Received on Friday, 30 August 2019 17:45:26 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:52 UTC