W3C home > Mailing lists > Public > www-style@w3.org > April 2014

Re: [css-cascade][cssom] Used value of non-applying properties?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 17 Apr 2014 10:57:54 -0700
Message-ID: <CAAWBYDBYfB3aPfPd_M92iXmQ9Nouw=sCKiHpa29+GPjRM9BZVQ@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On Thu, Apr 17, 2014 at 1:46 AM, Simon Pieters <simonp@opera.com> wrote:
> On Tue, 15 Apr 2014 21:22:58 +0200, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>
>> On Mon, Apr 14, 2014 at 7:57 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>>
>>> On 4/14/14 5:26 PM, Tab Atkins Jr. wrote:
>>>>
>>>>
>>>> CSSOM currently defines that if the property applies to the element,
>>>> the resolved value is the used value; otherwise it's the computed
>>>> value.  This gets around the issue, and fits with what Cascade says.
>>>> However, only WebKit/Blink do this.  FF and IE appear to return the
>>>> layout'd size of the element for width/height, at least.
>>>
>>>
>>> Er...  Firefox definitely returns the computed value for .width on the
>>> computed style of a non-replaced inline (modulo some min-width/max-width
>>> interactions), and similar for height.
>>>
>>> It might help if you made it clear which exact cases you tested here and
>>> how.
>>
>>
>> Hm, I'll let zcorpan chime in here - he was telling me that testing
>> 'width' on an inline returns the layouted width in Firefox.
>
>
> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2950
>
> I now get "auto" in Gecko/Blink/IE, including older versions, but Presto
> gives the width in pixels. I guess I misremembered or was confused about
> which browser I was testing, sorry about that.

So it sounds like we're good, then?  Browsers seem to apply the CSSOM
rules, which prevents you from seeing the used value of properties
that don't apply, so there's no inconsistency with the Cascade
sentence?

(We'd still need to define something for .usedStyle, but I'm happy for
that to be the computed value for things that don't apply.)

~TJ
Received on Thursday, 17 April 2014 17:58:43 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:39 UTC