You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-grid/Overview.bs
+59-8Lines changed: 59 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -3058,14 +3058,68 @@ Find the Size of an ''fr''</h4>
3058
3058
<h2 id='pagination'>
3059
3059
Fragmenting Grid Layout</h2>
3060
3060
3061
-
Grid containers break across fragment containers (fragmentainers) [[!CSS3-BREAK]] between
3062
-
grid rows. The break-* properties do not apply to grid areas. When fragmentating grid containers
3063
-
the goal is to minimize the number of grid areas that get fragmented due to their grid row
3064
-
being fragmented.
3061
+
3062
+
<p>
3063
+
<a>Grid containers</a> can break across pages
3064
+
between rows
3065
+
and inside items.
3066
+
The <a property lt="break-before">break-*</a> properties apply to grid containers
3067
+
as normal for the formatting context in which they participate.
3068
+
This section defines how they apply to grid items
3069
+
and the contents of grid items.
3070
+
3071
+
<p>
3072
+
The following breaking rules refer to the fragmentation container as the “page”.
3073
+
The same rules apply to any other fragmentation containers.
3074
+
(Substitute “page” with the appropriate fragmentation container type as needed.)
3075
+
See the CSS3 Fragmentation Module [[!CSS3-BREAK]].
3076
+
3077
+
<p>
3078
+
The exact layout of a fragmented grid container is not defined in this level of Grid Layout.
3079
+
However, breaks inside a grid container are subject to the following rules:
3080
+
3081
+
<ul>
3082
+
<li>
3083
+
The 'break-before' and 'break-after' properties on flex items
3084
+
are propagated to their grid row.
3085
+
The 'break-before' property on the first row
3086
+
and the 'break-after' property on the last row
3087
+
are propagated to the grid container.
3088
+
3089
+
<li>
3090
+
A forced break inside a grid item effectively increases the size of its contents;
3091
+
it does not trigger a forced break inside sibling items.
3092
+
3093
+
<li>
3094
+
<a href="http://www.w3.org/TR/css3-break/#btw-blocks">Class A break opportunities</a> occur between rows,
3095
+
and <a href="http://www.w3.org/TR/css3-break/#end-block">Class C break opportunities</a> occur between the first/last row and the flex container's content edges.
3096
+
[[!CSS3-BREAK]]
3097
+
3098
+
<li>
3099
+
When a grid container is continued after a break,
3100
+
the space available to its <a>grid items</a>
3101
+
(in the block flow direction of the fragmentation context)
3102
+
is reduced by the space consumed by grid container fragments on previous pages.
3103
+
The space consumed by a grid container fragment is
3104
+
the size of its content box on that page.
3105
+
If as a result of this adjustment the available space becomes negative,
3106
+
it is set to zero.
3107
+
3108
+
<li>
3109
+
Aside from the rearrangement of items imposed by the previous point,
3110
+
UAs should attempt to minimize distortation of the grid container
3111
+
with respect to unfragmented flow.
3112
+
</ul>
3113
+
3065
3114
3066
3115
<h3 id="fragmentation-alg">
3067
3116
Sample Fragmentation Algorithm</h3>
3068
3117
3118
+
<p class="issue">
3119
+
This is just a rough draft.
3120
+
This section needs to be severely cross-checked with the [[CSS3-FLEXBOX]] algorithm.
3121
+
Feedback overall is welcome; please reference the rules above instead as implementation guidance.
3122
+
3069
3123
<ol>
3070
3124
<li>
3071
3125
Layout the grid following the <a section href="#layout-algorithm"></a> by using the
Layout the grid container using the values resolved in the previous step.
3077
3131
3078
-
<li>
3079
-
If a grid row extends past the current fragment and it is not the first grid row in
3080
-
this fragment; push it to the next fragment. Do this even if the grid row has no items.
3081
-
3082
3132
<li>
3083
3133
If a grid area dimensions change due to fragmentation (do not include items that
3084
3134
span rows in this decision), increase the grid row as necessary for rows that either:
@@ -3131,6 +3181,7 @@ Changes</h2>
3131
3181
<a href=http://www.w3.org/TR/2014/WD-css3-grid-layout-20140513/>13 May 2014 Working Draft</a>.
3132
3182
3133
3183
<ul>
3184
+
<li>Added first draft of grid container <a href="#pagination">fragmenting rules</a>.
3134
3185
<li>Applied 'align-content' and 'justify-content' to the <a>grid tracks</a> rather than to the <a>grid</a> as a monolithic unit, to allow justification of grid items across the grid container.
3135
3186
<li>Removed <css>stack</css> value from 'grid-auto-flow'.
3136
3187
<li>Added ''auto'' keyword to ''repeat()'' function for auto-filled tracks.
0 commit comments