Skip to content

Commit 82527cb

Browse files
authored
Add overlap-join keyword to the css-gaps spec #13137 (#13885)
1 parent 53d6722 commit 82527cb

3 files changed

Lines changed: 68 additions & 3 deletions

File tree

css-gaps-1/Overview.bs

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -983,14 +983,18 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
983983

984984
<pre class='propdef'>
985985
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
986-
Value: <<length-percentage>>
986+
Value: <<inset-value>>
987987
Initial: ''0''
988988
Applies to: <a>grid containers</a>, <a>flex containers</a>, <a>multicol containers</a>, and <a>grid lanes containers</a>
989989
Inherited: no
990990
Percentages: refer to the <a>crossing gap width</a>
991991
Animation type: by computed value type
992992
</pre>
993993

994+
<pre class='prod'>
995+
<dfn>&lt;inset-value&gt;</dfn> = <<length-percentage>> | <a value for="<inset-value>">overlap-join</a>
996+
</pre>
997+
994998
These properties can be used to offset the start and end points of <a>gap decorations</a> relative to the
995999
<a>segment endpoints</a> which would normally determine where decorations start and end.
9961000

@@ -1097,6 +1101,58 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
10971101
For these properties, positive values offset in the [=start=] direction, and negative values offset in the [=end=] direction, along the axis of the gap.
10981102
</p>
10991103

1104+
<p>
1105+
The <dfn value for="<inset-value>">overlap-join</dfn> keyword
1106+
produces neat joins between [=gap decorations=] that meet at the same [=gap junction=]:
1107+
</p>
1108+
1109+
<ul>
1110+
<li>
1111+
At a [=junction segment endpoint=], the [=gap decoration=] extends into the [=gap junction=]
1112+
by half the [=crossing gap width=], plus half the [=used value=] of the crossing gap's
1113+
'column-rule-width' or 'row-rule-width' (whichever applies).
1114+
<li>
1115+
At a [=cap segment endpoint=], ''<inset-value>/overlap-join'' is treated as ''0''.
1116+
</ul>
1117+
1118+
<div class="example">
1119+
<pre>
1120+
.inset-overlap-join {
1121+
rule-inset: overlap-join;
1122+
rule-break: intersection;
1123+
rule-visibility-items: between;
1124+
}
1125+
</pre>
1126+
<figure>
1127+
<img alt="" src="images/example-1-overlap-join.png">
1128+
<figcaption>
1129+
With ''<inset-value>/overlap-join'', [=gap decorations=] at [=junction segment endpoints=]
1130+
extend into the [=gap junction=], joining adjacent segments.
1131+
At [=cap segment endpoints=], ''<inset-value>/overlap-join'' is treated as ''0''.
1132+
</figcaption>
1133+
</figure>
1134+
</div>
1135+
1136+
<div class="example">
1137+
<pre>
1138+
.inset-overlap-join {
1139+
rule-inset: overlap-join;
1140+
rule-break: intersection;
1141+
rule-visibility-items: between;
1142+
}
1143+
</pre>
1144+
<figure>
1145+
<img alt="" src="images/example-2-overlap-join.png">
1146+
<figcaption>
1147+
In a "donut" grid layout, where items surround an empty space in the middle of the container,
1148+
''<inset-value>/overlap-join'' joins adjacent segments
1149+
at the [=junction segment endpoints=],
1150+
extending each [=gap decoration=] into the [=gap junction=]. At the [=cap segment endpoints=]
1151+
bordering the edge of the container and the empty interior region, ''<inset-value>/overlap-join'' is treated as ''0''.
1152+
</figcaption>
1153+
</figure>
1154+
</div>
1155+
11001156
<div class="example">
11011157
<pre>
11021158
.inset-end {
@@ -1159,6 +1215,13 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
11591215
multicol/multicol-gap-decorations-022.html
11601216
multicol/multicol-gap-decorations-023.html
11611217
multicol/multicol-gap-decorations-033.html
1218+
parsing/rule-inset-cap-start-end-overlap-join-computed.html
1219+
parsing/rule-inset-cap-start-end-overlap-join-invalid.html
1220+
parsing/rule-inset-junction-start-end-overlap-join-computed.html
1221+
parsing/rule-inset-junction-start-end-overlap-join-invalid.html
1222+
grid/grid-gap-decorations-overlap-join-001.html
1223+
grid/grid-gap-decorations-overlap-join-002.html
1224+
grid/grid-gap-decorations-overlap-join-dangling-001.html
11621225
</wpt>
11631226

11641227
<h4 id="insets-start-end">
@@ -1184,7 +1247,7 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
11841247

11851248
<pre class='propdef shorthand'>
11861249
Name: column-rule-inset-start, column-rule-inset-end, row-rule-inset-start, row-rule-inset-end
1187-
Value: <<length-percentage>>
1250+
Value: <<inset-value>>
11881251
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'
11891252
</pre>
11901253

@@ -1240,7 +1303,7 @@ Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
12401303

12411304
<pre class='propdef shorthand'>
12421305
Name: column-rule-inset-cap, column-rule-inset-junction, row-rule-inset-cap, row-rule-inset-junction
1243-
Value: <<length-percentage>> [ <<length-percentage>> ]?
1306+
Value: <<inset-value>> <<inset-value>>?
12441307
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'
12451308
</pre>
12461309

@@ -2575,6 +2638,8 @@ Changes since the <a href="https://www.w3.org/TR/2026/WD-css-gaps-1-20260227/">2
25752638
(<a href="https://github.com/w3c/csswg-drafts/issues/13697">Issue 13697</a>)
25762639
<li>Clarified that gaps suppressed due to fragmentation still consume gap decoration values.
25772640
(<a href="https://github.com/w3c/csswg-drafts/issues/13754">Issue 13754</a>)
2641+
<li>Added the ''<inset-value>/overlap-join'' value to the [[#inset|rule-inset]] properties.
2642+
(<a href="https://github.com/w3c/csswg-drafts/issues/13137">Issue 13137</a>)
25782643
<li>Clarified that decoration patterns do not restart at the beginning of each flex line.
25792644
(<a href="https://github.com/w3c/csswg-drafts/issues/13663">Issue 13663</a>)
25802645
</ul>
2.14 KB
Loading
3.26 KB
Loading

0 commit comments

Comments
 (0)