Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css3-conditional] @supports rule #3161

Closed
svgeesus opened this issue Sep 26, 2018 · 1 comment
Closed

[css3-conditional] @supports rule #3161

svgeesus opened this issue Sep 26, 2018 · 1 comment

Comments

@svgeesus
Copy link
Contributor

from https://lists.w3.org/Archives/Public/www-style/2018Jan/0087.html raised by Dennis Heuer

if I read well, the rule @supports is only taking single properties as
arguments. I'd like to see it support css version and spec names to
allow enframing the case more widely, like:

@supports css21 and (css3: text-decoration, compositing, transform) ...

This is a quite arbitrary example... Just a guess...

@svgeesus
Copy link
Contributor Author

from https://lists.w3.org/Archives/Public/www-style/2018Jan/0090.html rejected by @tabatkins

As previous emails have explained, CSS is not versioned.

As for providing an entire spec name, that's problematic for a few reasons.

  1. Some spec names overlap with property names, like "transform".
  1. Spec names are intended to be human-only; we didn't choose their
    names with the intention to show up in APIs.
  1. Most importantly, the @supports rule is very intentionally designed
    to rely solely on existing parsing machinery, rather than
    human-maintained lists. To evaluate a support condition, all a
    browser has to do is feed the property+value to their CSS parser and
    see if it parses or not. This system avoids the failure modes of
    previous attempts at providing an "is this supported?" API, namely
    that a human-maintained set of features is often out of date or
    encourages lying. These problems made the legacy hasFeature() JS API
    mostly useless, for example. Allowing an author to ask "is this
    entire spec supported?" falls exactly into that failure mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant