W3C home > Mailing lists > Public > www-style@w3.org > January 2012

RE: CSSStyleDeclaration#length and shorthands.

From: Brian Manthos <brianman@microsoft.com>
Date: Tue, 31 Jan 2012 19:25:02 +0000
To: Glenn Adams <glenn@skynav.com>
CC: "www-style@w3.org" <www-style@w3.org>, Alexis Menard <alexis.menard@openbossa.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D170EB2EEB3@TK5EX14MBXC264.redmond.corp.microsoft.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:49 GMT