CSS3 box-sizing property (resend with smaller patch).
Bert Bos
bert at w3.org
Fri Nov 5 16:34:03 GMT 2004
On Thursday 04 November 2004 15:23, Allan Sandfeld Jensen wrote:
> Hi!
>
> Just wanted to get peoples opinion before commiting my next patch
> that implements the suggested CSS3 property box-sizing.
> It already exists in MacIE and Opera, and in Mozilla under
> -moz-box-sizing, but it seems it is only luke-warm for CSS3.
> It is used for manually telling which box-model the webpage is using.
> The old WinIE (border-box) or the CSS standard one (content-box).
Correct. More precisely, there are two reasons that 'box-sizing' is
proposed for CSS3:
1. It helps WinIE recover from the bug in the previous version.
2. It is useful for styling certain things with borders and fixed
widths, such as buttons.
The argument against 1 is:
- The longer we wait, the less necessary it becomes. It may already
not be a big deal anymore, as designers who still have to support
WinIE5 use other workarounds.
The argument against 2 is:
- A property that works indirectly, by modifying another, is not very
user-friendly and doesn't cascade well: setting 'box-sizing' without
setting 'width' at the same time is dangerous.
- We (the CSS WG) are also working on simple expressions
(e.g., 'width: 50% - 2em' or 'width: 10em + 4px')
If we decide to go that way, 'box-width' will be redundant.
I'd say the chances of 'box-sizing' going into CSS3 are currently 50-50.
(The chance of 'box-width' and 'box-height' going into CSS3 is much
lower. It's more likely that we add either expressions or 'box-sizing'.
But let us hear your preference, CC www-style at w3.org, please.)
My advice would be: if you have sufficient time & people to implement
'box-sizing' functionality, by all means go ahead.
But please don't call it 'box-sizing' until the property has "Candidate
Recommendation" status in W3C. You'll only confuse people (and you
won't be conformant to CSS 2.1). Call it '-moz-box-sizing', if Mozilla
is OK with that, or '-khtml-box-sizing'.
Bert
--
Bert Bos ( W 3 C ) http://www.w3.org/
http://www.w3.org/people/bos W3C/ERCIM
bert at w3.org 2004 Rt des Lucioles / BP 93
+33 (0)4 93 65 76 92 06902 Sophia Antipolis Cedex, France
More information about the kfm-devel
mailing list