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

Re: [css3-box] box-sizing on width and height

From: Andrey Mikhalev <amikhal@abisoft.spb.ru>
Date: Fri, 15 Feb 2008 12:47:44 +0300 (MSK)
To: fantasai <fantasai.lists@inkedblade.net>
cc: www-style@w3.org
Message-ID: <Pine.LNX.4.63.0802151239100.21257@master.abisoft.spb.ru>


> So I propose adding the keywords 'content-box' and 'border-box' to 'width'
> and 'height', to be used in conjunction with a length or percentage. (If
> specified, it overrides 'box-sizing'; otherwise 'box-sizing' is honored.)
>
> Like this:
>
>  width: border-box 50%;
> or
>  width: 50% border-box;

imo incomplete without min/max-w/h (what else in family?)
what about
width: 50border-box-percent;
;)

>
> The advantages are
>  - only affects this declaration, so if other width declarations
>    in the style sheet are expecting content-box sizing, they get
>    what they expect
>  - doesn't require me to hard-code border width and padding values
>    into the width declaration
>  - my width declaration is ignored by browsers that don't support
>    the box-sizing switch, so I can give a fallback width if that's
>    appropriate
>
> ~fantasai
>
>
>
Received on Friday, 15 February 2008 09:48:17 GMT

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