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

Re: [cssom] Proposing a getDefaultComputedStyle method

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 14 Oct 2012 08:17:19 -0700
Message-ID: <CAAWBYDA+WQ9PS49v6xho_d1TEGkmsveewMMtsYDmp1xoMrYxBA@mail.gmail.com>
To: Mike Sherov <mike.sherov@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Sat, Oct 13, 2012 at 7:51 PM, Mike Sherov <mike.sherov@gmail.com> wrote:
>> Yeah, like I said, *that* use-case can be handled well by the new
>> "default" global value that we've discussed adding, which is like
>> "initial" but only resets one "level" of stylesheets, rather than
>> going back all the way to absolute starting values.
>
> Sorry, I'm dense. What do you mean by one "level"? In the use case
> I've described, why wouldn't "initial" be sufficient and only
> "default" would?

'initial' sets the property to the 'initial value' defined in the
property definition.  This is the same for all elements; for
'display', for example, it's 'inline'.

What you want instead is the "initial value before author styles are
applied".  This means you want the UA stylesheet to apply, so that
<div> returns 'block' for 'display'.

Given the use-case, it seems like we probably also want to allow user
styles to apply, so that we're interpreting the 'default' value as
just "what the value would be if there were no author stylesheets".

~TJ
Received on Sunday, 14 October 2012 15:18:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT