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

Re: [CSS2.1][CSSOM] "Used Value" and "auto"

From: Mike Sherov <mike.sherov@gmail.com>
Date: Thu, 12 Jul 2012 17:43:41 -0400
Message-ID: <1870703761757037833@unknownmsgid>
To: Glenn Adams <glenn@skynav.com>
Cc: Anton Prowse <prowse@moonhenge.net>, "www-style@w3.org" <www-style@w3.org>
I can discuss this all day! A few browsers still return "auto" for "auto"
margins, and a few return "normal" for letterSpacing, font-weight, etc.

The definition of the computed value for these properties isn't as
important as specifying that resolved value for these properties is used
value, and that used value is a number.

What can I do to help, if this is a direction we want to go in, besides for
just filing bugs against the browsers to this effect?

Mike Sherov
Lead Programmer
SNAP Interactive, Inc.
Ticker: STVI.OB

Sent Via Mobile: Please excuse my grammar, tone, and punctuation. My thumbs
can't create flowery prose.

On Jul 12, 2012, at 3:47 PM, Glenn Adams <glenn@skynav.com> wrote:


On Thu, Jul 12, 2012 at 12:09 PM, Anton Prowse <prowse@moonhenge.net> wrote:

> On 12/07/2012 15:29, Glenn Adams wrote:
>
>> On Thu, Jul 12, 2012 at 2:12 AM, Glenn Adams <glenn@skynav.com> wrote:
>>
>>>
>>> On Thu, Jul 12, 2012 at 12:35 AM, Mike Sherov <mike.sherov@gmail.com
>>> >wrote:
>>>
>>>  The crux of my question is this: is "auto" considered a "used value"? If
>>>> not, should it be converted to pixels for top/left/bottom/right (like
>>>> FF13)?
>>>>
>>>
>>>
>>> Yes.
>>>
>>>
>> Sorry, I meant No, auto (or percentage) is not a used value.
>>
>
> I'm sure it's obvious to all concerned, but anyway for the record: 'auto'
> is of course a valid used value for /some/ properties, eg 'z-index'.
>

Indeed, and CSSOM should make this explicit. I just reviewed all properties
that take 'auto' as a specified value in CSS2.1, and the following appear
to support use of 'auto' as a used value (= computed value in these cases):

clip
cursor
overflow
page-break-after
page-break-before
page-break-inside
play-during
table-layout
z-index

In these properties, used value = computed value in all cases, that is,
unless one wishes to argue that the used value for z-index='auto' is 0.

In contrast, the following length valued properties that accept 'auto' have
a distinct used value when display is not none:

bottom
height
left
right
top
width

This discussion also begs the same question about 'normal' with respect to:

letter-spacing
line-height
word-spacing

CSSOM Section 8 already lists line-height as using the 'used value' as the
resolved value, but does not list {letter,word}-spacing, which, by
symmetry, should get the same treatment.

I notice that these last two have different specifications for "computed
value" in CSS2.1 [1].

for letter-spacing:
*Computed value:*   'normal' or absolute length
for word-spacing:
*Computed value:*   for 'normal' the value 0; otherwise, the absolute length

I wonder if this is an error, i.e., that letter-spacing should specify the
same definition for computed value as for word-spacing. Does anyone know if
this difference is intentional, and if so, then what is the rationale?

[1] http://www.w3.org/TR/CSS2/text.html#spacing-props
Received on Thursday, 12 July 2012 21:44:07 GMT

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