W3C home > Mailing lists > Public > www-style@w3.org > March 2015

[css-flexbox] Understanding flexbox-flex-direction-column.htm

From: Christian Biesinger <cbiesinger@google.com>
Date: Tue, 24 Mar 2015 20:48:14 -0400
Message-ID: <CAPTJ0XFe4EjT6=EcjHswH0=tTzGMD2kLNgTk62_6ksTcYbg7RQ@mail.gmail.com>
To: www-style list <www-style@w3.org>
Hi there!

I was looking at this test:
http://hg.csswg.org/test/file/218b5e6fddbe/css-flexbox-1/flexbox-flex-direction-column.htm
http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/flexbox-flex-direction-column.htm

And I'm trying to understand why the behavior it expects is correct.
Here is my reasoning:

- We have min-width auto. Therefore, we need to calculate the min-content height
- Because we have line-height: 40px, the min-content height is 40px
- 40px > 38px, so the height property does not get applied

- Now, we apply the algorithm in
http://dev.w3.org/csswg/css-flexbox/#min-size-auto
clamped size: The computed flex-basis is auto (the default). So the
clamped size is undefined
content size: No min/max sizes. So content size is 40px, as mentioned above

-> Each flex item has a content height of 40px, so a border-box height of 42px

This is too high for the test. It expects exactly 40px of border-box
height. Why is that correct?

(Same question, of course, for
css-flexbox-1/flexbox-flex-direction-column-reverse.htm)

Thanks!
-christian
Received on Wednesday, 25 March 2015 00:48:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC