W3C home > Mailing lists > Public > www-style@w3.org > July 2013

RE: [cssom] Identifying types and shorthand and unsupported properties

From: François REMY <francois.remy.dev@outlook.com>
Date: Sat, 13 Jul 2013 20:06:43 -0700
Message-ID: <DUB405-EAS4229C4D8047690007A048F8A5660@phx.gbl>
To: "'Sylvain Galineau'" <galineau@adobe.com>, "'Tab Atkins Jr.'" <jackalmage@gmail.com>, "'Leif Arne Storset'" <lstorset@opera.com>
CC: "'www-style list'" <www-style@w3.org>, <mail@rodneyrehm.de>
± >> As a polyfill author I want to know about unsupported properties. Tab
± >> made the argument that you could use custom var- properties for that,
± >> but that would require the CSS author to provide (unnecessary)
± >> duplicate definition. I wouldn't want this exposed as a regular
± >> property, rather accessible through a separate list from
± >> CSSStyleDeclaration. (We will always be "fixing" stuff for older
± >> browsers)
± >
± >This just isn't going to happen, sorry. [it's a waste of memory]

Using custom properties to the same use case would use the same amount of memory, FWIW, and certainly more processing power due to inheritance and stuff. I'm to use a variable for backwards polyfilling purposes, it's very likely I'll add * { property: var(property); var-property: var(undefined); } in my stylesheet...

± It's already happened in IE for many, many years. Unknown properties are
± added to the style object as an expando. So if you have:
± #something {
± 	foo: bar;
± }
± …then document.getElementById('something').style.foo returns "bar".

I'm not 100% sure about that one. I know for sure that if you do <el style="foo: bar"> in IE, that works, and also that you can access the value at the CSSDeclaration level if it's in a stylesheet, but I don’t think the cascade enter in action at any point for those expandos. We may want to double-check that.

It could be possible to instruct the browser to keep some properties even if he does not understand them, as an opt-in:

    @polyfill background-3d-distance { 
        cascade: true; 
        inherit: false; 
        initial: 0px 

That would however only work at a style-sheet level (if you have multiple stylesheets, you need to specify this in each one of them, before any declaration).

Received on Sunday, 14 July 2013 03:07:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC