Fyrd / caniuse

Raw browser/feature support data from caniuse.com
https://caniuse.com
Creative Commons Attribution 4.0 International
5.6k stars 1.38k forks source link

Safari custom properties bug in CSS.supports() API #5884

Open andronocean opened 3 years ago

andronocean commented 3 years ago

The CSS.supports() method allows a two-parameter property, value syntax. According to the spec, the property can be a CSS custom property name string, in which case the method should return true:

CSS.supports( '--foo', 'red' ); // true

Safari, however, returns false, despite custom property support. The WebKit bug has been around since 2016 with no sign of progress: https://bugs.webkit.org/show_bug.cgi?id=154669. I've verified it still happens in Safari 14.1 on macOS... assuming iOS is the same.

The single-parameter syntax `CSS.supports( '(--foo: red)' ) is recognized and returns true.

I can submit a PR, but I wasn't sure if this should be added to the "bugs" array, or if a note would be better... and if so, whether all Safari versions ≥ 9 should be set to partial support.

Schweinepriester commented 3 years ago

I can submit a PR, but I wasn't sure if this should be added to the "bugs" array, or if a note would be better... and if so, whether all Safari versions ≥ 9 should be set to partial support.

I think a note including the link to https://bugs.webkit.org/show_bug.cgi?id=154669 for all Safari versions ≥ 9 would be a good start, maybe @Fyrd will comment on the PR then. Changing to partial from there would be easy.


Technically duplicate of #3853.