Re: [CSS 2.1] [Section 10.3.3] Questions on width of block-level, non-replaced elements in normal flow

On 24/08/2010 20:31, Gérard Talbot wrote:
> Hello,
> 
> I am not very familiar with section 10.3.3 and its equation and rules on
> handling over-constrained values/situations.
> 
> "
> The following constraints must hold among the used values of the other
> properties:
> 
>     'margin-left' + 'border-left-width' + 'padding-left' + 'width' +
> 'padding-right' + 'border-right-width' + 'margin-right' = width of
> containing block
> "
> 
> coming from section 10.3.3:
> http://www.w3.org/TR/CSS21/visudet.html#blockwidth
> 
> 1-
> Is this testcase correct?
> 
> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/block-non-replaced-width-008.html
> 
> I mean here
> a) there should be no red
> b) the calculations given in the source code are correct
> 
> That test has its own importance because, right now, there is diverging
> implementations among browsers.

Looks right to me.  Who's getting this wrong?


> 2-
> The spec says:
> "
> If there is exactly one value specified as 'auto', its used value follows
> from the equality.
> "
> 
> What if the one single specified value as 'auto' is width and complying
> with the equation would imply that the used width is negative... How could
> this be?
> 
> E.g.:
> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/block-non-replaced-width-0xx.html
> 
> I must be missing something here...

You're missing the same thing that I did: min-width and some tentative
magic ;-)

http://lists.w3.org/Archives/Public/www-style/2010Apr/0529.html

As I said therein, I really would prefer a note in the introduction to
10.3 (and by analogy, 10.6), such as the following:

   | The used value for 'width' calculated according to the rules in this
   | section is tentative, being subject to the rules in 10.4.

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Tuesday, 24 August 2010 22:21:13 UTC