W3C home > Mailing lists > Public > www-style@w3.org > November 2013

[css-regions] responsive menu demo

From: Alan Stearns <stearns@adobe.com>
Date: Mon, 25 Nov 2013 13:20:58 -0800
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <CEB8FF3A.341B7%stearns@adobe.com>
Hey all,

At TPAC I demoed a responsive UI solution using CSS Regions [1]. The demo
link did not make it into the minutes, which was my fault (too much
demoing, not enough documenting). So for anyone who wanted to take a look
themselves, try this out in a regions-enabled browser:


The idea is that you have a navigation bar with a number of elements that
may or may not fit on the screen. When the screen does not have enough
width to show all of the elements, they move to a menu on the right. You
can see this pattern on a Guardian site [2], and it is also used in Google
Docs in the toolbar. These sites use JavaScript to measure and move
elements to and from the navigation bar and the menu.

If you put the elements into a named flow, then create a region chain
consisting of the navigation bar and an auto-sized box in the menu, then
you donšt need any script to achieve this effect. The fragmentation rules
place as many elements as will fit in the bar, and flow the rest into the
menu. Note that in the Guardian site, there are additional items in the
menu. So this is an example of the need to chain non-sibling boxes



[1] http://lists.w3.org/Archives/Public/www-style/2013Nov/0370.html
[2] http://www.theguardian.com/world?view=mobile
Received on Monday, 25 November 2013 21:21:25 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:34 UTC