- From: Anton Prowse <prowse@moonhenge.net>
- Date: Fri, 13 Jul 2012 08:50:51 +0200
- To: www-style@w3.org
- CC: Glenn Adams <glenn@skynav.com>, Mike Sherov <mike.sherov@gmail.com>
On 12/07/2012 21:46, Glenn Adams 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. That's definitely not the case. The two values induce different behaviour. > 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 Indeed. It makes sense that we expect the "absolute value" of a property that represents a length to be a length. The value 'auto', when defined for such properties, typically means "figure out the appropriate value yourself in some sensible way". Whereas the behaviour of 'auto' for the other properties you mention in your post is typically /not/ the behaviour you get if you choose any of the other values from the value set. (I deliberately chose z-index for my example because its values are typically integers, so at first glance one might expect the absolute value of 'auto' to be an integer. The case is even clearer for 'overflow', where 'auto' is simply one of several keywords.) In short, we use 'auto' in two different ways, and the approach to used value needs to differ accordingly. > 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? No idea, but I'll file this for errata if no-one can shed any light on it. Cheers, Anton Prowse http://dev.moonhenge.net
Received on Friday, 13 July 2012 06:51:22 UTC