CSS @supported at-rule

I have created a spec that extends CSS a little bit, allowing for more advanced backwards compatibility by surrounding new/perhaps-unsupported CSS rules with an at-rule. Read it here, let me know what you think (this was also announced on www-style).

Atom Feed for Comments 6 Responses to “CSS @supported at-rule”

  1. Neil Mitchell Says:

    Wow, that’s a really good idea! The only problem is what to do when browsers which half-support a property mark it as supported?

  2. jmdesp Says:

    Good idea, but there’s is something else in a similar line I’m thinking about since some time.

    It seems a lot of CSS tries to use various hack to apply some rules only for some navigators, in order to be able to avoid their specific bugs …

    It’s a bit unholy, but an extension that enable to filter the rule you apply directly according to the CSS engine that is crunching the current rules (including it’s version to be able to stop delivering the rule when the bug is corrected) would be very useful.

    It’s time to accept that this is what is already happening, except that people have to do it through the indirect and unsecure method of using parsing bugs to that effect, and that CSS engine will never deliver a perfect, ultimate implementation of CSS, so that this will be and stay truly needed.

  3. Christian Says:

    I agree with jmdesp. A CSS engine that is totally bug free and implements all of the standards it claims to support is utopia.

    In the foreseeable future we will not see more than a handfull of different high-quality CSS engines meaning that at least one of these will have a considerate market share. Allowing authors to make workarounds for specific browsers therefore seems reasonable.

    Also, the code gets more readable instead of now, where people use parsing bugs to make some rules “invisible” to some browsers which is very hard to understand for people not very familiar with these hacks.

  4. Neil Mitchell Says:

    The disadvantage of a version and engine check is lies. Check the user agent – Opera reports itself as Mozilla 4.0, even IE reports itself as Moz 4.0 I think. I’m not sure if ANY browsers tell the truth any more. Move to this with CSS, and you’ll get the lesser used browsers which kind-of support the same CSS giving details of the more popular ones – we’ll be back to where we started quite quickly.

  5. Benjamin Smedberg Says:

    Why would UAs have any incentive to lie in their @supported implementation? With useragents it is obvious, that some websites serve different content to IE useragents and not-IE useragents. But there is no incentive to lie or mislead in this (rather obscure) technical detail. Either you support the feature, or you are forwards-compatible in a useful way.

  6. Stephen Duncan Jr Says:

    Not intentional lies, I think, but incorrect/incomplete implementations are the problem. It seems to me there’s a lot of CSS that IE would claim to support, but it doesn’t do it the same was the rest of the browsers, so to a web developer, it may as well be unsupported.

Leave a Reply