- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 18 May 2011 09:51:25 -0700
- To: Phil Cupp <pcupp@microsoft.com>
- Cc: David Hyatt <hyatt@apple.com>, "www-style@w3.org CSS" <www-style@w3.org>
On Tue, May 17, 2011 at 6:53 PM, Phil Cupp <pcupp@microsoft.com> wrote: > Would anyone strongly oppose eliminating the grid-cell pseudo-element (would also imply the removal the grid-template property) from the Grid spec? Personally I find the grid-template property (modeled after template layout) and the grid-cell pseudo-element (modeled after the template layout ::slot concept) to be elegant, but I'm having trouble defending the need for the creation of a pseudo-structure to gather and layout related elements when I only have scenarios where a real containing element seems equally elegant and semantically correct. I would. 'grid-template' is an exceedingly useful property for concisely and intuitively describing a page's layout. That said, I'd be okay with *only* having named grid-cell pseudos generated by 'grid-template', and knocking out the anonymous grid-cells. There are several reasons why you still want grid-cell pseudos rather than an explicit container. One is very recent - when you're using Regions, you want to flow into varying numbers and shapes of columns depending on the screen size, and adjust this via media queries. This works wonderfully with grid-cell pseudos, as you can just apply a particular template to the <body> or whatever based on media queries, and flow accordingly. An older use-case that I came up with when we were still discussing Template was that of blog sidebars. Depending on screen size, I want my blog to be 2-column or 3-column, and flow the various widget-y things differently based on that. I can't just make two containers and put them atop each other in the 2-col case, either - say I have some really important things (contact info and archives, frex) that I want to be as high as possible in the page. In 2-col they're the first two things in the sidebar, but in 3-col they should each be at the top of a column. ~TJ
Received on Wednesday, 18 May 2011 16:52:13 UTC