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

> Both `text-transform` and `font-family` are inheritable, the fact that only the latter applies to SVG elements shouldn't prevent both from inheriting through. That's how I understand it anyway.

That's a good point. Inherited properties may be a problem if we want to rely on they can be passed through unsupported elements.

> Also consider that CSS can apply to any namespace, not just HTML and SVG. Namespace-based magic is a bad idea IMHO.

I'm not calling for a "magic". It's more about something that editors should be taking into consider.

There are existing practices, for example, `content` property should always compute to `normal` when applied on an element (rather than a pseudo-element) in CSS 2 (although it's not quite respected).

Also browser's style engine already has the infrastructure to do all kinds of fixups on computation stage based on element tag / namespace or value of certain properties. One such example is `display: contents`, which may compute to `none` on a given list of elements.

> Assuming that a property either applies or doesn't apply to certain kinds of elements seems to simplistic. There are various cases in which some values of a property don't apply to certain kinds of elements, but other values of the same property do.

Yeah, I understand that there are complicated cases, thus I mentioned that existing ones may need to be discussed case by case.

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

Received on Friday, 8 November 2019 11:15:46 UTC