RE: CSSStyleDeclaration#length and shorthands.

Glenn Adams:
> My current thinking, on which I would like to hear from other commenters,
> is that CSSStyleDeclaration.length should include all non-ignored shorthand

Can you elaborate on what "non-ignored shorthand properties" means?

> properties that are declared in the associated CSS declaration block; i.e., if
> CSSStyleDeclaration.cssText includes 5 non-ignored properties, of either
> longhand or shorthand form, then length should be 5. This would apply to
> both border:inherit (CSS2...) and border:initial (CSS3) if the appear in cssText.

Example E
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<script>function OnLoad() { alert(document.getElementsByTagName("div")[0].style.background); }</script>
<body onload="OnLoad();"><div style="background: none 0% 0% / auto repeat scroll padding-box border-box transparent"/></body>

Example F
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<script>function OnLoad() { alert(document.getElementsByTagName("div")[0].style.background); }</script>
<body onload="OnLoad();"><div style="background: none"/></body>

IE9's implementation reflects my understanding of CSS3 Background and CSSOM at the time.

For both examples E and F, the alert displays "none".

If you're suggesting that that should be changed, I find that troubling.

If you're suggesting something else, clarification would be lovely.

Received on Tuesday, 31 January 2012 19:26:31 UTC