This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
spec:css3-grid-layout [2012/08/08 08:23] – pcupp | spec:css3-grid-layout [2014/12/09 15:48] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
This page contains material to facilitate discussion of issues surrounding the CSS3 Grid Layout module. | This page contains material to facilitate discussion of issues surrounding the CSS3 Grid Layout module. | ||
+ | < | ||
+ | This page is no longer used and exists only for historical reasons. | ||
+ | File issues by emailing www-style. | ||
+ | </ | ||
===== spec pointers ===== | ===== spec pointers ===== | ||
Line 8: | Line 12: | ||
Link to current Editor' | Link to current Editor' | ||
+ | |||
+ | ===== Issues for San Diego, 2012 F2F Meeting ===== | ||
+ | |||
+ | === Issues for Discussion ==== | ||
+ | == Removal of named lines == | ||
+ | - Problems created through competing syntax of lines and templates | ||
+ | - Named lines must use strings to differentiate themselves from the idents of template layout. | ||
+ | - Named lines require 4 times the number of named things when compared to template layout, e.g. grid-area: area; vs. grid-area: " | ||
+ | - Named lines combined with template syntax make it hard to create an all-encompassing shorthand for the grid as the strings for lines are conflicting with the strings for template rows. | ||
+ | - Span properties allow the author to specify the size of an item independent of its position, while lines (named or otherwise) are only denoting an ending position. | ||
+ | - Specifying a (span) length for an auto placed grid item can't be done using the line syntax | ||
+ | - Arguments in favor of named lines is that they allow aliasing of positions even if grid items are overlapping (templates can't do that). | ||
+ | - Proposal is to remove named lines. | ||
+ | |||
+ | Example showing named areas versus named lines: | ||
+ | <!-- Named areas using template property --> | ||
+ | <style type=" | ||
+ | @media (orientation: | ||
+ | #grid { | ||
+ | display: grid; | ||
+ | | ||
+ | /* The rows, columns and areas of the grid are defined visually using the */ | ||
+ | /* grid-template property. | ||
+ | /* The number of words in a string determines the number of */ | ||
+ | /* columns. Note the number of words in each string must be identical. | ||
+ | grid-template: | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | /* Columns and rows created with the template property can be assigned a sizing */ | ||
+ | /* function with the grid-definition-columns and grid-definition-rows properties. */ | ||
+ | grid-definition-columns: | ||
+ | grid-definition-rows: | ||
+ | } | ||
+ | } | ||
+ | @media (orientation: | ||
+ | #grid { | ||
+ | display: grid; | ||
+ | | ||
+ | /* Again the template property defines areas of the same name, but this time */ | ||
+ | /* positioned differently to better suit a landscape orientation. | ||
+ | grid-template: | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | grid-definition-columns: | ||
+ | grid-definition-rows: | ||
+ | } | ||
+ | } | ||
+ | /* The grid-area property places a grid item into named region (area) of the grid. */ | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | #controls { grid-area: ctrls } | ||
+ | </ | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | <!-- Same markup using named line syntax instead --> | ||
+ | <style type=" | ||
+ | @media (orientation: | ||
+ | #grid { | ||
+ | display: grid; | ||
+ | | ||
+ | grid-definition-columns: | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | |||
+ | grid-definition-rows: | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | @media (orientation: | ||
+ | #grid { | ||
+ | display: grid; | ||
+ | | ||
+ | grid-definition-columns: | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | |||
+ | grid-definition-rows: | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | /* The grid-area property places a grid item into region of the grid identified by */ | ||
+ | /* top, right, bottom and left grid lines. */ | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | #controls { grid-area: " | ||
+ | </ | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | <div id=" | ||
+ | </ | ||
+ | |||
+ | |||
+ | == Anonymous grid items and positioning == | ||
+ | Latest ED incorporates text from latest Flexbox draft. Given the code below: | ||
+ | |||
+ | <div id=”container” style=”display: | ||
+ | Text before | ||
+ | <div id=”gridItem”> | ||
+ | Text after | ||
+ | </ | ||
+ | |||
+ | - In the current draft we mimic flexbox behavior. | ||
+ | - Here's the behavior when grid-auto-flow is columns: {{: | ||
+ | - Here's a proposed change in behavior where the grid element has its entire contents placed in a default anonymous grid item and then grid items are pulled out of the default grid item's flow by specifying a grid-row/ | ||
+ | - There is also proposal just like the last but allowing descendants of the grid (not just children) to become valid grid items by specifying a grid-column/ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | # | ||
+ | label{grid-column: | ||
+ | input{grid-column: | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | <form id=”container” style=”display: | ||
+ | <ul> | ||
+ | <li> | ||
+ | <label id=" | ||
+ | <input type=" | ||
+ | </li> | ||
+ | <li> | ||
+ | <label id=" | ||
+ | <input type=" | ||
+ | </li> | ||
+ | <li> | ||
+ | <label id=" | ||
+ | <input type=" | ||
+ | </li> | ||
+ | </ul> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Proposal is to postpone positioning of descendant grid item until level 2, when this issue can be more fully worked through. | ||
+ | |||
+ | == Shorthand naming == | ||
+ | - Was: Grid-rows, Grid-columns | ||
+ | - Now: Grid-definition-rows, | ||
+ | - Alternative: | ||
+ | |||
+ | === Other Status === | ||
+ | - Template now takes < | ||
+ | - Automatic placement updated | ||
+ | - Corrected issues in algorithm | ||
+ | - Adopted forward-only approach without backfilling items | ||
+ | - Added new shorthand properties | ||
+ | |||
+ | === Next Steps === | ||
+ | - Planning to add gutters using column/ | ||
+ | - Also adding support for rules centered in gutters (rules don't take up space just like multi-column) | ||
+ | - Work on remaining issues | ||
+ | |||
===== Issues for August 8th, 2012 Telcon ===== | ===== Issues for August 8th, 2012 Telcon ===== |