- From: François REMY <francois.remy.dev@outlook.com>
- Date: Fri, 14 Mar 2014 09:56:47 +0100
- To: "Andrew Fedoniouk" <news@terrainformatica.com>, "Marat Tanalin" <mtanalin@yandex.ru>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style list" <www-style@w3.org>
> I am with Marat here: we just shall allow any arbitrary property name
> that is not known to the given CSS processor to be treated as custom
> property
That's simply impossible. Imagine some library would have used the
"transform" property to provide 2d transforms. Now, browsers decide to
support "transform" and start to honnour the property (validate syntax
according to the new specification and drop invalid rules, apply scaling at
the browser level, and have other side effects...). How can a page using the
library still continue to work properly? It can't.
The only way we could accept this is by allowing authors do "declare" their
custom properties so that the browser stop to recognize them as normal
properties even if they can. That's out of scope for the current CSS Custom
Properties level (but I don't see why we could not envision such a change in
a further revision, if we think it's worth (I think there are valid reasons
you may want to declare your custom properties, but those reasons only make
sense once CSS-CP L2 & typing strategies)).
> and to have prop() "functionoid" that will allow to refer any property,
> like:
> div { border-color: red; color: prop(border-color); }
Yes, we should. But, again, this is out of scope for the current iteration
of Custom Properties because it would require some unwanted implementation
overhead. There will be no problem to add this to CSS Custom Properties L2,
though, if we can convince implementors it's worth; at least for now it's a
too big change.
> I do remember that IE6 supported arbitrary named CSS properties and sky
> didn't
> fall since when.
IE still do. I use this for my polyfills by the way (which improves the
performance dramatically in IE).
By the way, I got hurt by the exact issue I described before for my
[css-regions] polyfill. IE11 started to support "break-before" and some
demos relying on the polyfill stopped working in IE because the stylesheets
contained "break-before: region" which IE11 doesn't recognize and dropped
(demos using "break-before: always" continued to work, however).
Received on Friday, 14 March 2014 08:57:15 UTC