Re: [cssom] Proposing a getDefaultComputedStyle method

On Fri, Oct 12, 2012 at 12:46 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 10/12/12 3:42 PM, Tab Atkins Jr. wrote:
>> #2 can't easily use the 'default' value, but it seems like it would
>> also be easy to just maintain a list of tagnames that are
>> display:inline by default.
>
> You mean the ones that are _not_, I hope?  ;)

I thought about negating my sentence, since unknown elements are
inline, but decided not to worry about it. ^_^

> But no, it's not easy to maintain that if you want to take user stylesheets
> into account, for obvious reasons.  Not to mention that such a list would be
> very brittle as new tags get added.

True.

Oh, I didn't realize you wanted to still take user stylesheets into
account.  That makes sense, but it wasn't obvious at first.

(That implies that the 'default' value should probably do the same.
Less sure what it should do in user stylesheets, though - revert the
user styles, sure, but apply author styles or not?)

So, I think this function has a reasonable use-case.  I support it.

~TJ

Received on Friday, 12 October 2012 19:54:12 UTC