Skip to content

Commit 09035f6

Browse files
authored
[css-gaps-1]: Introduce spec changes for *-inset-cap-* and *-inset-junction-* #13697 (#13842)
1 parent f9eba79 commit 09035f6

6 files changed

Lines changed: 121 additions & 52 deletions

css-gaps-1/Overview.bs

Lines changed: 121 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ Break behaviors at intersections: The 'column-rule-break', 'row-rule-break', and
982982
Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
983983

984984
<pre class='propdef'>
985-
Name: column-rule-edge-inset-start, column-rule-edge-inset-end, column-rule-interior-inset-start, column-rule-interior-inset-end, row-rule-edge-inset-start, row-rule-edge-inset-end, row-rule-interior-inset-start, row-rule-interior-inset-end
985+
Name: column-rule-inset-cap-start, column-rule-inset-cap-end, column-rule-inset-junction-start, column-rule-inset-junction-end, row-rule-inset-cap-start, row-rule-inset-cap-end, row-rule-inset-junction-start, row-rule-inset-junction-end
986986
Value: <<length-percentage>>
987987
Initial: ''0''
988988
Applies to: <a>grid containers</a>, <a>flex containers</a>, <a>multicol containers</a>, and <a>grid lanes containers</a>
@@ -994,18 +994,72 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
994994
These properties can be used to offset the start and end points of <a>gap decorations</a> relative to the
995995
<a>segment endpoints</a> which would normally determine where decorations start and end.
996996

997-
<p>An <dfn>edge segment endpoint</dfn> is any [=segment endpoint=] created at the content edges of the container.</p>
998-
<p>An <dfn>interior segment endpoint</dfn> is any [=segment endpoint=] created at a [=gap junction=].</p>
997+
<p>
998+
A <dfn>junction segment endpoint</dfn> is a [=segment endpoint=] at a [=gap junction=]
999+
where one or more other [=gap decoration segments=] are also present.
1000+
</p>
1001+
1002+
<p>
1003+
A <dfn>cap segment endpoint</dfn> is any [=segment endpoint=] that is not a [=junction segment endpoint=].
1004+
This includes endpoints at the container's content edges,
1005+
as well as endpoints at a [=gap junction=] where no other [=gap decoration segment=] is present.
1006+
</p>
1007+
1008+
1009+
<div class="example">
1010+
<pre>
1011+
.simple-grid {
1012+
rule-break: intersection;
1013+
rule-visibility-items: between;
1014+
}
1015+
</pre>
1016+
<figure>
1017+
<img alt="" src="images/example-cap-junct-simple-grid.png">
1018+
<figcaption>
1019+
In a fully populated grid, every interior [=gap junction=] produces [=junction segment endpoints=] (marked <b>J</b>),
1020+
while the container's content edges produce [=cap segment endpoints=] (marked <b>C</b>).
1021+
</figcaption>
1022+
</figure>
1023+
</div>
1024+
1025+
<div class="example">
1026+
<pre>
1027+
.simple-grid-with-empty-cells {
1028+
rule-break: intersection;
1029+
rule-visibility-items: between;
1030+
}
1031+
</pre>
1032+
<figure>
1033+
<img alt="" src="images/example-cap-junct-less-simple-grid.png">
1034+
<figcaption>
1035+
When a [=gap decoration segment=] terminates at an interior [=gap junction=]
1036+
where no other [=gap decoration segment=] is present,
1037+
its endpoint is a [=cap segment endpoint=].
1038+
</figcaption>
1039+
</figure>
1040+
</div>
1041+
1042+
<div class="example" id="example-cap-junction-donut">
1043+
<pre>
1044+
.donut-grid-layout {
1045+
rule-break: intersection;
1046+
rule-visibility-items: between;
1047+
}
1048+
</pre>
1049+
<figure>
1050+
<img alt="" src="images/example-cap-junct-donut-grid.png">
1051+
<figcaption>
1052+
In a "donut" grid layout, where items surround an empty space in the middle of the container,
1053+
endpoints bordering the empty interior region are [=cap segment endpoints=].
1054+
</figcaption>
1055+
</figure>
1056+
</div>
9991057

10001058
Percentages are resolved against the <dfn>crossing gap width</dfn>, defined as follows:
10011059
<dl>
10021060
<dt>
1003-
Edge segment endpoints
1004-
<dd>
1005-
The [=crossing gap width=] is ''0''.
1061+
Segment endpoints at a [=gap junction=]
10061062

1007-
<dt>
1008-
Interior segment endpoints
10091063
<dd>
10101064
The [=crossing gap width=] is the size of the [=gap junction=]
10111065
in the same dimension as the [=gap=] in which the [=segment endpoint=] lies
@@ -1017,16 +1071,29 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
10171071
However, in cases where [=gaps=] intersect or abut one another at overlapping intervals,
10181072
the [=crossing gap width=] will be determined by the union of such intervals.
10191073
See <a href="#example-unpaired-endpoints-1">this example</a> for one such case.
1074+
<dt>
1075+
Other segment endpoints
1076+
<dd>
1077+
The [=crossing gap width=] is ''0''.
10201078
</dl>
10211079

1080+
<p class="note">
1081+
Note: This classification by position is distinct from the
1082+
[=cap segment endpoint=] / [=junction segment endpoint=] classification.
1083+
A [=cap segment endpoint=] may sit at a container edge or at a [=gap junction=]
1084+
(see <a href="#example-cap-junction-donut">this example</a>). Hence,
1085+
''column-rule-inset-cap-start: 50%'' resolves to half the [=gap junction=]
1086+
size at an interior cap and ''0'' at other caps such as container edges.
1087+
</p>
1088+
10221089
<p>
1023-
The 'column-rule-edge-inset-start' and 'row-rule-edge-inset-start' properties apply to [=start segment endpoints=] that are [=edge segment endpoints=].
1024-
The 'column-rule-interior-inset-start' and 'row-rule-interior-inset-start' properties apply to [=start segment endpoints=] that are [=interior segment endpoints=].
1090+
The 'column-rule-inset-cap-start' and 'row-rule-inset-cap-start' properties apply to [=start segment endpoints=] that are [=cap segment endpoints=].
1091+
The 'column-rule-inset-junction-start' and 'row-rule-inset-junction-start' properties apply to [=start segment endpoints=] that are [=junction segment endpoints=].
10251092
For these properties, positive values offset in the [=end=] direction, and negative values offset in the [=start=] direction, along the axis of the gap.
10261093
</p>
10271094
<p>
1028-
The 'column-rule-edge-inset-end' and 'row-rule-edge-inset-end' properties apply to [=end segment endpoints=] that are [=edge segment endpoints=].
1029-
The 'column-rule-interior-inset-end' and 'row-rule-interior-inset-end' properties apply to [=end segment endpoints=] that are [=interior segment endpoints=].
1095+
The 'column-rule-inset-cap-end' and 'row-rule-inset-cap-end' properties apply to [=end segment endpoints=] that are [=cap segment endpoints=].
1096+
The 'column-rule-inset-junction-end' and 'row-rule-inset-junction-end' properties apply to [=end segment endpoints=] that are [=junction segment endpoints=].
10301097
For these properties, positive values offset in the [=start=] direction, and negative values offset in the [=end=] direction, along the axis of the gap.
10311098
</p>
10321099

@@ -1048,10 +1115,10 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
10481115
</div>
10491116

10501117
<wpt>
1051-
parsing/rule-edge-start-end-inset-computed.html
1052-
parsing/rule-edge-start-end-inset-invalid.html
1053-
parsing/rule-interior-start-end-inset-computed.html
1054-
parsing/rule-interior-start-end-inset-invalid.html
1118+
parsing/rule-inset-cap-start-end-computed.html
1119+
parsing/rule-inset-cap-start-end-invalid.html
1120+
parsing/rule-inset-junction-start-end-computed.html
1121+
parsing/rule-inset-junction-start-end-invalid.html
10551122
flex/flex-gap-decorations-011.html
10561123
flex/flex-gap-decorations-013.html
10571124
flex/flex-gap-decorations-014.html
@@ -1107,7 +1174,7 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
11071174
}
11081175
</pre>
11091176
<figure>
1110-
<img alt="" src="images/example-column-start-end-edge-interior-insets.png">
1177+
<img alt="" src="images/example-column-inset-start-end.png">
11111178
<figcaption>
11121179
A start inset of ''8px'' recedes the starts of [=gap decorations=],
11131180
while an end inset of ''0px'' aligns the ends of [=gap decorations=] with content edges.
@@ -1118,11 +1185,11 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
11181185
<pre class='propdef shorthand'>
11191186
Name: column-rule-inset-start, column-rule-inset-end, row-rule-inset-start, row-rule-inset-end
11201187
Value: <<length-percentage>>
1121-
Applies to: Same as 'column-rule-edge-inset-start', 'column-rule-interior-inset-start', 'column-rule-edge-inset-end', 'column-rule-interior-inset-end', 'row-rule-edge-inset-start', 'row-rule-interior-inset-start', 'row-rule-edge-inset-end', and 'row-rule-interior-inset-end'
1188+
Applies to: Same as 'column-rule-inset-cap-start', 'column-rule-inset-junction-start', 'column-rule-inset-cap-end', 'column-rule-inset-junction-end', 'row-rule-inset-cap-start', 'row-rule-inset-junction-start', 'row-rule-inset-cap-end', and 'row-rule-inset-junction-end'
11221189
</pre>
11231190

1124-
These [=shorthand properties=] set the corresponding ''-edge-'' and ''-interior-'' properties to the same value.
1125-
For example, 'column-rule-inset-start' sets both 'column-rule-edge-inset-start' and 'column-rule-interior-inset-start' to the same value.
1191+
These [=shorthand properties=] set the corresponding ''-cap-'' and ''-junction-'' properties to the same value.
1192+
For example, 'column-rule-inset-start' sets both 'column-rule-inset-cap-start' and 'column-rule-inset-junction-start' to the same value.
11261193

11271194
<pre class='propdef shorthand'>
11281195
Name: rule-inset-start
@@ -1148,63 +1215,63 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
11481215
parsing/rule-inset-start-end-valid.html
11491216
</wpt>
11501217

1151-
<h4 id="insets-edge-interior">
1152-
''-edge-'' and ''-interior-'' shorthands</h4>
1218+
<h4 id="insets-cap-junction">
1219+
''-cap-'' and ''-junction-'' shorthands</h4>
11531220

1154-
These shorthands allow authors to achieve different treatments at edge versus interior intersections.
1221+
These shorthands allow authors to achieve different treatments at [=cap segment endpoints=] versus [=junction segment endpoints=].
11551222

11561223
<div class="example">
11571224
<pre>
1158-
.inset-edge-0px-interior-negative-5px {
1159-
column-rule-edge-inset: 0px;
1160-
column-rule-interior-inset: -5px;
1225+
.inset-cap-0px-inset-junction-negative-5px {
1226+
column-rule-inset-cap: 0px;
1227+
column-rule-inset-junction: -5px;
11611228
column-rule-break: intersection;
11621229
}
11631230
</pre>
11641231
<figure>
1165-
<img alt="" src="images/example-column-interior-inset-5px.png">
1232+
<img alt="" src="images/example-column-inset-junction-5px.png">
11661233
<figcaption>
1167-
An interior inset of ''-5px'' extends the endpoints of interior <a>gap decorations</a>
1168-
slightly beyond the edges of adjacent items. An edge inset of ''0px'' aligns the endpoints of edge <a>gap decorations</a>
1169-
with the content edges.
1234+
A junction inset of ''-5px'' extends the endpoints of <a>gap decorations</a> at [=junction segment endpoints=]
1235+
slightly beyond the edges of adjacent items. A cap inset of ''0px'' aligns the endpoints of <a>gap decorations</a>
1236+
at [=cap segment endpoints=] with the content edges.
11701237
</figcaption>
11711238
</figure>
11721239
</div>
11731240

11741241
<pre class='propdef shorthand'>
1175-
Name: column-rule-edge-inset, column-rule-interior-inset, row-rule-edge-inset, row-rule-interior-inset
1242+
Name: column-rule-inset-cap, column-rule-inset-junction, row-rule-inset-cap, row-rule-inset-junction
11761243
Value: <<length-percentage>> [ <<length-percentage>> ]?
1177-
Applies to: Same as 'column-rule-edge-inset-start', 'column-rule-edge-inset-end', 'column-rule-interior-inset-start', 'column-rule-interior-inset-end', 'row-rule-edge-inset-start', 'row-rule-edge-inset-end', 'row-rule-interior-inset-start', and 'row-rule-interior-inset-end'
1244+
Applies to: Same as 'column-rule-inset-cap-start', 'column-rule-inset-cap-end', 'column-rule-inset-junction-start', 'column-rule-inset-junction-end', 'row-rule-inset-cap-start', 'row-rule-inset-cap-end', 'row-rule-inset-junction-start', and 'row-rule-inset-junction-end'
11781245
</pre>
11791246

11801247
These shorthands set the corresponding ''-start'' and ''-end'' properties.
1181-
For example, 'column-rule-edge-inset' sets both 'column-rule-edge-inset-start' and 'column-rule-edge-inset-end'.
1248+
For example, 'column-rule-inset-cap' sets both 'column-rule-inset-cap-start' and 'column-rule-inset-cap-end'.
11821249
If one value is specified, both properties are set to that value.
11831250
If two values are specified, ''-start'' is set to the first and ''-end'' is set to the second.
11841251

11851252
<pre class='propdef shorthand'>
1186-
Name: rule-edge-inset
1187-
Value: <<'column-rule-edge-inset'>>
1188-
Applies to: Same as 'column-rule-edge-inset' and 'row-rule-edge-inset'
1253+
Name: rule-inset-cap
1254+
Value: <<'column-rule-inset-cap'>>
1255+
Applies to: Same as 'column-rule-inset-cap' and 'row-rule-inset-cap'
11891256
</pre>
11901257

1191-
This [=shorthand property=] sets 'column-rule-edge-inset' and 'row-rule-edge-inset' to the same value.
1258+
This [=shorthand property=] sets 'column-rule-inset-cap' and 'row-rule-inset-cap' to the same value.
11921259

11931260
<pre class='propdef shorthand'>
1194-
Name: rule-interior-inset
1195-
Value: <<'column-rule-interior-inset'>>
1196-
Applies to: Same as 'column-rule-interior-inset' and 'row-rule-interior-inset'
1261+
Name: rule-inset-junction
1262+
Value: <<'column-rule-inset-junction'>>
1263+
Applies to: Same as 'column-rule-inset-junction' and 'row-rule-inset-junction'
11971264
</pre>
11981265

1199-
This [=shorthand property=] sets 'column-rule-interior-inset' and 'row-rule-interior-inset' to the same value.
1266+
This [=shorthand property=] sets 'column-rule-inset-junction' and 'row-rule-inset-junction' to the same value.
12001267

12011268
<wpt>
1202-
parsing/rule-edge-inset-bidirectional-shorthand.html
1203-
parsing/rule-edge-interior-inset-computed.html
1204-
parsing/rule-edge-interior-inset-invalid.html
1205-
parsing/rule-edge-interior-inset-shorthand.html
1206-
parsing/rule-edge-interior-inset-valid.html
1207-
parsing/rule-interior-inset-bidirectional-shorthand.html
1269+
parsing/rule-inset-cap-bidirectional-shorthand.html
1270+
parsing/rule-inset-cap-junction-computed.html
1271+
parsing/rule-inset-cap-junction-invalid.html
1272+
parsing/rule-inset-cap-junction-shorthand.html
1273+
parsing/rule-inset-cap-junction-valid.html
1274+
parsing/rule-inset-junction-bidirectional-shorthand.html
12081275
</wpt>
12091276

12101277
<h4 id="insets-universal">
@@ -1282,19 +1349,19 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
12821349

12831350
<pre class='propdef shorthand'>
12841351
Name: column-rule-inset, row-rule-inset
1285-
Value: <<'column-rule-edge-inset'>> [ / <<'column-rule-interior-inset'>> ]?
1286-
Applies to: Same as 'column-rule-edge-inset', 'column-rule-interior-inset', 'row-rule-edge-inset', and 'row-rule-interior-inset'
1352+
Value: <<'column-rule-inset-cap'>> [ / <<'column-rule-inset-junction'>> ]?
1353+
Applies to: Same as 'column-rule-inset-cap', 'column-rule-inset-junction', 'row-rule-inset-cap', and 'row-rule-inset-junction'
12871354
</pre>
12881355

1289-
These shorthands set the corresponding edge and interior start and end values.
1356+
These shorthands set the corresponding cap and junction start and end values.
12901357
The order of values is:
12911358
<pre class='prod'>
1292-
edge-start edge-end? [/ interior-start interior-end?]?
1359+
cap-start cap-end? [/ junction-start junction-end?]?
12931360
</pre>
12941361

12951362
Omitted values are filled in as follows:
12961363
<ol>
1297-
<li>If the interior values are omitted, they are copied from the edge values.
1364+
<li>If the junction values are omitted, they are copied from the cap values.
12981365
<li>Any omitted end value is copied from the corresponding start value.
12991366
</ol>
13001367

@@ -2501,6 +2568,8 @@ Changes since the <a href="https://www.w3.org/TR/2026/WD-css-gaps-1-20260227/">2
25012568
<li>Moved the [[#gaps|gap]] properties from [[!CSS-ALIGN-3]] to this specification.
25022569
(<a href="https://github.com/w3c/csswg-drafts/issues/13089">Issue 13089</a>)
25032570
<li>Updated with links to additional WPTs.
2571+
<li>Updated edge and interior insets to be cap and junction insets.
2572+
(<a href="https://github.com/w3c/csswg-drafts/issues/13697">Issue 13697</a>)
25042573
<li>Clarified that gaps suppressed due to fragmentation still consume gap decoration values.
25052574
(<a href="https://github.com/w3c/csswg-drafts/issues/13754">Issue 13754</a>)
25062575
</ul>
6.8 KB
Loading
4.85 KB
Loading
7.33 KB
Loading

css-gaps-1/images/example-column-interior-inset-5px.png renamed to css-gaps-1/images/example-column-inset-junction-5px.png

File renamed without changes.

css-gaps-1/images/example-column-start-end-edge-interior-insets.png renamed to css-gaps-1/images/example-column-inset-start-end.png

File renamed without changes.

0 commit comments

Comments
 (0)