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: Fri, 13 Jul 2012 12:58:26 -0400
Message-ID: <2955016644743801300@unknownmsgid>
To: Řyvind Stenhaug <oyvinds@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>
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 13, 2012, at 11:47 AM, "Řyvind Stenhaug" <oyvinds@opera.com> wrote:

> On Fri, 13 Jul 2012 14:30:15 +0200, Mike Sherov <mike.sherov@gmail.com> wrote:
>
>> On Jul 13, 2012, at 7:58 AM, "Řyvind Stenhaug" <oyvinds@opera.com> wrote:
>>
>>> On Thu, 12 Jul 2012 21:46:56 +0200, Glenn Adams <glenn@skynav.com> wrote:
>>>
>>>> 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
>>>
>>> Not quite, I think. I don't see any part of CSS 2.1 that defines the used value of bottom/left/right/top for non-positioned elements.
>>>
>>
>> What does Opera currently return in that case? "auto"?
>
> Well, nothing will give you the used value per current specs. But for getComputedStyle, yes, "auto". So does IE, Firefox and Chrome.
>
>> That's an
>> interesting question, although I personally am not concerned about it,
>> because asking for position values on non-positioned elements doesn't
>> *seem* useful to me.
>
> Content can end up relying on a lot of strange things (possibly in an indirect fashion), if it happened to "work" when the author tested it.
>
> Anyway, the point is that while computed values are reasonably well defined, used values generally are not. So if the bottom/left etc properties are simply added to the CSSOM list alongside height etc, the definition would be incomplete.
>
>> If I ever saw a bug report in jquery from a user saying "I am getting
>> a nonsensical response from .css('left') from position:static
>> elements", I'd close it and say "insane inputs produce insane
>> outputs".
>>
>> With all that said, if I needed to define it, I'd return 0 on
>> position:static, or whatever the easiest thing to do here is. Again,
>> for me, it's about pragmatism. Anyone asking for CSS position on
>> non-positioned elements deserve nonsense in response :)
>
> But in the browser world, it's not necessarily the developer who will face the consequences. Maybe it's the user who happens to be using something that the developer didn't test.
>
> Interoperability is good, specs leaving things undefined is not. Sure, if it really is an unimportant case, picking whatever's easiest will work. But it should define *something*, just in case. That's my opinion :)

I'm with you. +1. Let's define it! I was just saying that I selfishly
dont care about that use case :)

>
> --
> Řyvind Stenhaug
> Core Norway, Opera Software ASA
Received on Friday, 13 July 2012 16:58:59 GMT

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