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

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

From: Sylvain Galineau <galineau@adobe.com>
Date: Sat, 13 Jul 2013 22:23:58 -0700
To: François REMY <francois.remy.dev@outlook.com>, "'Tab Atkins Jr.'" <jackalmage@gmail.com>, "'Leif Arne Storset'" <lstorset@opera.com>
CC: "'www-style list'" <www-style@w3.org>, "mail@rodneyrehm.de" <mail@rodneyrehm.de>
Message-ID: <CE078216.7E2E%galineau@adobe.com>


On 7/13/13 8:06 PM, "François REMY" <francois.remy.dev@outlook.com> wrote:

>± >> 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.

This example certainly works. The feature is definitely super simple and
for polyfilling it does the job.

>
>
>
>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).
>
>
>Thoughts?

Well, if this rule can be at the end of all your stylesheets then you'd
better keep all the properties if you don't want to reparse...

Received on Sunday, 14 July 2013 05:24:36 UTC

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