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

devknoll has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-contain-3] Inconsistent handling of known and unknown features jeopardizes backward compatibility ==
Currently, a condition like `((<unknown>) or (width))` will evaluate to `true` on a container with `inline-size` or `size`, because the `<unknown>` irrelevant to the final result. However, this is not the case with a _known but invalid_ feature. For example, `((height) or (width))` will simply be filtered out and never evaluated.

The issue is that a future version of the specification could make some value of `<unknown>` a _known_ feature that happens to be _invalid_ in the context an author used it. If a browser follows the existing behavior of filtering out conditions with such features, the author's styles will likely begin to stop applying for users on that browser, which is unexpected behavior.

Instead of being filtered out when they have _known but invalid_ features, it seems like invalid features should just evaluate to `unknown` for consistency. That way, a condition like `((<unknown>) or (width))` will continue to apply (via the semantics of the `or`), even if `<unknown>` eventually has a semantic meaning in a future browser.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7551 using your GitHub account


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

Received on Monday, 1 August 2022 19:26:48 UTC