- From: François REMY <fremycompany_pub@yahoo.fr>
- Date: Thu, 14 Jun 2012 21:23:04 +0200
- To: "Divya Manian" <manian@adobe.com>, "Sylvain Galineau" <sylvaing@microsoft.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "Chris Eppstein" <chris@eppsteins.net>
- Cc: <www-style@w3.org>
| No browser should use a user-defined variable to implement a feature (for | example: Using current syntax: var-hover-color: red; should never be | parsed and rendered to apply to all elements which go to hover state). | Currently all browsers that claim to implement CSS are required to parse | and applt properties defined in CSS specs (e.g. 'Background-color'). | | [...] | | I think there are sufficient differences to merit defining variable as an | entirely new definition without piggybacking on CSS properties. Not the same arguments again and again :-( CSS user-defined prooperties are CSS properties the same way HTML's data attributes are HTML attributes. - HTML Attributes usually have to be defined in a spec - HTML Attributes usually have an effect on the element rendering or behavior - HTML data-* attributes are framework-defined user-provided attributes which have NO effect on page rendering/behavior. --> they use similar mechanisms as CSS variables to affect the document indirectly. --> and yet they are still HTML attributes. You can find more about this in my 'June 4' summary [1] | Typically variables have a default value that is set to inherit/none or | one of the options that the property can take. In this case, the default | value used to be a mysterious invalid, but is now an empty string. I do | not know of any css property that has this default value. The first time we introduced 'auto' as a default value for a property, there was also no property having 'auto' as default value before. I don't see why 'my-prop: ;' can't be a good default for a property. This is not forbidden per spec, and this makes sense. | What I fear is that we will soon find new usecases for variables that | would suddenly alter our perception of what they are and then we would | want to alter the definition of a property to accommodate for the new use | case and then a whole lot of bikeshedding will occur on whether this | existing property should be altered and then 100 people will chime in on | how it will break everything that exists on the web. The use cases include things I already mentioned in my previous summary on the matter. You should read it. I agree there can be more use-cases we're yet to find but I don't see how a user-defined property approach is going to hurt them since this is actually how things will work at the implementation level. Hiding that behind a layer will not change that fact. [1] http://lists.w3.org/Archives/Public/www-style/2012Jun/0050.html
Received on Thursday, 14 June 2012 19:23:34 UTC