Re: [csswg-drafts] [all] Feature detection for CSS property support on certain elements (#4498)

To make it crystal clear, what made me raise this issue is `clip-path`, which is a property initially only supported on SVG elements, but later also applied to HTML elements. Nowadays, most modern browsers support this property on both SVG and HTML element, except the legacy Edge, which supports it only on SVG. This makes it practically impossible to do feature detection for this, and we would have to do UA-sniffing, which is unfortunate.

<details>

<summary>The reason that we need to diverge on this is ...</summary> because there are various browser bugs involving, especially WebKit has a relatively poor support for SVG elements on some aspects which my colleague and I have filed several bugs for. So we want to avoid touching SVG elements in some cases but instead using `clip-path` on HTML whenever possible. But this doesn't work for the legacy Edge.

</details>

This case makes me think that this is a problem CSS should solve, given [the guideline](https://w3ctag.github.io/design-principles/#feature-detect) from TAG. But I totally understand that it could be rather hard, and I don't really have a perfect solution for this.

I file this issue basically just want to raise the concern of this problem, and kick off discussion about this.

-- 
GitHub Notification of comment by upsuper
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4498#issuecomment-551628780 using your GitHub account

Received on Friday, 8 November 2019 11:31:57 UTC