Re: [csswg-drafts] [css-contain-3] Inconsistent handling of known and unknown features jeopardizes backward compatibility (#7551)

@tabatkins But let's consider

```html
<style>
@container (width > 50px) or something() {
  #c { /* ... */ }
}
</style>
<div id="a" style="container-type: size; width: 100px">
  <div id="b" style="container-type: size; width: 10px">
    <div id="c"></div>
  </div>
</div>
```

First, we try to match `#b`, we get `false or unknown`, which is `unknown`, so we keep searching.
Then we try to match `#a`, we get `true or unknown`, which is `true`, so we stop.
The condition matches and `#c` gets the styles.

But let's say that, in the future, we define `something()` as valid. Let's say it evaluates to `false` on `#b`.
So first we try to match `#b`, we get `false or false`, which is `false`, so we stop.
The condition doesn't match and `#c` does not get the styles.

I think this is the same forwards compatibility problem that this issue was trying to address?



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


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

Received on Wednesday, 18 January 2023 18:37:36 UTC