48 messages in org.w3.www-styleRe: Publishing the flexible box model
FromSent OnAttachments
L. David BaronJun 3, 2008 9:48 pm 
Alan GresleyJun 3, 2008 11:56 pm 
L. David BaronJun 4, 2008 12:22 am 
Anne van KesterenJun 4, 2008 1:12 am 
David HyattJun 4, 2008 1:46 pm 
Andrew FedonioukJun 4, 2008 5:50 pm 
L. David BaronJun 4, 2008 6:04 pm 
David HyattJun 4, 2008 6:54 pm 
Andrew FedonioukJun 4, 2008 8:09 pm.h
L. David BaronJun 4, 2008 10:23 pm 
L. David BaronJun 4, 2008 10:48 pm 
Andrew FedonioukJun 4, 2008 11:39 pm 
Andrew FedonioukJun 5, 2008 12:32 am 
Alan GresleyJun 5, 2008 12:34 am 
Robert O'CallahanJun 6, 2008 3:44 am 
fantasaiJun 6, 2008 8:12 am 
Andrew FedonioukJun 6, 2008 9:06 am 
Anne van KesterenJun 6, 2008 9:40 am 
Andrew FedonioukJun 6, 2008 9:54 am 
fantasaiJun 6, 2008 12:41 pm 
Andrew FedonioukJun 6, 2008 1:00 pm 
Robert O'CallahanJun 6, 2008 1:43 pm 
Andrew FedonioukJun 6, 2008 3:48 pm 
Robert O'CallahanJun 7, 2008 2:30 am 
Alan GresleyJun 7, 2008 7:24 am 
Alan GresleyJun 7, 2008 7:48 am 
Brad KemperJun 7, 2008 10:03 am 
Andrew FedonioukJun 7, 2008 1:34 pm 
Andrew FedonioukJun 7, 2008 2:46 pm 
Alan GresleyJun 7, 2008 8:56 pm 
Robert O'CallahanJun 9, 2008 5:48 pm 
Andrew FedonioukJun 9, 2008 7:22 pm 
Robert O'CallahanJun 9, 2008 7:59 pm 
L. David BaronJun 9, 2008 8:29 pm 
Andrew FedonioukJun 9, 2008 9:24 pm 
Andrew FedonioukJun 9, 2008 9:55 pm 
Robert O'CallahanJun 9, 2008 10:04 pm 
Andrew FedonioukJun 10, 2008 12:02 am 
Robert O'CallahanJun 10, 2008 1:46 am 
Alan GresleyJun 10, 2008 2:19 am 
Alan GresleyJun 10, 2008 2:35 am 
Alan GresleyJun 10, 2008 2:50 am 
Andrew FedonioukJun 10, 2008 12:58 pm 
Robert O'CallahanJun 10, 2008 2:34 pm 
Andrew FedonioukJun 10, 2008 4:07 pm 
Andrew FedonioukJun 10, 2008 4:30 pm 
Andrew FedonioukJun 10, 2008 4:39 pm 
Mike WilsonJun 12, 2008 4:46 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Publishing the flexible box modelActions...
From:Andrew Fedoniouk (ne@terrainformatica.com)
Date:Jun 10, 2008 4:30:42 pm
List:org.w3.www-style

Alan Gresley wrote:

Andrew Fedoniouk wrote:

Robert O'Callahan wrote:

[...]

How do flexunits interact with absolute positioning and auto top/left? Is the hypothetical position for the content computed taking flexunit margins/padding on the content into account?

Yes.

Here is a screenshot if you wish: http://terrainformatica.com/htmlayout/images/css-menus.png

And here its style system:

/* top level menu band */ menu { flow:horizontal; /* top level menu is a horizontal bar */ width:max-intrinsic; padding-right:1*; /* spring on the right - all items sticked to the left */ }

menu li { display: block; /* menu items are blocks*/ position:relative; /* to make our popup relative to this one */ height:1*; /* all items in the menu bar have the same height */ padding:2px 4px; }

menu li:hover { background-color:navy; color:white; }

menu menu { flow: vertical; /* popup menus are vertically replaced */ min-width:100%; /* at least it is caption wide */ position:absolute; /* out of normal flow */ display:none; /* non-visible normally */ }

menu > li:hover > menu { display: block; /* now it is visible */ }

Andrew, this I have done without flex.

http://css-class.com/articles/ursidae/bears3.htm

You cannot reproduce this with floats strictly speaking.

Key point here is height:1*;

menu li { display: block; /* menu items are blocks*/ height:1*; /* all items in the menu bar have the same height */ padding:2px 4px; }

height:1*; means that all li's will have the same height - height of content of the menu (minus that vertical paddings).

And if you say: menu li { display: block; /* menu items are blocks*/ margin-top:1*; } then all elements will be aligned to the bottom of the container.

Floats simply have no concept of vertical alignment.

When I bump the text up in all implementations the whole menus system grows until it flows out of the viewpoint. Flex used this way breaks basic accessibility principles. How can this work with a monitor with a screen resolution of 800 by 600 pixels?

If you need to wrap such blocks on multiple rows then you will use:

menu { flow: horizontal-flow; }

that will create as many row boxes as needed to show its content in full for the given width. Height of each row box is maximum height of elements in the row. Thus you can vertically align elements in these rows too.

There is also such thing as menu { flow: vertical-flow; } that will do the same but in vertical direction - children will form columns expanding width of the container.

http://terrainformatica.com