Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
spec:css3-grid-layout [2011/11/22 12:35] – mmielke | spec:css3-grid-layout [2011/12/04 15:00] – mmielke |
---|
| |
===== Issues ===== | ===== Issues ===== |
==== Issue 1: === | ==== Issue 1: ==== |
Grid-layer vs. z-index property for Grid | Grid-layer vs. z-index property for Grid |
| |
| == Summary: == |
| |
Grid-layer is currently used to control the stacking of grid items in a grid element; one example of this would be using Grid to build a range control where the "thumb" of the control is displayed on top of the underlying track. However, grid-layer is in many ways similar to the existing z-index property. Is a separate property needed, or can z-index replace the grid-layer property? | Grid-layer is currently used to control the stacking of grid items in a grid element; one example of this would be using Grid to build a range control where the "thumb" of the control is displayed on top of the underlying track. However, grid-layer is in many ways similar to the existing z-index property. Is a separate property needed, or can z-index replace the grid-layer property? |
| |
==== Issue 2: === | == Proposal: == |
Updating the fractional algorithm to deal with shrink-to-fit grid elements | |
| Z-index should be used to replace the grid-layer property. Specifically, in cases where Grid Items overlap, z-index provides control over the drawing order of Grid Items. Both Grid elements and Grid Items generate a stacking context as described for floats (step 5, section 14) in the [[http://www.w3.org/TR/2007/WD-css3-box-20070809/#stacking|CSS3 Box Model]]. Note that this would imply that z-index applies to statically positioned Grid Items. |
| |
| Note also that this change has been [[http://lists.w3.org/Archives/Public/www-style/2011May/0344.html|previously discussed]] on the www-styling mailing list. |
| |
| ==== Issue 2: ==== |
| Fractional-track sizing algorithm update |
| |
| == Summary: == |
| |
The current spec does not define how fractionally-sized grid items are sized when the grid element is shrink-to-fit. This needs to be defined in the spec. | The grid-sizing algorithm introduced in the previous [[http://dev.w3.org/csswg/css3-grid-align|Editor's Draft]] did not define the expected behavior for sizing a fractionally-sized track (e.g. 1fr, 2fr,...) when a Grid Element was shrink-to-fit. This should be addressed so that future implementations of Grid Layout behave predictably across platforms. |
| |
One use case that should be considered is where fractionally-sized-tracks intersect with spanning elements, as in the image below. | == Proposal: == |
| |
{{:spec:span_and_fraction_track_size.png?200|}} | We propose to modify the existing grid sizing algorithm as follows: if the Grid Element is shrink-to-fit, then the algorithm follows its current path. However, if the Grid Element is not shrink-to-fit, then we set the size of a fractional track (i.e. determine the size of a '1fr' track) by making sure that 1) the proportions of all fractional tracks are preserved (e.g. a '1fr' track is half the size of a '2fr' track) and 2) fractional tracks are large enough contain all Grid Items that span them. The specific algorithm updates can be found in step 6 of the updated Editor's Draft. |
| |
| |
| |
| |
| |