1
1
<pre class='metadata'>
2
2
Title : CSS Grid Layout Module Level 1
3
- Status : ED
4
- Work Status : Testing
5
3
Shortname : css-grid
6
4
Level : 1
5
+ Status : ED
6
+ Work Status : Testing
7
7
Group : csswg
8
- ED : https://drafts.csswg.org/css-grid/
9
8
TR : https://www.w3.org/TR/css-grid-1/
9
+ ED : https://drafts.csswg.org/css-grid-1/
10
+ Issue Tracking : Disposition of Comments https://drafts.csswg.org/css-grid-1/issues
11
+ Issue Tracking : CSSWG GitHub https://github.com/w3c/csswg-drafts/issues?q=is%3Aopen+is%3Aissue+label%3Acss-grid-1
10
12
Implementation Report : https://wpt.fyi/results/css/css-grid
13
+ WPT Path Prefix : css/css-grid/
11
14
Editor : Tab Atkins Jr., Google, http://www.xanthir.com/contact/, w3cid 42199
12
15
Editor : Elika J. Etemad / fantasai, Apple, http://fantasai.inkedblade.net/contact, w3cid 35400
13
16
Editor : Rossen Atanassov, Microsoft, ratan@microsoft.com, w3cid 49885
14
17
Editor : Oriol Brufau, Igalia, obrufau@igalia.com, w3cid 108473
15
18
Former editor : Alex Mogilevsky, Microsoft Corporation, alexmog@microsoft.com
16
19
Former editor : Phil Cupp, Microsoft Corporation, pcupp@microsoft.com
17
- Issue Tracking : Disposition of Comments https://drafts.csswg.org/css-grid-1/issues
20
+
18
21
Abstract : This CSS module defines a two-dimensional grid-based layout system, optimized for user interface design. In the grid layout model, the children of a grid container can be positioned into arbitrary slots in a predefined flexible or fixed-size layout grid.
19
22
Ignored Terms : auto, grid-*-start, grid-*-end, flex factor, flex factors, grid-auto-position
20
23
Ignored Vars : A, B, C, size-contribution, track-sizes, extra-space
21
24
Link Defaults : css2 (property) margin/min-height/max-height/min-width/max-width, css-align-3 (value) stretch/baseline, css-position-3 (property) left, css-position-3 (property) position, css-writing-modes-3 (dfn) start/end
22
25
At Risk : application of grid placement to absolutely-positioned boxes
23
- WPT Path Prefix : css/css-grid/
24
26
Ignore MDN Failure : valdef-grid-template-columns-minmax
25
27
Ignore MDN Failure : subgrids
26
28
</pre>
27
29
28
- <pre class=" link-defaults" >
30
+ <pre class=link-defaults>
29
31
spec:css-align-3;
30
32
type:value;
31
33
text:center; for:align-self;
@@ -34,6 +36,7 @@ spec:css-align-3;
34
36
text:space-between; for:justify-content
35
37
text:space-around; for:justify-content
36
38
type:property; text:column-gap
39
+ type: value; for:column-gap; text:normal
37
40
type:dfn; text:alignment baseline
38
41
spec:css-break-3; type:dfn; text:fragment
39
42
spec:css-flexbox-1;
@@ -851,7 +854,7 @@ Establishing Grid Containers: the ''display/grid'' and ''inline-grid'' 'display'
851
854
852
855
<dt> <dfn>inline-grid</dfn>
853
856
<dd>
854
- This value causes an element to generate an <a>grid container</a> box
857
+ This value causes an element to generate a <a>grid container</a> box
855
858
that is <a>inline-level</a> when placed in <a>flow layout</a> .
856
859
</dl>
857
860
@@ -1112,7 +1115,6 @@ Grid Items</h2>
1112
1115
for the corresponding axis.
1113
1116
(See [[CSS2#q10.0]] .)
1114
1117
1115
-
1116
1118
: ''align-self/stretch''
1117
1119
::
1118
1120
Use the [=inline size=] calculation rules for non-replaced boxes
@@ -1457,7 +1459,7 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
1457
1459
1458
1460
These properties specify,
1459
1461
as a space-separated <dfn export>track list</dfn> ,
1460
- the line names and <a>track sizing functions</a> of the <a>grid</a> .
1462
+ the [= line names=] and <a>track sizing functions</a> of the <a>grid</a> .
1461
1463
The 'grid-template-columns' property specifies the <a>track list</a> for the grid's columns,
1462
1464
while 'grid-template-rows' specifies the <a>track list</a> for the grid's rows.
1463
1465
@@ -1475,7 +1477,7 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
1475
1477
<dt> <dfn id="track-listing"><<track-list>> | <<auto-track-list>></dfn>
1476
1478
<dd>
1477
1479
Specifies the <a>track list</a> as a series of <a>track sizing functions</a>
1478
- and line names.
1480
+ and [= line names=] .
1479
1481
Each <dfn dfn lt="track sizing function|sizing function">track sizing function</dfn> can be specified as a length,
1480
1482
a percentage of the <a>grid container</a> ’s size,
1481
1483
a measurement of the contents occupying the column or row,
@@ -1706,7 +1708,8 @@ Naming Grid Lines: the <css>[<<custom-ident>>*]</css> syntax</h4>
1706
1708
<h4 id='repeat-notation'>
1707
1709
Repeating Rows and Columns: the ''repeat()'' notation</h4>
1708
1710
1709
- The <dfn>repeat()</dfn> notation represents a repeated fragment of the <a>track list</a> ,
1711
+ The <dfn for="<track-repeat>,<auto-repeat>,<fixed-repeat>">repeat()</dfn> notation
1712
+ represents a repeated fragment of the <a>track list</a> ,
1710
1713
allowing a large number of columns or rows that exhibit a recurring pattern
1711
1714
to be written in a more compact form.
1712
1715
@@ -1939,9 +1942,11 @@ Computed Value of a Track Listing</h4>
1939
1942
1940
1943
* a ''minmax()'' functional notation representing a single track's size,
1941
1944
with each <<length-percentage>> computed
1945
+ (a <dfn noexport>computed track size</dfn> )
1942
1946
* a ''repeat()'' functional notation representing a repeated track list section,
1943
1947
with its <<integer>> computed
1944
1948
and its <<track-list>> represented as a [=computed track list=]
1949
+ (a <dfn>computed repeat notation</dfn> )
1945
1950
1946
1951
<!--
1947
1952
████████ ████████ ██████ ███████ ██ ██ ██ ████████ ████████
@@ -2241,7 +2246,7 @@ Explicit Grid Shorthand: the 'grid-template' property</h3>
2241
2246
<div class='example'>
2242
2247
<pre> grid-template: auto 1fr / auto 1fr auto;</pre>
2243
2248
2244
- is equivalent to
2249
+ is equivalent to
2245
2250
2246
2251
<pre>
2247
2252
grid-template-rows: auto 1fr;
@@ -2411,11 +2416,14 @@ Implicit Track Sizing: the 'grid-auto-rows' and 'grid-auto-columns' properties</
2411
2416
</pre>
2412
2417
2413
2418
<figure>
2414
- <img src="images/auto-flow.svg" alt="" width=530 height=530>
2415
- <figcaption> A 2×2 grid with one explicit 20px×20px grid cell
2416
- in the first row+column
2417
- and three additional cells resulting from the implicit 40px column and row
2418
- generated to hold the additional grid items.
2419
+ <img src="images/auto-flow.svg" alt="" width=530 height=530>
2420
+ <figcaption>
2421
+ A 2×2 grid with
2422
+ one explicit 20px×20px grid cell in the first row+column
2423
+ and three additional cells resulting from
2424
+ the implicit 40px column and row generated
2425
+ to hold the additional grid items.
2426
+ </figcaption>
2419
2427
</figure>
2420
2428
</div>
2421
2429
@@ -3043,7 +3051,7 @@ Line-based Placement: the 'grid-row-start', 'grid-column-start', 'grid-row-end',
3043
3051
3044
3052
<figure>
3045
3053
<img src="images/implicit-lines-search.svg" width=600>
3046
- <figcaption> An illustration of the result.
3054
+ <figcaption> An illustration of the result.</figcaption>
3047
3055
</figure>
3048
3056
</div>
3049
3057
@@ -3582,7 +3590,7 @@ Aligning with <a value for="margin">auto</a> margins</h3>
3582
3590
3583
3591
<li>
3584
3592
Overflowing [=grid items=] resolve their ''margin/auto'' margins to zero
3585
- and ''justify-self/start'' -align within their [=containing block=] .
3593
+ and overflow as specified by their <a>box alignment properties</a> .
3586
3594
</ul>
3587
3595
3588
3596
<h3 id='row-align'>
@@ -3666,7 +3674,7 @@ Aligning the Grid: the 'justify-content' and 'align-content' properties</h3>
3666
3674
Note that certain values of 'justify-content' and 'align-content'
3667
3675
can cause the tracks to be spaced apart
3668
3676
(''justify-content/space-around'' , ''justify-content/space-between'' , ''justify-content/space-evenly'' )
3669
- or to be resized (''< content-distribution>/stretch'' ).
3677
+ or to be resized (''< content-distribution>/stretch'' ).
3670
3678
If the <a>grid</a> is <a>fragmented</a> between tracks,
3671
3679
any such additional spacing between those tracks must be suppressed.
3672
3680
@@ -3695,13 +3703,13 @@ Aligning the Grid: the 'justify-content' and 'align-content' properties</h3>
3695
3703
<img src="images/spanned-gap.svg"
3696
3704
alt="Grid with 10px gap and an element spanning all columns.
3697
3705
The sum of the columns is less than the width of the grid container." height="426" width="500">
3698
- <figcaption> Grid before alignment</figure >
3706
+ <figcaption> Grid before alignment</figcaption >
3699
3707
</figure>
3700
3708
<figure>
3701
3709
<img src="images/spanned-gap-align.svg"
3702
3710
alt="Same grid with increased gaps absorbing the excess grid container width.
3703
3711
The spanning element has grown to accommodate the extra space assigned to the gap it crosses." height="426" width="500">
3704
- <figcaption> Grid after alignment</figure >
3712
+ <figcaption> Grid after alignment</figcaption >
3705
3713
</figure>
3706
3714
3707
3715
Note that alignment (unlike 'gap' spacing)
@@ -4340,7 +4348,7 @@ Resolve Intrinsic Track Sizes</h3>
4340
4348
when items span across multiple tracks.
4341
4349
This algorithm embodies a number of heuristics
4342
4350
which have been seen to deliver good results on real-world use-cases,
4343
- such as the “game”̣ examples earlier in this specification.
4351
+ such as the “game” examples earlier in this specification.
4344
4352
This algorithm may be updated in the future
4345
4353
to take into account more advanced heuristics as they are identified.
4346
4354
@@ -4713,6 +4721,16 @@ Sample Fragmentation Algorithm</h3>
4713
4721
overflow the grid.
4714
4722
</p>
4715
4723
4724
+ Privacy Considerations {#privacy}
4725
+ ===============================================
4726
+
4727
+ Grid Layout introduces no new privacy leaks.
4728
+
4729
+ Security Considerations {#security}
4730
+ =================================
4731
+
4732
+ Grid Layout introduces no new security considerations.
4733
+
4716
4734
<h2 class="no-num" id="acks">
4717
4735
Acknowledgements</h2>
4718
4736
@@ -5197,7 +5215,7 @@ Major Changes</h4>
5197
5215
</ul>
5198
5216
</ins>
5199
5217
5200
- <p><ins> Otherwise, the used <a>automatic minimum size</a> is <del> otherwise</del> zero, as usual.</p>
5218
+ <p><ins> Otherwise,</ins> the used <a>automatic minimum size</a> is <del> otherwise</del> zero, as usual.</p>
5201
5219
</blockquote>
5202
5220
5203
5221
<wpt>
@@ -5265,12 +5283,14 @@ Minor Changes</h4>
5265
5283
<dt><del> A <a>flexible sizing function</a> </del>
5266
5284
<dd>
5267
5285
<del> Use the track’s initial <a>base size</a> as its initial <a>growth limit</a> .</del>
5286
+ </dl>
5268
5287
</blockquote>
5269
5288
<blockquote>
5270
5289
<ul>
5271
5290
<li>
5272
5291
<del> treating <a>flexible tracks</a> as having
5273
- an infinite <a>growth limit</a>
5292
+ an infinite <a>growth limit</a> </del>
5293
+ </ul>
5274
5294
</blockquote>
5275
5295
This change is purely editorial; it should have no effect on implementations.
5276
5296
@@ -5297,7 +5317,7 @@ Minor Changes</h4>
5297
5317
<ol>
5298
5318
<li>
5299
5319
<p><ins> Find the first (last) row of the [=grid container=]
5300
- containing at least one [=grid item=] .
5320
+ containing at least one [=grid item=] .</ins>
5301
5321
5302
5322
<p><del> If any of the <a>grid items</a> whose areas intersect the <a>grid container</a> ’s first (last) row
5303
5323
participate in <a>baseline alignment</a> ,</del>
@@ -5563,7 +5583,8 @@ Clarifications</h4>
5563
5583
5564
5584
<p class=note> Note: If the affected size was a <a>growth limit</a>
5565
5585
<ins> and the track is not marked [=infinitely growable=] ,
5566
- then each |item-incurred increase| will be zero.
5586
+ then each |item-incurred increase| will be zero</ins>
5587
+ <del> this step has no effect</del> .
5567
5588
</blockquote>
5568
5589
</ul>
5569
5590
@@ -5738,7 +5759,7 @@ Significant Adjustments and Fixes</h4>
5738
5759
Note: Since <a>grid items</a> whose own size
5739
5760
depends on the size of an intrinsically-sized track
5740
5761
[[#row-align|do not participate in baseline alignment]] ,
5741
- they are not shimmed.
5762
+ they are not shimmed.</p>
5742
5763
</ins>
5743
5764
</blockquote>
5744
5765
@@ -5887,7 +5908,7 @@ Significant Adjustments and Fixes</h4>
5887
5908
<blockquote>
5888
5909
As a <a>block-level</a> box in a <a>block formatting context</a> ,
5889
5910
it is sized like a <a>block box</a> that establishes a formatting context,
5890
- with an ''auto'' <a>inline size</a> calculated as for <del> in-flow</del><ins> non-replaced</a > block boxes.
5911
+ with an ''auto'' <a>inline size</a> calculated as for <del> in-flow</del><ins> non-replaced</ins > block boxes.
5891
5912
</blockquote>
5892
5913
<li id="change-2016-tracks-before">
5893
5914
Fixed error in pattern repetition for finding <a>implicit grid track</a> sizes.
@@ -5973,17 +5994,6 @@ Clarifications</h4>
5973
5994
<li> Miscellaneous trivial fixes and minor editorial improvements.
5974
5995
</ul>
5975
5996
5976
-
5977
- Privacy Considerations {#privacy}
5978
- ===============================================
5979
-
5980
- Grid Layout introduces no new privacy leaks.
5981
-
5982
- Security Considerations {#security}
5983
- =================================
5984
-
5985
- Grid Layout introduces no new security considerations.
5986
-
5987
5997
<wpt ignore>
5988
5998
abspos/absolute-positioning-changing-containing-block-001.html
5989
5999
abspos/absolute-positioning-definite-sizes-001.html
0 commit comments