W3C home > Mailing lists > Public > www-style@w3.org > June 2010

flexible grid requirements

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Mon, 7 Jun 2010 06:10:47 +0000
To: www-style list <www-style@w3.org>
CC: David Hyatt <hyatt@apple.com>, Tab Atkins Jr. <jackalmage@gmail.com>
Message-ID: <5258A1A783764C478A36E2BC4A9C497E17D0D450@tk5ex14mbxc106.redmond.corp.microsoft.com>
I have thought a lot about what a good new grid layout could be like. Considering how complex the topic is, I would like to start with a list of requirements and goals. Hopefully if we agree on goals it will be easier to agree on specific proposals.



The topic is complicated, there are many contradictory influences; we can say it is over-specified from the start. Therefore I fully expect that some of goals/requirements/intentions listed here will not make it to any spec or implementation; otherwise it may not be viable.



I will use “must”, “should” and “may” in somewhat informal way here.



Goals:

1.       A successful “grid” must provide a superset of capabilities of grid portion of Template Layout [1] and Grid Positioning [2].

2.       “Grid” should address use cases of XUL grid [3].

3.       “Grid” should address use cases of grid frameworks, such as 960 grid [5]

4.        “Grid” should integrate well with flex-box and multi-column layout

5.       It is not a goal for “grid” to provide a full replacement for tables.

6.       It is out of scope of this list to suggest if “grid” should to be a separate module or an extension of existing one(s).



Requirements:



1.       A “grid” is a ‘display’ value, a coordinate system applicable to some or all blocks, or both.

It will be a simpler model if “display:grid” is the only way to have a grid. However multicolumn layout has important us cases for grid positioning.

2.       A grid should provide a positioning system that allows positioning elements (absolute, floats, page floats) by specifying grid lines or grid units.

3.       It should be easy and intuitive to specify grids that match popular grid use (fixed and fluid grid, multicol layout)

4.       Addressing fractional grid units is desirable (e.g. to position to middle of column or gutter)

5.       Nested grids must be possible. It may or may not be required that a nested grid has any knowledge of parent grid.

6.       Size of grid rows and columns can be specified in fractions of available space.

7.       Size of grid rows and columns can depend on content of grid cells.

8.       Size-to-content algorithms and space distribution must be compatible with flex-box. It should be possible to model behavior of single-row grid with a flexbox and vice versa.

9.       A grid must allow column spans and row spans.

10.   Space distribution algorithm, including size-to-content column/row spans must be well documented and normative.

11.   It should be possible to automatically place a sequence of elements in rows or columns of the grid. Explicit row breaks or column breaks may not be required.

12.   It should be possible to “snap to grid”, either adjusting items that are placed in rows/columns based on how they fit, or adjusting position of blocks in normal flow (the latter is probably too complicated)

13.   It should be possible to apply properties to rows and columns that have effect on items in these rows/columns.

14.   Grid should support pagination in a reasonable way (hard to set solid requirements here)



I am sure I forgot something and some requirements are unnecessary. What do you think?



[1] http://www.w3.org/TR/css3-layout/


[2] http://dev.w3.org/csswg/css3-grid/


[3] https://developer.mozilla.org/en/XUL/grid


[4] http://dev.w3.org/csswg/css3-multicol/


[5] http://960.gs/




-----Original Message-----

From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Tab Atkins Jr.

Sent: Tuesday, June 01, 2010 10:06 AM



On Tue, Jun 1, 2010 at 9:20 AM, Alex Mogilevsky <alexmog@microsoft.com> wrote:

> ... I have

> some ideas here, will try to put something together soon.



That would be very interesting to see!



~TJ


Received on Monday, 7 June 2010 06:13:05 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:28 GMT