Skip to content

Commit 62af0e6

Browse files
jav099Javier Contreras Tenoriokbabbitt
authored
[css-gaps-1] Update outset properties #12603, #12848, #8402 (#13024)
* initial commit * insets and auto * insets and auto * formatting * wording to add rather than subtract * feedback * Reorder a few things and make minor fixes * changes section * grid lanes * changes section * back to masonry --------- Co-authored-by: Javier Contreras Tenorio <[email protected]> Co-authored-by: Kevin Babbitt <[email protected]>
1 parent c1dd400 commit 62af0e6

8 files changed

+187
-42
lines changed

css-gaps-1/Overview.bs

Lines changed: 187 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ Pairing gap intersection points into segments</h4>
368368
A <a>gap decoration</a> is painted between each pair of endpoints identified using the steps above.
369369

370370
The following examples illustrate various settings for the <a href="#break">*-rule-break</a> properties.
371-
To make the differences more apparent, the <a href="#outset">*-rule-outset</a> properties are set to ''0''.
371+
To make the differences more apparent, the <a href="#inset">*-rule-*-inset</a> properties are set to ''0''.
372372

373373
<div class="example">
374374
<pre>
@@ -379,7 +379,7 @@ Pairing gap intersection points into segments</h4>
379379
row-rule: 6px solid red;
380380
column-rule: 6px solid blue;
381381
rule-break: none;
382-
rule-outset: 0px;
382+
rule-inset: 0px;
383383
}
384384
</pre>
385385
<figure>
@@ -400,7 +400,7 @@ Pairing gap intersection points into segments</h4>
400400
row-rule: 6px solid red;
401401
column-rule: 6px solid blue;
402402
rule-break: spanning-item;
403-
rule-outset: 0px;
403+
rule-inset: 0px;
404404
}
405405
</pre>
406406
<figure>
@@ -421,7 +421,7 @@ Pairing gap intersection points into segments</h4>
421421
row-rule: 6px solid red;
422422
column-rule: 6px solid blue;
423423
rule-break: intersection;
424-
rule-outset: 0px;
424+
rule-inset: 0px;
425425
}
426426
</pre>
427427
<figure>
@@ -442,7 +442,7 @@ Pairing gap intersection points into segments</h4>
442442
row-rule: 6px solid red;
443443
column-rule: 6px solid blue;
444444
rule-break: none;
445-
rule-outset: 0px;
445+
rule-inset: 0px;
446446
}
447447
</pre>
448448
<figure>
@@ -471,7 +471,7 @@ Pairing gap intersection points into segments</h4>
471471
row-rule: 6px solid red;
472472
column-rule: 6px solid blue;
473473
rule-break: intersection;
474-
rule-outset: 0px;
474+
rule-inset: 0px;
475475
}
476476
</pre>
477477
<figure>
@@ -482,13 +482,23 @@ Pairing gap intersection points into segments</h4>
482482
</figure>
483483
</div>
484484

485-
<h3 id="outset">
486-
Adjusting gap decoration endpoints: The 'column-rule-outset', 'row-rule-outset', and 'rule-outset' properties</h3>
485+
<h3 id="inset">
486+
Adjusting gap decoration endpoints: The 'rule-inset' properties</h3>
487487

488488
<pre class='propdef'>
489-
Name: column-rule-outset, row-rule-outset
490-
Value: <<length-percentage>>
491-
Initial: ''50%''
489+
Name: column-rule-edge-inset-start, column-rule-edge-inset-end, row-rule-edge-inset-start, row-rule-edge-inset-end
490+
Value: ''auto'' | <<length-percentage>>
491+
Initial: ''auto''
492+
Applies to: <a>grid containers</a>, <a>flex containers</a>, <a>multicol containers</a>, and <a>masonry containers</a>
493+
Inherited: no
494+
Percentages: refer to the <a>crossing gap width</a>
495+
Animation type: by computed value type
496+
</pre>
497+
498+
<pre class='propdef'>
499+
Name: column-rule-interior-inset-start, column-rule-interior-inset-end, row-rule-interior-inset-start, row-rule-interior-inset-end
500+
Value: ''auto'' | <<length-percentage>>
501+
Initial: ''auto''
492502
Applies to: <a>grid containers</a>, <a>flex containers</a>, <a>multicol containers</a>, and <a>masonry containers</a>
493503
Inherited: no
494504
Percentages: refer to the <a>crossing gap width</a>
@@ -497,84 +507,215 @@ Adjusting gap decoration endpoints: The 'column-rule-outset', 'row-rule-outset',
497507

498508
These properties can be used to offset the endpoints of <a>gap decorations</a> relative to the
499509
<a>gap intersection points</a> which would normally determine their endpoints.
500-
The initial value of ''50%'' places the <a>gap decoration</a> endpoint in the center of the intersection.
501-
With a value of ''0'', the <a>gap decoration</a> endpoint will coincide with the edge of the intersection.
502-
Positive values extend towards the center of the intersection;
503-
negative values recede from it.
504-
These offsets also apply at the edges of the container,
505-
where positive values may extend beyond the content bounds of the container.
510+
511+
For the interior properties,
512+
a value of ''-50%'' places the <a>gap decoration</a> endpoint in the center of the intersection,
513+
and a value of ''0'' places the <a>gap decoration</a> endpoint at the edge of the intersection.
514+
515+
<dl dfn-for=rule-inset dfn-type=value>
516+
<dt><dfn>auto</dfn>
517+
<dd>
518+
The used value of ''auto'' is ''0'' for edge properties and ''-50%'' for interior properties.
519+
</dl>
520+
521+
<p>An <dfn>edge gap intersection point</dfn> is any [=gap intersection point=] at the content edges of the container.</p>
522+
<p>An <dfn>interior gap intersection point</dfn> is any [=gap intersection point=] that is not an [=edge gap intersection point=].</p>
523+
<p>A <dfn>decoration segment</dfn> refers to any segment that connects a pair of adjacent [=gap intersection points=].</p>
524+
<p>A <dfn>start endpoint</dfn> and <dfn>end endpoint</dfn> refer to the two endpoints of a given [=decoration segment=].
525+
A given [=start endpoint=] and [=end endpoint=] can be either an [=edge gap intersection point=] or an [=interior gap intersection point=].</p>
526+
527+
The ''column-rule-edge-inset-start'' and ''row-rule-edge-inset-start'' properties control the behavior for any [=start endpoint=] that is an [=edge gap intersection point=],
528+
while the ''column-rule-edge-inset-end'' and ''row-rule-edge-inset-end'' properties control the behavior for any [=end endpoint=] that is an [=edge gap intersection point=].
529+
Positive values recede inwards from the content edge, while negative values extend outwards, beyond the container's content bounds.
530+
531+
The ''column-rule-interior-inset-start'' and ''row-rule-interior-inset-start'' properties control the behavior for any [=start endpoint=] that is an [=interior gap intersection point=],
532+
while the ''column-rule-interior-inset-end'' and ''row-rule-interior-inset-end'' properties control the behavior for any [=end endpoint=] that is an [=interior gap intersection point=].
533+
Positive values recede away from the intersection, while negative values extend towards the center of the intersection.
534+
535+
<pre class='propdef shorthand'>
536+
Name: column-rule-edge-inset, row-rule-edge-inset
537+
Value: <<length-percentage>> [ <<length-percentage>> ]?
538+
Applies to: Same as 'column-rule-edge-inset-start', 'column-rule-interior-inset-start', 'row-rule-edge-inset-end', and 'row-rule-interior-inset-end'
539+
</pre>
540+
541+
Sets the ''column-rule-edge-inset-start'' and ''column-rule-edge-inset-end'' properties to the specified values.
542+
Similarly, sets the ''row-rule-edge-inset-start'' and ''row-rule-edge-inset-end'' properties to the specified values.
506543

507544
<pre class='propdef shorthand'>
508-
Name: rule-outset
509-
Value: <<'column-rule-outset'>>
510-
Applies to: Same as 'column-rule-outset' and 'row-rule-outset'
545+
Name: column-rule-interior-inset, row-rule-interior-inset
546+
Value: <<length-percentage>> [ <<length-percentage>> ]?
547+
Applies to: Same as 'column-rule-edge-inset-start', 'column-rule-interior-inset-start', 'row-rule-edge-inset-end', and 'row-rule-interior-inset-end'
511548
</pre>
512549

513-
Sets the 'column-rule-outset' and 'row-rule-outset' properties to the same value.
550+
Sets the ''column-rule-interior-inset-start'' and ''column-rule-interior-inset-end'' properties to the specified values.
551+
Similarly, sets the ''row-rule-interior-inset-start'' and ''row-rule-interior-inset-end'' properties to the specified values.
552+
553+
<pre class='propdef shorthand'>
554+
Name: rule-edge-inset
555+
Value: <<'column-rule-edge-inset'>>
556+
Applies to: Same as 'column-rule-edge-inset' and 'row-rule-edge-inset'
557+
</pre>
558+
559+
Sets the 'column-rule-edge-inset' and 'row-rule-edge-inset' properties to the same value.
560+
561+
<pre class='propdef shorthand'>
562+
Name: rule-interior-inset
563+
Value: <<'column-rule-interior-inset'>>
564+
Applies to: Same as 'column-rule-interior-inset' and 'row-rule-interior-inset'
565+
</pre>
566+
567+
Sets the 'column-rule-interior-inset' and 'row-rule-interior-inset' properties to the same value.
568+
569+
<pre class='propdef shorthand'>
570+
Name: column-rule-inset, row-rule-inset
571+
Value: <<length-percentage>> [ <<length-percentage>> ]?
572+
Applies to: Same as 'column-rule-edge-inset', 'column-rule-interior-inset', 'row-rule-edge-inset', and 'row-rule-interior-inset'
573+
</pre>
574+
575+
<pre class='propdef shorthand'>
576+
Name: rule-inset
577+
Value: <<'column-rule-inset'>>
578+
Applies to: Same as 'column-rule-inset' and 'row-rule-inset'
579+
</pre>
580+
581+
Sets the 'column-rule-inset' and 'row-rule-inset' properties to the same value.
582+
583+
<pre class='propdef shorthand'>
584+
Name: column-rule-inset-start, row-rule-inset-start
585+
Value: auto | <<length-percentage>>
586+
Applies to: 'column-rule-edge-inset-start' and 'column-rule-interior-inset-start' for 'column-rule-inset-start',
587+
'row-rule-edge-inset-start' and 'row-rule-interior-inset-start' for 'row-rule-inset-start'
588+
</pre>
589+
590+
Sets the 'column-rule-edge-inset-start' and 'column-rule-interior-inset-start' properties to the same value.
591+
Similarly, sets the 'row-rule-edge-inset-start' and 'row-rule-interior-inset-start' properties to the same value.
592+
593+
<pre class='propdef shorthand'>
594+
Name: column-rule-inset-end, row-rule-inset-end
595+
Value: auto | <<length-percentage>>
596+
Applies to: 'column-rule-edge-inset-end' and 'column-rule-interior-inset-end' for 'column-rule-inset-end',
597+
'row-rule-edge-inset-end' and 'row-rule-interior-inset-end' for 'row-rule-inset-end'
598+
</pre>
599+
600+
Sets the 'column-rule-edge-inset-end' and 'column-rule-interior-inset-end' properties to the same value.
601+
Similarly, sets the 'row-rule-edge-inset-end' and 'row-rule-interior-inset-end' properties to the same value.
602+
603+
<pre class='propdef shorthand'>
604+
Name: rule-inset-start
605+
Value: <<'column-rule-inset-start'>>
606+
Applies to: Same as 'column-rule-inset-start' and 'row-rule-inset-start'
607+
</pre>
608+
609+
Sets the 'column-rule-inset-start' and 'row-rule-inset-start' properties to the same value.
610+
611+
<pre class='propdef shorthand'>
612+
Name: rule-inset-end
613+
Value: <<'column-rule-inset-end'>>
614+
Applies to: Same as 'column-rule-inset-end' and 'row-rule-inset-end'
615+
</pre>
616+
617+
Sets the 'column-rule-inset-end' and 'row-rule-inset-end' properties to the same value.
618+
514619

515620
<div class="example">
516621
<pre>
517-
.outset-0px {
518-
column-rule-outset: 0px;
622+
.inset-0px {
623+
column-rule-inset: 0px;
519624
column-rule-break: intersection;
520625
}
521626
</pre>
522627
<figure>
523-
<img alt="" src="images/example-column-outset-0px.png">
628+
<img alt="" src="images/example-column-inset-0px.png">
524629
<figcaption>
525-
An outset of ''0px'' aligns the ends of <a>gap decorations</a> with adjacent items.
630+
An inset of ''0px'' aligns the ends of <a>gap decorations</a> with adjacent items.
526631
</figcaption>
527632
</figure>
528633
</div>
529634

530635
<div class="example">
531636
<pre>
532-
.outset-5px {
533-
column-rule-outset: 5px;
637+
.inset-negative-5px {
638+
column-rule-inset: -5px;
534639
column-rule-break: intersection;
535640
}
536641
</pre>
537642
<figure>
538-
<img alt="" src="images/example-column-outset-5px.png">
643+
<img alt="" src="images/example-column-inset-5px.png">
539644
<figcaption>
540-
An outset of ''5px'' extends the ends of <a>gap decorations</a>
645+
An inset of ''-5px'' extends the ends of <a>gap decorations</a>
541646
slightly beyond the edges of adjacent items.
542647
</figcaption>
543648
</figure>
544649
</div>
545650

546651
<div class="example">
547652
<pre>
548-
.outset-50percent {
549-
column-rule-outset: 50%;
653+
.inset-start-8px-end-0px {
654+
column-rule-inset-start: 8px;
655+
column-rule-inset-end: 0px;
656+
}
657+
</pre>
658+
<figure>
659+
<img alt="" src="images/example-column-start-end-edge-interior-insets.png">
660+
<figcaption>
661+
A start edge inset of ''8px'' and an end edge inset of ''0px'' recede the [=start endpoints=] of edge <a>gap decorations</a>
662+
away from the start of the gap, and align the [=end endpoints=] with the content edge at the end of the gap.
663+
A start interior inset of ''8px'' and an end interior inset of ''0px'' recede the [=start endpoints=] of interior <a>gap decorations</a>
664+
away from the edges of adjacent items at the start of the gap, and align the [=end endpoints=] with the edges of adjacent items at the end of the gap.
665+
</figcaption>
666+
</figure>
667+
</div>
668+
669+
<div class="example">
670+
<pre>
671+
.inset-edge-0px-interior-negative-5px {
672+
column-rule-edge-inset: 0px;
673+
column-rule-interior-inset: -5px;
674+
column-rule-break: intersection;
675+
}
676+
</pre>
677+
<figure>
678+
<img alt="" src="images/example-column-interior-inset-5px.png">
679+
<figcaption>
680+
An interior inset of ''-5px'' extends the endpoints of interior <a>gap decorations</a>
681+
slightly beyond the edges of adjacent items. An edge inset of ''0px'' aligns the endpoints of edge <a>gap decorations</a>
682+
with the content edges.
683+
</figcaption>
684+
</figure>
685+
</div>
686+
687+
<div class="example">
688+
<pre>
689+
.inset-50percent {
690+
column-rule-inset: 50%;
550691
column-rule-break: intersection;
551692
}
552693
</pre>
553694
<figure>
554-
<img alt="" src="images/example-column-outset-50percent.png">
695+
<img alt="" src="images/example-column-inset-50percent.png">
555696
<figcaption>
556-
An outset of ''50%'' - the initial value - extends each end of a <a>gap decoration</a>
697+
An inset of ''50%'' - the initial value - extends each end of a <a>gap decoration</a>
557698
halfway into its intersection.
558699
Neighboring <a>gap decorations</a> "meet in the middle" to create a continuous line.
559700
Note that at the edges of the container, the <a>crossing gap width</a> is defined to be ''0'',
560-
so the outset value of ''50%'' resolves to ''0''
701+
so the inset value of ''50%'' resolves to ''0''
561702
and thus the <a>gap decoration</a> does not extend beyond the bounds of the container.
562-
(Contrast with the previous example, which specified an outset in ''px'' units.)
703+
(Contrast with the previous example, which specified an inset in ''px'' units.)
563704
</figcaption>
564705
</figure>
565706
</div>
566707

567708
<div class="example">
568709
<pre>
569-
.outset-negative-5px {
570-
column-rule-outset: -5px;
710+
.inset-positive-5px {
711+
column-rule-inset: 5px;
571712
column-rule-break: intersection;
572713
}
573714
</pre>
574715
<figure>
575-
<img alt="" src="images/example-column-outset-minus-5px.png">
716+
<img alt="" src="images/example-column-inset-minus-5px.png">
576717
<figcaption>
577-
An outset of ''-5px'' shortens the ends of <a>gap decorations</a>
718+
An inset of ''5px'' shortens the ends of <a>gap decorations</a>
578719
relative to the edges of adjacent items.
579720
</figcaption>
580721
</figure>
@@ -604,14 +745,14 @@ Adjusting gap decoration endpoints: The 'column-rule-outset', 'row-rule-outset',
604745
</li>
605746

606747
<li>
607-
Let |outset| be the computed value of either 'column-rule-outset' or 'row-rule-outset',
748+
Let |inset| be the computed value of either 'column-rule-inset' or 'row-rule-inset',
608749
whichever applies to |gap|.
609-
Resolve any percentages in |outset| against |width|.
750+
Resolve any percentages in |inset| against |width|.
610751
</li>
611752

612753
<li>
613754
Let |result| be |width| multiplied by 50%.
614-
Subtract |outset| from |result|.
755+
Add |inset| to |result|.
615756
</li>
616757

617758
<li>
@@ -1238,4 +1379,8 @@ Changes since the <a href="https://www.w3.org/TR/2025/WD-css-gaps-1-20250417/">1
12381379
(<a href="https://github.com/w3c/csswg-drafts/issues/12431">Issue 12431</a>)
12391380
<li>Removed the special case of 'column-rule-width' having a computed value of ''0'' when 'column-rule-style' is ''border-style/none'' or ''border-style/hidden''.
12401381
(<a href="https://github.com/w3c/csswg-drafts/issues/11494">Issue 11494</a>)
1382+
<li> Updated `*-outset` to `*-inset` and introduced related properties.
1383+
(<a href="https://github.com/w3c/csswg-drafts/issues/12603">Issue 12603</a>,
1384+
<a href="https://github.com/w3c/csswg-drafts/issues/12848">Issue 12848</a>,
1385+
<a href="https://github.com/w3c/csswg-drafts/issues/8402">Issue 8402</a>)
12411386
</ul>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2.36 KB
Loading
1.41 KB
Loading

0 commit comments

Comments
 (0)