Re: [css3-conditional] Is this test correct?

The test is correct for what it measures: whether `caption-side: left` is a
valid declaration for an @supports rule, according to the CSS parser.

That doesn't *always* mean that it is supported by the rendering engine for
what you want.
Sometimes the parser supports a declaration, but the property is only used
in certain situations.  For example, there are lots of properties which are
only used for SVG elements or only for HTML/CSS box-model elements, in
certain browsers.  An `@supports` test cannot distinguish those cases.
It's a limitation of the way `@supports` is defined.

For `caption-side`, my first guess was that maybe left and right are
supported, but only in vertical writing modes.  But that does not appear to
be true, either:

http://codepen.io/AmeliaBR/pen/jmNGym/

Since the Chrome CSS parser is claiming support, but there does not appear
to be any underlying implementation, that's a serious bug to file on
Chrome.  Have you filed? Have you received a response?

...

On the broader issue of how this should affect CSS WG tests, that's a lot
more complicated.  CSS authors need to be able to rely on `@supports`!

The CSS WG could theoretically create `@supports` tests for every
CSS-defined property and property value, as part of the test suite for each
property.  The declaration should pass `@supports` if (and only if) it also
passes the core tests for that property or value.

But you can't write tests for every possible eventuality, measuring
`@supports` for every possible or proposed property or keyword value. You
can therefore never test for certain that `@supports` never returns a false
positive for non-standard features (and, as far as I can tell,
`caption-side: left` is non-standard, although established enough to make
it to the MDN page).

This is a persistent issue with any type of support-testing platform
feature: one bad implementation returning false positives makes the feature
unreliable everywhere.  It's why the `.hasFeature()` API is deprecated, and
the SVG requiredFeatures attribute with it.  I don't have any suggestions
for how to fix it, beyond filing bugs whenever you find them, so that the
number of affected browser versions is as small as possible.

~ABR

On 10 April 2017 at 20:05, Gérard Talbot <www-style@gtalbot.org> wrote:

> Hello,
>
> Is this test correct?
>
> http://www.gtalbot.org/BrowserBugsSection/CSS3ConditionalRul
> es/supports-caption-side-left.html
>
> Chrome 55+ claims to support 'caption-side: left' ... but that is not
> true, hence my question.
>
> http://lists.w3.org/Archives/Public/www-style/2017Mar/0073.html
>
> Gérard
>
>
>

Received on Tuesday, 11 April 2017 15:16:16 UTC