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

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 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"? 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.

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 :)

> --
> Øyvind Stenhaug
> Core Norway, Opera Software ASA
>

Received on Friday, 13 July 2012 12:30:52 UTC