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

Re: [css3-gridalign] Named cells, intuitive creation of page grids

From: David Hyatt <hyatt@apple.com>
Date: Tue, 02 Nov 2010 15:15:31 -0500
Cc: www-style list <www-style@w3.org>
Message-id: <E63D6A68-C22B-4670-8B91-6BCF85000B13@apple.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On Nov 2, 2010, at 4:51 AM, Tab Atkins Jr. wrote:

> One of the most powerful parts of Template Layout was, in my opinion,
> the ascii-art template that allowed the author to immediately *see*
> what the page's layout would look like.  It was extremely intuitive
> and simple, though it did tend to trigger a bit of backlash at first
> sight, particularly from programmer types.  Most people warmed up to
> it as soon as they actually tried to use it, though.
> 
> I believe this is fundamentally compatible with Grid Alignment.  All
> that the template has to do is create slot pseudoelements, and
> position them within the grid.  This works great within Grid
> Alignment, where grid rows/columns can be defined, but elements can be
> positioned outside of the defined rows/columns without problem - it
> just creates new columns and rows explicitly.
> 
> So, for example, one could draw out a relatively simple layout like so:
> 
> body {
>  grid-template: "abb"
>                 "acc"
>                 "d@e"
>                 "dff";
> }
> 
> This would automatically create a 4x3 grid and 7 ::slot() pseudos,
> positioning them appropriately within the grid.
> 
> All of the rows and columns are "auto" length, though, which may be
> suboptimal.  Using the other Grid Alignment properties, you can
> provide more control here:
> 
> body {
>  grid-template: "abb"
>                 "acc"
>                 "d@e"
>                 "dff";
>  grid-rows: 50px 70px 1fr auto;
>  grid-columns: 200px 1fr min-content;
> }
> 
> You now have two choices for positioning.  You can either flow items
> into the ::slot() pseudos, or you can position items using
> grid-position.  The two don't conflict at all - either are potentially
> useful.  You could even extend the grid further by positioning items
> outside the 4x3 grid already defined; the effects of this are
> well-defined and predictable from the Grid Alignment spec.

Yeah, I agree that it would be good to bring over named cells.

In addition I would love to see @page grid templates preserved as well.  That is another very powerful feature of CSS3 Template Layout that could be compatible with Grid Alignment.

dave
Received on Tuesday, 2 November 2010 20:16:11 GMT

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