- From: Simon Fraser via GitHub <sysbot+gh@w3.org>
- Date: Fri, 20 Jan 2023 01:46:17 +0000
- To: public-css-archive@w3.org
smfr has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-masking] Behavior of `clip` on position:fixed descendants is unspecified ==
CSS Masking defines the (deprecated) `clip` property here: https://drafts.fxtf.org/css-masking/#clip-property
It notes that the property only applies to `position:absolute` elements (UAs also apply it to `position:fixed` so this could use clarification). However, the text does not say that `clip` only applies to containing-block descendants, nor does `clip` create a stacking context.
Given that, I'd expect in this example that the `clip` would NOT apply to the fixedpos child:
```
#absolute {
position: absolute;
background-color: chartreuse;
top: 100px;
left: 100px;
width: 200px;
height: 200px;
clip: rect(0, 200px, 20px, 0px);
}
#fixed {
position: fixed;
top: 50px;
left: 50px;
background-color: salmon;
width: 100px;
height: 100px;
}
<div id="absolute">
<div id="fixed"></div>
</div>
```
and yet all UAs agree that it does. This makes it different from the `overflow` property, which only clips containing-block descendants, and different from `clip-path` that triggers a stacking context. As an implementor, I'd prefer that `clip` isn't so special, but at least the spec should describe its implemented behavior.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8336 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 20 January 2023 01:46:19 UTC