W3C home > Mailing lists > Public > www-style@w3.org > May 2008

[css3-background] background-size: <length>

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 14 May 2008 22:12:19 -0700
Message-ID: <482BC633.9080608@inkedblade.net>
To: www-style@w3.org

The current spec says that
   background-size: <length> | <percentage> | auto
is equivalent to
   background-size: <length> | <percentage> | auto auto
i.e. that the specified value always applies to the width only.

I think it would make more sense if, when only one value is specified,
it was applied to both the width and the height. For backgrounds there's
no strong reason for the sizing to be width-primary: in many cases the
height is primary. Now most images are not square: any behavior we choose
for handling a single length will be totally arbitrary. But for percentages
I think it will make more sense.

For example
   background-size: 100%;
would stretch the background image to cover the whole area.

Thoughts?

~fantasai
Received on Thursday, 15 May 2008 05:12:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:06 GMT