SSL Overview.html
Sprache: HTML
|
|
| products/Sources/formale Sprachen/C/Firefox/layout/docs/css-gap-decorations/Overview.html |
 |
<! doctype html>< html lang= "en">
< head>
< meta content= "text/html; charset=utf-8" http-equiv= "Content-Type">
< title>CSS Gap Decorations</ title>
< meta content= "width=device-width, initial-scale=1, shrink-to-fit=no" name= "viewport">
< meta content= "exploring" name= "csswg-work-status">
< meta content= "ED" name= "w3c-status">
< meta content= "This is a proposal to extend <a href="https://drafts.csswg.org/css-align">CSS Box Alignment</a> to support gap decorations." name= "abstract">
< link href= "../default.css" rel= "stylesheet" type= "text/css">
< link href= "../csslogo.ico" rel= "shortcut icon" type= "image/x-icon">
< link href= "https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel= "stylesheet" type= "text/css">
< meta content= "Bikeshed version dfbc2b297, updated Thu Nov 11 15:52:32 2021 -0800" name= "generator">
< link href= "https://matspalmgren.github.io/css-gap-decorations/Overview.html" rel= "canonical">
< link href= "https://drafts.csswg.org/csslogo.ico" rel= "icon">
< meta content= "0978a49f760a6618d883efc621c36673a0720e2a" name= "document-revision">
< style>/* style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
color: var(--a-normal-text);
font-size: inherit;
font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
content: "‘";
}
.css::after, .property::after, .descriptor::after {
content: "’";
}
.property, .descriptor {
/* Don 't wrap property and descriptor names */
white-space: nowrap;
}
.type { /* CSS value <type> */
font-style: italic;
}
pre .property::before, pre .property::after {
content: "";
}
[data-link-type= "property"]::before,
[data-link-type= "propdesc"]::before,
[data-link-type= "descriptor"]::before,
[data-link-type= "value"]::before,
[data-link-type= "function"]::before,
[data-link-type= "at-rule"]::before,
[data-link-type= "selector"]::before,
[data-link-type= "maybe"]::before {
content: "‘";
}
[data-link-type= "property"]::after,
[data-link-type= "propdesc"]::after,
[data-link-type= "descriptor"]::after,
[data-link-type= "value"]::after,
[data-link-type= "function"]::after,
[data-link-type= "at-rule"]::after,
[data-link-type= "selector"]::after,
[data-link-type= "maybe"]::after {
content: "’";
}
[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
content: "";
}
[data-link-type=element],
[data-link-type=element-attr] {
font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: .9 em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after { content: ">" }
[data-link-type=biblio] {
white-space: pre;
}</ style>
< style>/* style-colors */
/* Any --*-text not paired with a --*-bg is assumed to have a transparent bg */
:root {
color-scheme: light dark;
--text: black;
--bg: white;
--unofficial-watermark: url( https://www.w3.org/StyleSheets/TR/2016/logos/UD-water mark);
--logo-bg: #1a5e9a;
--logo-active-bg: #c00;
--logo-text: white;
--tocnav-normal-text: #707070;
--tocnav-normal-bg: var(--bg);
--tocnav-hover-text: var(--tocnav-normal-text);
--tocnav-hover-bg: #f8f8f8;
--tocnav-active-text: #c00;
--tocnav-active-bg: var(--tocnav-normal-bg);
--tocsidebar-text: var(--text);
--tocsidebar-bg: #f7f8f9;
--tocsidebar-shadow: rgba(0,0,0,.1);
--tocsidebar-heading-text: hsla(203,20%,40%,.7);
--toclink-text: var(--text);
--toclink-underline: #3980b5;
--toclink-visited-text: var(--toclink-text);
--toclink-visited-underline: #054572;
--heading-text: #005a9c;
--hr-text: var(--text);
--algo-border: #def;
--del-text: red;
--del-bg: transparent;
--ins-text: #080;
--ins-bg: transparent;
--a-normal-text: #034575;
--a-normal-underline: #bbb;
--a-visited-text: var(--a-normal-text);
--a-visited-underline: #707070;
--a-hover-bg: rgba(75%, 75%, 75%, .25);
--a-active-text: #c00;
--a-active-underline: #c00;
--blockquote-border: silver;
--blockquote-bg: transparent;
--blockquote-text: currentcolor;
--issue-border: #e05252;
--issue-bg: #fbe9e9;
--issue-text: var(--text);
--issueheading-text: #831616;
--example-border: #e0cb52;
--example-bg: #fcfaee;
--example-text: var(--text);
--exampleheading-text: #574b0f;
--note-border: #52e052;
--note-bg: #e9fbe9;
--note-text: var(--text);
--noteheading-text: hsl(120, 70%, 30%);
--notesummary-underline: silver;
--assertion-border: #aaa;
--assertion-bg: #eee;
--assertion-text: black;
--advisement-border: orange;
--advisement-bg: #fec;
--advisement-text: var(--text);
--advisementheading-text: #b35f00;
--warning-border: red;
--warning-bg: hsla(40,100%,50%,0.95);
--warning-text: var(--text);
--amendment-border: #330099;
--amendment-bg: #F5F0FF;
--amendment-text: var(--text);
--amendmentheading-text: #220066;
--def-border: #8ccbf2;
--def-bg: #def;
--def-text: var(--text);
--defrow-border: #bbd7e9;
--datacell-border: silver;
--indexinfo-text: #707070;
--indextable-hover-text: black;
--indextable-hover-bg: #f7f8f9;
--outdatedspec-bg: rgba(0, 0, 0, .5);
--outdatedspec-text: black;
--outdated-bg: maroon;
--outdated-text: white;
--outdated-shadow: red;
--editedrec-bg: darkorange;
}</style>
<style>/* style-counters */
body {
counter-reset: example figure issue;
}
.issue {
counter-increment: issue;
}
.issue:not(.no-marker)::before {
content: "Issue " counter(issue);
}
.example {
counter-increment: example;
}
.example:not(.no-marker)::before {
content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
content: "Invalid Example" counter(example);
}
figcaption {
counter-increment: figure;
}
figcaption:not(.no-marker)::before {
content: "Figure " counter(figure) " ";
}</style>
<style>/* style-dfn-panel */
:root {
--dfnpanel-bg: #ddd;
--dfnpanel-text: var(--text);
}
.dfn-panel {
position: absolute;
z-index: 35;
height: auto;
width: -webkit-fit-content;
width: fit-content;
max-width: 300px;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.75em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: var(--dfnpanel-bg);
color: var(--dfnpanel-text);
border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: var(--dfnpanel-text); }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
display: inline-block;
position: fixed;
left: .5em;
bottom: 2em;
margin: 0 auto;
max-width: calc(100vw - 1.5em - .4em - .5em);
max-height: 30vh;
}
.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-issues */
a[href].issue-return {
float: right;
float: inline-end;
color: var(--issueheading-text);
font-weight: bold;
text-decoration: none;
}
</style>
<style>/* style-md-lists */
/* This is a weird hack for me not yet following the commonmark spec
regarding paragraph and lists. */
[data-md] > :first-child {
margin-top: 0;
}
[data-md] > :last-child {
margin-bottom: 0;
}</style>
<style>/* style-selflinks */
:root {
--selflink-text: white;
--selflink-bg: gray;
--selflink-hover-text: black;
}
.heading, .issue, .note, .example, li, dt {
position: relative;
}
a.self-link {
position: absolute;
top: 0;
left: calc(-1 * (3.5rem - 26px));
width: calc(3.5rem - 26px);
height: 2em;
text-align: center;
border: none;
transition: opacity .2s;
opacity: .5;
}
a.self-link:hover {
opacity: 1;
}
.heading > a.self-link {
font-size: 83%;
}
li > a.self-link {
left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
top: auto;
left: auto;
opacity: 0;
width: 1.5em;
height: 1.5em;
background: var(--selflink-bg);
color: var(--selflink-text);
font-style: normal;
transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
opacity: 1;
}
dfn > a.self-link:hover {
color: var(--selflink-hover-text);
}
a.self-link::before { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before { content: "#"; }
</style>
<style>/* style-syntax-highlighting */
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
.highlight:not(.idl) { background: rgba(0, 0, 0, .03); }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
<style>/* style-wpt */
:root {
--wpt-border: hsl(0, 0%, 60%);
--wpt-bg: hsl(0, 0%, 95%);
--wpt-text: var(--text);
--wptheading-text: hsl(0, 0%, 30%);
}
@media (prefers-color-scheme: dark) {
:root {
--wpt-border: hsl(0, 0%, 30%);
--wpt-bg: var(--borderedblock-bg);
--wpt-text: var(--text);
--wptheading-text: hsl(0, 0%, 60%);
}
}
.wpt-tests-block {
list-style: none;
border-left: .5em solid var(--wpt-border);
background: var(--wpt-bg);
color: var(--wpt-text);
margin: 1em auto;
padding: .5em;
}
.wpt-tests-block summary {
color: var(--wptheading-text);
font-weight: normal;
text-transform: uppercase;
}
.wpt-tests-block summary::marker{
color: var(--wpt-border);
}
.wpt-tests-block summary:hover::marker{
color: var(--wpt-text);
}
/*
The only content of a wpt test block in its closed state is the <summary>,
which contains the word TESTS,
and that is absolutely positioned.
In that closed state, wpt test blocks are styled
to have a top margin whose height is exactly equal
to the height of the absolutely positioned <summary>,
and no other background/padding/margin/border.
The wpt test block elements will therefore allow the maring
of the previous/next block elements
to collapse through them;
if this combined margin would be larger than its own top margin,
it stays as is,
and therefore the pre-existing vertical rhythm of the document is undisturbed.
If that combined margin would be smaller, it is grown to that size.
This means that the wpt test block ensures
that there's always enough vertical space to insert the summary,
without adding more than is needed.
*/
.wpt-tests-block:not([open]){
padding: 0;
border: none;
background: none;
font-size: 0.75em;
line-height: 1;
position: relative;
margin: 1em 0 0;
}
.wpt-tests-block:not([open]) summary {
position: absolute;
right: 0;
bottom: 0;
}
/*
It is possible that both the last child of a block element
and the block element itself
would be annotated with a <wpt> block each.
If the block element has a padding or a border,
that's fine, but otherwise
the bottom margin of the block and of its last child would collapse
and both <wpt> elements would overlap, being both placed there.
To avoid that, add 1px of padding to the <wpt> element annotating the last child
to prevent the bottom margin of the block and of its last child from collapsing
(and as much negative margin,
as wel only want to prevent margin collapsing,
but are not trying to actually take more space).
*/
.wpt-tests-block:not([open]):last-child {
padding-bottom: 1px;
margin-bottom: -1px;
}
/*
Exception to the previous rule:
don't do that in non-last list items,
because it's not necessary,
and would therefore consume more space than strictly needed.
Lists must have list items as children, not <wpt> elements,
so a <wpt> element cannot be a sibling of a list item,
and the collision that the previous rule avoids cannot happen.
*/
li:not(:last-child) > .wpt-tests-block:not([open]):last-child,
dd:not(:last-child) > .wpt-tests-block:not([open]):last-child {
padding-bottom: 0;
margin-bottom: 0;
}
.wpt-tests-block:not([open]):not(:hover){
opacity: 0.5;
}
.wpt-tests-list {
list-style: none;
display: grid;
margin: 0;
padding: 0;
grid-template-columns: 1fr max-content auto auto;
grid-column-gap: .5em;
}
.wpt-tests-block hr:last-child {
display: none;
}
.wpt-test {
display: contents;
}
.wpt-test > a {
text-decoration: underline;
border: none;
}
.wpt-test > .wpt-name { grid-column: 1; }
.wpt-test > .wpt-results { grid-column: 2; }
.wpt-test > .wpt-live { grid-column: 3; }
.wpt-test > .wpt-source { grid-column: 4; }
.wpt-test > .wpt-results {
display: flex;
gap: .1em;
}
.wpt-test .wpt-result {
display: inline-block;
height: 1em;
width: 1em;
border-radius: 50%;
position: relative;
}
</style>
<style>/* style-darkmode */
@media (prefers-color-scheme: dark) {
:root {
--text: #ddd;
--bg: black;
--unofficial-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23100808' transform='translate(200 200) rotate(-45) translate(-200 -200)' stroke='%23100808' stroke-width='3'%3E%3Ctext x='50%25' y='220' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EUNOFFICIAL%3C/text%3E%3Ctext x='50%25' y='305' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EDRAFT%3C/text%3E%3C/g%3E%3C/svg%3E");
--logo-bg: #1a5e9a;
--logo-active-bg: #c00;
--logo-text: white;
--tocnav-normal-text: #999;
--tocnav-normal-bg: var(--bg);
--tocnav-hover-text: var(--tocnav-normal-text);
--tocnav-hover-bg: #080808;
--tocnav-active-text: #f44;
--tocnav-active-bg: var(--tocnav-normal-bg);
--tocsidebar-text: var(--text);
--tocsidebar-bg: #080808;
--tocsidebar-shadow: rgba(255,255,255,.1);
--tocsidebar-heading-text: hsla(203,20%,40%,.7);
--toclink-text: var(--text);
--toclink-underline: #6af;
--toclink-visited-text: var(--toclink-text);
--toclink-visited-underline: #054572;
--heading-text: #8af;
--hr-text: var(--text);
--algo-border: #456;
--del-text: #f44;
--del-bg: transparent;
--ins-text: #4a4;
--ins-bg: transparent;
--a-normal-text: #6af;
--a-normal-underline: #555;
--a-visited-text: var(--a-normal-text);
--a-visited-underline: var(--a-normal-underline);
--a-hover-bg: rgba(25%, 25%, 25%, .2);
--a-active-text: #f44;
--a-active-underline: var(--a-active-text);
--borderedblock-bg: rgba(255, 255, 255, .05);
--blockquote-border: silver;
--blockquote-bg: var(--borderedblock-bg);
--blockquote-text: currentcolor;
--issue-border: #e05252;
--issue-bg: var(--borderedblock-bg);
--issue-text: var(--text);
--issueheading-text: hsl(0deg, 70%, 70%);
--example-border: hsl(50deg, 90%, 60%);
--example-bg: var(--borderedblock-bg);
--example-text: var(--text);
--exampleheading-text: hsl(50deg, 70%, 70%);
--note-border: hsl(120deg, 100%, 35%);
--note-bg: var(--borderedblock-bg);
--note-text: var(--text);
--noteheading-text: hsl(120, 70%, 70%);
--notesummary-underline: silver;
--assertion-border: #444;
--assertion-bg: var(--borderedblock-bg);
--assertion-text: var(--text);
--advisement-border: orange;
--advisement-bg: #222218;
--advisement-text: var(--text);
--advisementheading-text: #f84;
--warning-border: red;
--warning-bg: hsla(40,100%,20%,0.95);
--warning-text: var(--text);
--amendment-border: #330099;
--amendment-bg: #080010;
--amendment-text: var(--text);
--amendmentheading-text: #cc00ff;
--def-border: #8ccbf2;
--def-bg: #080818;
--def-text: var(--text);
--defrow-border: #136;
--datacell-border: silver;
--indexinfo-text: #aaa;
--indextable-hover-text: var(--text);
--indextable-hover-bg: #181818;
--outdatedspec-bg: rgba(255, 255, 255, .5);
--outdatedspec-text: black;
--outdated-bg: maroon;
--outdated-text: white;
--outdated-shadow: red;
--editedrec-bg: darkorange;
}
/* In case a transparent-bg image doesn't expect to be on a dark bg,
which is quite common in practice... */
img { background: white; }
}
@media (prefers-color-scheme: dark) {
:root {
--selflink-text: black;
--selflink-bg: silver;
--selflink-hover-text: white;
}
}
@media (prefers-color-scheme: dark) {
:root {
--dfnpanel-bg: #222;
--dfnpanel-text: var(--text);
}
}
@media (prefers-color-scheme: dark) {
.highlight:not(.idl) { background: rgba(255, 255, 255, .05); }
c-[a] { color: #d33682 } /* Keyword.Declaration */
c-[b] { color: #d33682 } /* Keyword.Type */
c-[c] { color: #2aa198 } /* Comment */
c-[d] { color: #2aa198 } /* Comment.Multiline */
c-[e] { color: #268bd2 } /* Name.Attribute */
c-[f] { color: #b58900 } /* Name.Tag */
c-[g] { color: #cb4b16 } /* Name.Variable */
c-[k] { color: #d33682 } /* Keyword */
c-[l] { color: #657b83 } /* Literal */
c-[m] { color: #657b83 } /* Literal.Number */
c-[n] { color: #268bd2 } /* Name */
c-[o] { color: #657b83 } /* Operator */
c-[p] { color: #657b83 } /* Punctuation */
c-[s] { color: #6c71c4 } /* Literal.String */
c-[t] { color: #6c71c4 } /* Literal.String.Single */
c-[u] { color: #6c71c4 } /* Literal.String.Double */
c-[ch] { color: #2aa198 } /* Comment.Hashbang */
c-[cp] { color: #2aa198 } /* Comment.Preproc */
c-[cpf] { color: #2aa198 } /* Comment.PreprocFile */
c-[c1] { color: #2aa198 } /* Comment.Single */
c-[cs] { color: #2aa198 } /* Comment.Special */
c-[kc] { color: #d33682 } /* Keyword.Constant */
c-[kn] { color: #d33682 } /* Keyword.Namespace */
c-[kp] { color: #d33682 } /* Keyword.Pseudo */
c-[kr] { color: #d33682 } /* Keyword.Reserved */
c-[ld] { color: #657b83 } /* Literal.Date */
c-[nc] { color: #268bd2 } /* Name.Class */
c-[no] { color: #268bd2 } /* Name.Constant */
c-[nd] { color: #268bd2 } /* Name.Decorator */
c-[ni] { color: #268bd2 } /* Name.Entity */
c-[ne] { color: #268bd2 } /* Name.Exception */
c-[nf] { color: #268bd2 } /* Name.Function */
c-[nl] { color: #268bd2 } /* Name.Label */
c-[nn] { color: #268bd2 } /* Name.Namespace */
c-[py] { color: #268bd2 } /* Name.Property */
c-[ow] { color: #657b83 } /* Operator.Word */
c-[mb] { color: #657b83 } /* Literal.Number.Bin */
c-[mf] { color: #657b83 } /* Literal.Number.Float */
c-[mh] { color: #657b83 } /* Literal.Number.Hex */
c-[mi] { color: #657b83 } /* Literal.Number.Integer */
c-[mo] { color: #657b83 } /* Literal.Number.Oct */
c-[sa] { color: #6c71c4 } /* Literal.String.Affix */
c-[sb] { color: #6c71c4 } /* Literal.String.Backtick */
c-[sc] { color: #6c71c4 } /* Literal.String.Char */
c-[dl] { color: #6c71c4 } /* Literal.String.Delimiter */
c-[sd] { color: #6c71c4 } /* Literal.String.Doc */
c-[se] { color: #6c71c4 } /* Literal.String.Escape */
c-[sh] { color: #6c71c4 } /* Literal.String.Heredoc */
c-[si] { color: #6c71c4 } /* Literal.String.Interpol */
c-[sx] { color: #6c71c4 } /* Literal.String.Other */
c-[sr] { color: #6c71c4 } /* Literal.String.Regex */
c-[ss] { color: #6c71c4 } /* Literal.String.Symbol */
c-[fm] { color: #268bd2 } /* Name.Function.Magic */
c-[vc] { color: #cb4b16 } /* Name.Variable.Class */
c-[vg] { color: #cb4b16 } /* Name.Variable.Global */
c-[vi] { color: #cb4b16 } /* Name.Variable.Instance */
c-[vm] { color: #cb4b16 } /* Name.Variable.Magic */
c-[il] { color: #657b83 } /* Literal.Number.Integer.Long */
}
</style>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">CSS Gap Decorations</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2021-12-18">18 December 2021</time></p>
<details>
<summary>Specification Metadata</summary>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="https://matspalmgren.github.io/css-gap-decorations/Overview.html">https://matspalmgren.github.io/css-gap-decorations/Overview.html</a>
<dt>Issue Tracking:
<dd><a href="https://github.com/w3c/csswg-drafts/labels/css-gap-decorations-1">CSSWG Issues Repository</a>
<dd><a href="https://github.com/w3c/csswg-drafts/issues/6748">CSSWG github issue #6748</a>
<dd><a href="#issues-index">Inline In Spec</a>
<dt class="editor">Editor:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:mats@mozilla.com">Mats Palmgren</a> (<a class="p-org org" href="http://mozilla.com">Mozilla Corporation</a>)
<dt>Suggest an Edit for this Spec:
<dd><a href="https://github.com/w3c/csswg-drafts/blob/main/css-gap-decorations-1/Overview.bs">GitHub Editor</a>
</dl>
</div>
</details>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2021 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document" rel="license">permissive document license</a> rules apply. </p>
<hr title="Separator for header">
</div>
<div class="p-summary" data-fill-with="abstract">
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<p>This is a proposal to extend <a href="https://drafts.csswg.org/css-align">CSS Box Alignment</a> to support gap decorations.</p>
<a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc.
</div>
<h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p> This is a public copy of the editors’ draft.
It is provided for discussion only and may change at any moment.
Its publication here does not imply endorsement of its contents by W3C.
Don’t cite this document other than as work in progress. </p>
<p>Please send feedback
by <a href="https://github.com/w3c/csswg-drafts/issues">filing issues in GitHub</a> (preferred),
including the spec code “css-gap-decorations” in the title, like this:
“[css-gap-decorations] <i>…summary of comment…</i>”.
All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>.
Alternately, feedback can be sent to the (<a href="https://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list <a href="mailto:www-style@w3.org?Subject=%5Bcss-gap-decorations%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a>. </p>
<p>This document is governed by the <a href="https://www.w3.org/2021/Process-20211102/" id="w3c_process_revision">2 November 2021 W3C Process Document</a>. </p>
<p></p>
</div>
<div data-fill-with="at-risk"></div>
<nav data-fill-with="table-of-contents" id="toc">
<h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<ol class="toc" role="directory">
<li>
<a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
<ol class="toc">
<li><a href="#overview"><span class="secno">1.1</span> <span class="content">Overview</span></a>
<li><a href="#placement"><span class="secno">1.2</span> <span class="content">Module Interactions</span></a>
<li><a href="#definitions"><span class="secno">1.3</span> <span class="content">Definitions</span></a>
</ol>
<li>
<a href="#rule-image"><span class="secno">2</span> <span class="content">Rule Images and Gradients</span></a>
<ol class="toc">
<li><a href="#column-rule-image-source"><span class="secno">2.1</span> <span class="content">The <span class="property">column-rule-image-source</span> and <span class="property">row-rule-image-source</span> Properties</span></a>
<li><a href="#column-rule-image-slice"><span class="secno">2.2</span> <span class="content">The <span class="property">column-rule-image-slice</span> and <span class="property">row-rule-image-slice</span> Properties</span></a>
<li><a href="#column-rule-image-repeat"><span class="secno">2.3</span> <span class="content">The <span class="property">column-rule-image-repeat</span> and <span class="property">row-rule-image-repeat</span> Properties</span></a>
<li><a href="#column-rule-image"><span class="secno">2.4</span> <span class="content">The <span class="property">column-rule-image</span> and <span class="property">row-rule-image</span> Shorthands</span></a>
</ol>
<li>
<a href="#size"><span class="secno">3</span> <span class="content">Rule Positioning and Sizing</span></a>
<ol class="toc">
<li><a href="#column-rule-width"><span class="secno">3.1</span> <span class="content">The <span class="property">column-rule-width</span> and <span class="property">row-rule-width</span> Properties</span></a>
<li><a href="#column-rule-length"><span class="secno">3.2</span> <span class="content">The <span class="property">column-rule-length</span> and <span class="property">row-rule-length</span> Properties</span></a>
<li><a href="#column-rule-lateral-inset-start"><span class="secno">3.3</span> <span class="content">The Rule Lateral Inset Properties</span></a>
<li><a href="#resolving-position-and-size-algo"><span class="secno">3.4</span> <span class="content">Resolving a rule’s position and size</span></a>
<li><a href="#column-rule-lateral-inset"><span class="secno">3.5</span> <span class="content">The <span class="property">column-rule-lateral-inset</span> and <span class="property">row-rule-lateral-inset</span> Shorthands</span></a>
<li><a href="#column-rule-longitudinal-inset-start"><span class="secno">3.6</span> <span class="content">The Rule Longitudinal Inset Properties</span></a>
<li><a href="#column-rule-longitudinal-inset"><span class="secno">3.7</span> <span class="content">The <span class="property">column-rule-longitudinal-inset</span> and <span class="property">row-rule-longitudinal-inset</span> Shorthands</span></a>
<li><a href="#column-rule-longitudinal-edge-inset-start"><span class="secno">3.8</span> <span class="content">The Rule Longitudinal Edge Inset Properties</span></a>
<li><a href="#column-rule-longitudinal-edge-inset"><span class="secno">3.9</span> <span class="content">The <span class="property">column-rule-longitudinal-edge-inset</span> and <span class="property">row-rule-longitudinal-edge-inset</span> Shorthands</span></a>
</ol>
<li>
<a href="#row-rule-props"><span class="secno">4</span> <span class="content">Row Rule Style and Color</span></a>
<ol class="toc">
<li><a href="#row-rule-style"><span class="secno">4.1</span> <span class="content">The <span class="property">row-rule-style</span> and <span class="property">row-rule-color</span> Properties</span></a>
<li><a href="#row-rule"><span class="secno">4.2</span> <span class="content">The <span class="property">row-rule</span> Shorthand</span></a>
</ol>
<li>
<a href="#rule-align"><span class="secno">5</span> <span class="content">Rule Alignment</span></a>
<ol class="toc">
<li><a href="#column-rule-align"><span class="secno">5.1</span> <span class="content">The <span class="property">column-rule-align</span> and <span class="property">row-rule-align</span> Properties</span></a>
<li><a href="#column-rule-edge-align"><span class="secno">5.2</span> <span class="content">The <span class="property">column-rule-edge-align</span> and <span class="property">row-rule-edge-align</span> Properties</span></a>
</ol>
<li>
<a href="#rule-extent"><span class="secno">6</span> <span class="content">Rule Extent</span></a>
<ol class="toc">
<li>
<a href="#column-rule-extent"><span class="secno">6.1</span> <span class="content">The <span class="property">column-rule-extent</span> and <span class="property">row-rule-extent</span> Properties</span></a>
<ol class="toc">
<li>
<a href="#rule-extent-grid"><span class="secno">6.1.1</span> <span class="content">Grid Containers</span></a>
<ol class="toc">
<li><a href="#rule-extent-subgrid"><span class="secno">6.1.1.1</span> <span class="content">Subgrid</span></a>
<li><a href="#rule-extent-masonry"><span class="secno">6.1.1.2</span> <span class="content">Masonry</span></a>
</ol>
<li><a href="#rule-extent-flexbox"><span class="secno">6.1.2</span> <span class="content">Flex Containers</span></a>
<li><a href="#rule-extent-table"><span class="secno">6.1.3</span> <span class="content">Table Containers</span></a>
<li><a href="#rule-extent-table-row-group"><span class="secno">6.1.4</span> <span class="content">Table Row Group Containers</span></a>
<li><a href="#rule-extent-multicol"><span class="secno">6.1.5</span> <span class="content">Multi-Column Containers</span></a>
</ol>
</ol>
<li><a href="#rule-containing-rectangle"><span class="secno">7</span> <span class="content">The Rule Containing Rectangle</span></a>
<li><a href="#rule-painting-order"><span class="secno">8</span> <span class="content">Rule Painting Order</span></a>
<li><a href="#rule-overflow"><span class="secno">9</span> <span class="content">Rule Overflow</span></a>
<li>
<a href="#w3c-conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
<ol class="toc">
<li><a href="#w3c-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
<li><a href="#w3c-conformance-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
<li>
<a href="#w3c-partial"><span class="secno"></span> <span class="content"> Partial implementations</span></a>
<ol class="toc">
<li><a href="#w3c-conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
</ol>
<li><a href="#w3c-testing"><span class="secno"></span> <span class="content"> Non-experimental implementations</span></a>
</ol>
<li>
<a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ol class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ol>
<li>
<a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ol class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ol>
<li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ol>
</nav>
<main>
<h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
<p><em>This section is not normative.</em></p>
<h3 class="heading settled" data-level="1.1" id="overview"><span class="secno">1.1. </span><span class="content">Overview</span><a class="self-link" href="#overview"></a></h3>
<p>This is a proposal to add CSS features for decorating <a href="https://drafts.csswg.org/css-align#gaps">gaps</a>.
(Some use cases and background discussion can be found in <a href="https://github.com/w3c/csswg-drafts/issues/2748">issue #2748</a>.)
We propose to extend the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width" id="ref-for-propdef-column-rule-width">column-rule-width</a> property with new values.
Add properties to support images and gradients.
Add properties for aligning the rule to specific anchor points,
specifying its extent area, and to control its position and length within that area.
We add support for row rules by adding the corresponding <a class="property" data-link-type="propdesc">row-*</a> properties.
We also widen the scope of these properties so that they can be used in <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group">table-row-group</a> containers,
as well as <a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container">multi-column containers</a>.</p>
<h3 class="heading settled" data-level="1.2" id="placement"><span class="secno">1.2. </span><span class="content">Module Interactions</span><a class="self-link" href="#placement"></a></h3>
<p>This module extends the definition of the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width" id="ref-for-propdef-column-rule-width①">column-rule-width</a> property,
adding <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value"><percentage></a> and <span class="css">auto</span> values.
We also generalize the existing <span class="css">column-rule-*</span> properties to apply to other
types of containers.
Accordingly, we propose to move the existing <span class="css">column-rule</span> properties from
the <a href="https://drafts.csswg.org/css-multicol">Multi-column</a> spec to
the <a href="https://drafts.csswg.org/css-align">Box Alignment</a> spec.
Additionally, all new properties and shorthands in this proposal are intended
as additions to the <a href="https://drafts.csswg.org/css-align">Box Alignment</a> spec.</p>
<h3 class="heading settled" data-level="1.3" id="definitions"><span class="secno">1.3. </span><span class="content">Definitions</span><a class="self-link" href="#definitions"></a></h3>
<p>In this specification, we will use the term <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="lateral-axis">lateral axis</dfn> to refer to
the axis in which the rule’s thickness grows (i.e. the axis <span class="css">column-rule-width</span> use). The other axis is the rule’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="longitudinal-axis">longitudinal axis</dfn> and
its size in this axis is the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="rule-length">rule length</dfn>.
These definitions are relative to the rule itself and does not depend on if
the rule is a row or column rule, or what the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode">writing-mode</a> is.</p>
<h2 class="heading settled" data-level="2" id="rule-image"><span class="secno">2. </span><span class="content">Rule Images and Gradients</span><a class="self-link" href="#rule-image"></a></h2>
<p>Authors may specify an image or gradient to be used in place of the <span class="css">column-rule-style</span>.
These properties are loosely modeled after the corresponding <a href="https://drafts.csswg.org/css-backgrounds/#border-images"><a class="property" data-link-type="propdesc">border-image-*</a></a> properties.
Rules are one-dimensional though, as opposed to borders which have four sides around an area.
A rule is like a border with just one side rendered with the other sides having <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-style" id="ref-for-propdef-border-style">border-style: none</a>.</p>
<h3 class="heading settled" data-level="2.1" id="column-rule-image-source"><span class="secno">2.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-image-source" id="ref-for-propdef-column-rule-image-source">column-rule-image-source</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-image-source" id="ref-for-propdef-row-rule-image-source">row-rule-image-source</a> Properties</span><a class="self-link" href="#column-rule-image-source"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-image-source">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-image-source">column-rule-image-source</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-image-source">row-rule-image-source</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-images-3/#typedef-image" id="ref-for-typedef-image"><image></a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>none
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container①">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container①">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container①">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table①">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group①">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>N/A
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>the keyword <span class="css">none</span> or the computed <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-images-3/#typedef-image" id="ref-for-typedef-image①"><image></a>
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>discrete
</table>
<p>These properties specify an <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-images-3/#typedef-image" id="ref-for-typedef-image②"><image></a> to use in place of the rendering specified
by the <span class="css">column-rule-style</span>/<span class="css">row-rule-style</span> properties.</p>
<p>As for borders, a rule image is not rendered when the corresponding <span class="css">column-rule-style</span>/<span class="css">row-rule-style</span> is <span class="css">none</span>.</p>
<h3 class="heading settled" data-level="2.2" id="column-rule-image-slice"><span class="secno">2.2. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-image-slice" id="ref-for-propdef-column-rule-image-slice">column-rule-image-slice</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-image-slice" id="ref-for-propdef-row-rule-image-slice">row-rule-image-slice</a> Properties</span><a class="self-link" href="#column-rule-image-slice"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-image-slice">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-image-slice">column-rule-image-slice</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-image-slice">row-rule-image-slice</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod">[<a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#number-value" id="ref-for-number-value"><number [0,∞]></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value①"><percentage [0,∞]></a>]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-num-range" id="ref-for-mult-num-range">{1,2}</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>0
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container②">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container②">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container②">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table②">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group②">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>refer to image size in the rule’s longitudinal axis
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>one or two values, each either a number or percentage
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>discrete
</table>
<p><a class="property" data-link-type="propdesc" href="#propdef-column-rule-image-slice" id="ref-for-propdef-column-rule-image-slice①">column-rule-image-slice</a> specify inward offsets from the start and end edges
of the image in the rule’s longitudinal axis, dividing it into three regions:
two edge areas and one middle area.</p>
<p>When two values are specified, they set the offsets on the start and end sides in
that order. If the end value is missing, it is the same as the start value.</p>
<dl>
<dt><dfn class="css" data-dfn-for="column-rule-image-slice" data-dfn-type="value" data-export id="valdef-column-rule-image-slice-percentage-0"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value②"><percentage [0,∞]></a><a class="self-link" href="#valdef-column-rule-image-slice-percentage-0"></a></dfn>
<dd>Percentages are relative to the image size in the rule’s longitudinal axis
<dt><dfn class="css" data-dfn-for="column-rule-image-slice" data-dfn-type="value" data-export id="valdef-column-rule-image-slice-number-0"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#number-value" id="ref-for-number-value①"><number [0,∞]></a><a class="self-link" href="#valdef-column-rule-image-slice-number-0"></a></dfn>
<dd>Numbers represent pixels in the image (if the image is a raster
image) or vector coordinates (if the image is a vector image).
</dl>
<p>Negative values are not allowed.
Computed values larger than the size of the image are interpreted as <span class="css">100%</span>.</p>
<p>If the image must be sized to determine the slices
(for example, for SVG images with no intrinsic size),
then it is sized using the <a href="https://www.w3.org/TR/css-images-3/#default-sizing"><cite>CSS Images 3</cite> § 4.3.1 Default Sizing Algorithm</a> with no <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#specified-size" id="ref-for-specified-size">specified size</a> and the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①">rule containing rectangle</a> as the <a data-link-type="dfn" href="https://drafts.csswg.org/css-images-3/#default-object-size" id="ref-for-default-object-size">default object size</a>.</p>
<p>The regions given by the <a class="property" data-link-type="propdesc" href="#propdef-column-rule-image-slice" id="ref-for-propdef-column-rule-image-slice②">column-rule-image-slice</a> values may overlap.
However if the sum of the start and end values is equal to or greater than
the size of the image, the middle part becomes empty.</p>
<h3 class="heading settled" data-level="2.3" id="column-rule-image-repeat"><span class="secno">2.3. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-image-repeat" id="ref-for-propdef-column-rule-image-repeat">column-rule-image-repeat</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-image-repeat" id="ref-for-propdef-row-rule-image-repeat">row-rule-image-repeat</a> Properties</span><a class="self-link" href="#column-rule-image-repeat"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-image-repeat">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-image-repeat">column-rule-image-repeat</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-image-repeat">row-rule-image-repeat</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod">stretch <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②">|</a> repeat <span id="ref-for-comb-one③">|</span> round <span id="ref-for-comb-one④">|</span> space
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>stretch
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container③">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container③">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container③">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table③">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group③">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>N/A
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>the specified keyword
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>discrete
</table>
<p>These properties specify how the middle part of a sliced rule image is scaled and tiled.
Values have the following meanings:</p>
<dl>
<dt><dfn class="css" data-dfn-for="column-rule-image-repeat" data-dfn-type="value" data-export id="valdef-column-rule-image-repeat-stretch">stretch<a class="self-link" href="#valdef-column-rule-image-repeat-stretch"></a></dfn>
<dd>The image is stretched to fill the area.
<dt><dfn class="css" data-dfn-for="column-rule-image-repeat" data-dfn-type="value" data-export id="valdef-column-rule-image-repeat-repeat">repeat<a class="self-link" href="#valdef-column-rule-image-repeat-repeat"></a></dfn>
<dd>The image is tiled (repeated) to fill the area.
<dt><dfn class="css" data-dfn-for="column-rule-image-repeat" data-dfn-type="value" data-export id="valdef-column-rule-image-repeat-round">round<a class="self-link" href="#valdef-column-rule-image-repeat-round"></a></dfn>
<dd>The image is tiled (repeated) to fill the area. If it does not
fill the area with a whole number of tiles, the image is rescaled
so that it does.
<dt><dfn class="css" data-dfn-for="column-rule-image-repeat" data-dfn-type="value" data-export id="valdef-column-rule-image-repeat-space">space<a class="self-link" href="#valdef-column-rule-image-repeat-space"></a></dfn>
<dd>The image is tiled (repeated) to fill the area. If it does not
fill the area with a whole number of tiles, the extra space is
distributed around the tiles.
</dl>
<p>The exact process for scaling and tiling the image parts is defined by drawing the equivalent <span class="css">border-image</span> with the top and bottom <span class="css">border-image-slice</span> values set from the corresponding <span class="css">column-rule-image-slice</span> values, and the <span class="css">border-image-slice</span> left value set to <span class="css">100%</span> and
the right value set to <span class="css">0</span>. The <span class="css">border-image-width</span> top value set to the <span class="css">column-rule-image-slice</span> top value. The <span class="css">border-image-width</span> top value set to the <span class="css">column-rule-image-slice</span> bottom value. The <span class="css">border-image-width</span> top value set to zero.</p>
<h3 class="heading settled" data-level="2.4" id="column-rule-image"><span class="secno">2.4. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-image" id="ref-for-propdef-column-rule-image">column-rule-image</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-image" id="ref-for-propdef-row-rule-image">row-rule-image</a> Shorthands</span><a class="self-link" href="#column-rule-image"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-image">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-image">column-rule-image</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-image">row-rule-image</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-column-rule-image-source" id="ref-for-propdef-column-rule-image-source①"><'column-rule-image-source'></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any">||</a> <a class="production" data-link-type="propdesc" href="#propdef-column-rule-image-slice" id="ref-for-propdef-column-rule-image-slice③"><'column-rule-image-slice'></a> <span id="ref-for-comb-any①">||</span> <a class="production" data-link-type="propdesc" href="#propdef-column-rule-image-repeat" id="ref-for-propdef-column-rule-image-repeat①"><'column-rule-image-repeat'></a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container④">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container④">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container④">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table④">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group④">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
</table>
<aside class="example" id="example-c9ee9e2e">
<a class="self-link" href="#example-c9ee9e2e"></a> This <a href="examples/grid-image-001.html">example</a> demonstrates the new
rule image properties presented above in a grid layout with spanning elements.
<figure>
<img height="488" src="media/grid-image-001.png" width="608">
<figcaption> Example of image rules. </figcaption>
</figure>
</aside>
<aside class="example" id="example-0518370f">
<a class="self-link" href="#example-0518370f"></a> Here’s a <a href="examples/grid-image-002.html">variation</a> of the example above
that animates the container’s size and stretch the middle part of the images.
<figure>
<video autoplay loop src="media/grid-image-002.webm"></video>
<figcaption> Example of stretching image rules when the container is resized. </figcaption>
</figure>
</aside>
<aside class="example" id="example-746571da">
<a class="self-link" href="#example-746571da"></a> This is a similar <a href="examples/grid-gradient-001.html">example</a> using gradients.
<figure>
<img height="489" src="media/grid-gradient-001.png" width="608">
<figcaption> Example of gradient rules. </figcaption>
</figure>
</aside>
<aside class="example" id="example-4f51bab9">
<a class="self-link" href="#example-4f51bab9"></a> Here’s an <a href="examples/flexbox-coupon-rule.html">example</a> demonstrating
support for a use case mentioned in <a href="https://github.com/w3c/csswg-drafts/issues/2748#issuecomment-621983931">issue #2748</a>.
It’s a coupon with a perforation rendered by a semi-transparent rule image between two flex items.
<figure>
<img height="108" src="media/flexbox-coupon-rule.png" width="253">
<figcaption> An example of a semi-transparent column rule image. </figcaption>
</figure>
</aside>
<h2 class="heading settled" data-level="3" id="size"><span class="secno">3. </span><span class="content">Rule Positioning and Sizing</span><a class="self-link" href="#size"></a></h2>
<h3 class="heading settled" data-level="3.1" id="column-rule-width"><span class="secno">3.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width" id="ref-for-propdef-column-rule-width②">column-rule-width</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-width" id="ref-for-propdef-row-rule-width">row-rule-width</a> Properties</span><a class="self-link" href="#column-rule-width"></a></h3>
<table class="def propdef partial" data-link-for-hint="column-rule-width">
<tbody>
<tr>
<th>Name:
<td><a class="css" data-link-type="property" href="https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width" id="ref-for-propdef-column-rule-width③">column-rule-width</a>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">New values:</a>
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value③"><percentage></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤">|</a> auto
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>medium
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container⑤">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container⑤">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container⑤">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table⑤">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group⑤">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>refer to the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①①">rule containing rectangle’s</a> size in the rule’s <a data-link-type="dfn" href="#lateral-axis" id="ref-for-lateral-axis">lateral axis</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>absolute length if the specified value is <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-backgrounds-3/#typedef-line-width" id="ref-for-typedef-line-width" title="Expands to: medium | thick | thin"><line-width></a>; <span class="css">0px</span> if the column rule style is <span class="css">none</span> or <span class="css">hidden</span>. Otherwise, the specified value.
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>by computed value type
</table>
<table class="def propdef" data-link-for-hint="row-rule-width">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-width">row-rule-width</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-backgrounds-3/#typedef-line-width" id="ref-for-typedef-line-width①" title="Expands to: medium | thick | thin"><line-width></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#percentage-value" id="ref-for-percentage-value④"><percentage></a> <span id="ref-for-comb-one⑦">|</span> auto
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>medium
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container⑥">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container⑥">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container⑥">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table⑥">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group⑥">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>refer to the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①②">rule containing rectangle’s</a> size in the rule’s <a data-link-type="dfn" href="#lateral-axis" id="ref-for-lateral-axis①">lateral axis</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>absolute length if the specified value is <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-backgrounds-3/#typedef-line-width" id="ref-for-typedef-line-width②" title="Expands to: medium | thick | thin"><line-width></a>; <span class="css">0px</span> if the column rule style is <span class="css">none</span> or <span class="css">hidden</span>. Otherwise, the specified value.
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>by computed value type
</table>
<p>These properties sets the thickness (lateral size) of a rule in the column and row axis, respectively.
Negative specified values are not allowed.
The <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#used-value" id="ref-for-used-value">used value</a> is floored at zero (in case a 'calc()' expression evaluates to a negative value for example).</p>
<p>See <a href="#resolving-position-and-size-algo">§ 3.4 Resolving a rule’s position and size</a> below for how <a class="property" data-link-type="propdesc">auto</a> is resolved.</p>
<h3 class="heading settled" data-level="3.2" id="column-rule-length"><span class="secno">3.2. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-length" id="ref-for-propdef-column-rule-length">column-rule-length</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-length" id="ref-for-propdef-row-rule-length">row-rule-length</a> Properties</span><a class="self-link" href="#column-rule-length"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-length">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-length">column-rule-length</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-length">row-rule-length</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage"><length-percentage></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧">|</a> auto
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>auto
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container⑦">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container⑦">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container⑦">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table⑦">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group⑦">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>refer to the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①③">rule containing rectangle’s</a> size in the rule’s <a data-link-type="dfn" href="#longitudinal-axis" id="ref-for-longitudinal-axis">longitudinal axis</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>the specified value
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>by computed value type
</table>
<p>These properties sets the <a data-link-type="dfn" href="#rule-length" id="ref-for-rule-length">rule length</a> (longitudinal size) of a rule in the column and row axis, respectively.
Negative specified values are not allowed.
The <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#used-value" id="ref-for-used-value①">used value</a> is floored at zero (in case a 'calc()' expression evaluates to a negative value for example).</p>
<p>See <a href="#resolving-position-and-size-algo">§ 3.4 Resolving a rule’s position and size</a> below for how <a class="property" data-link-type="propdesc">auto</a> is resolved.</p>
<p class="note" role="note"><span>Note:</span> These properties work the same as the <a class="property" data-link-type="propdesc">*-rule-width</a> properties in the <a data-link-type="dfn" href="#lateral-axis" id="ref-for-lateral-axis②">lateral axis</a>, except that they have a different initial value.</p>
<h3 class="heading settled" data-level="3.3" id="column-rule-lateral-inset-start"><span class="secno">3.3. </span><span class="content">The Rule Lateral Inset Properties</span><a class="self-link" href="#column-rule-lateral-inset-start"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-lateral-inset-start">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-lateral-inset-start">column-rule-lateral-inset-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-lateral-inset-end">column-rule-lateral-inset-end</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-lateral-inset-start">row-rule-lateral-inset-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-lateral-inset-end">row-rule-lateral-inset-end</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage①"><length-percentage></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨">|</a> auto
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>auto
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container⑧">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container⑧">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container⑧">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table⑧">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group⑧">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>refer to the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①④">rule containing rectangle’s</a> size in the rule’s <a data-link-type="dfn" href="#lateral-axis" id="ref-for-lateral-axis③">lateral axis</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>the specified value
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>by computed value type
</table>
<p>These properties sets the lateral start/end offset of the rule in the column and row axis, respectively.
A positive value moves the position inward and a negative value outward from the corresponding <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①⑤">rule containing rectangle’s</a> edge.</p>
<aside class="example" id="example-2ebfce9b">
<a class="self-link" href="#example-2ebfce9b"></a> This <a href="examples/grid-lateral-002.html">example</a> demonstrates aligning a rule at the start of the gap.
<figure>
<img height="170" src="media/grid-lateral-002.png" width="941">
<figcaption> Examples of aligning a rule at the start of the gap with a lateral start offset. </figcaption>
</figure>
</aside>
<aside class="example" id="example-c7a1d008">
<a class="self-link" href="#example-c7a1d008"></a> This <a href="examples/grid-lateral-003.html">example</a> demonstrates aligning a rule at the end of the gap.
<figure>
<img height="170" src="media/grid-lateral-003.png" width="928">
<figcaption> Examples of aligning a rule at the end of the gap with a lateral end offset. </figcaption>
</figure>
</aside>
<p class="note" role="note"><span>NOTE:</span> The <span class="css">column-rule-lateral-inset</span> and <span class="css">column-rule-width</span> <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#used-value" id="ref-for-used-value②">used values</a> are calculated in a similar way to how <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-position-3/#propdef-left" id="ref-for-propdef-left">left</a>/<a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-position-3/#propdef-right" id="ref-for-propdef-right">right</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-sizing-3/#propdef-width" id="ref-for-propdef-width">width</a> are <a href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-width">calculated</a> for an absolutely positioned
box. The precise algorithm is described next.</p>
<h3 class="heading settled" data-level="3.4" id="resolving-position-and-size-algo"><span class="secno">3.4. </span><span class="content">Resolving a rule’s position and size</span><a class="self-link" href="#resolving-position-and-size-algo"></a></h3>
<p>Given a triplet of values: inset-start/end and a size for an axis, <span class="css">auto</span> values
are resolved so that the sum of the three values equals the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①⑥">rule containing rectangle</a> size in
the same axis. These are the rules for resolving them:</p>
<ol id="rule-sizing">
<li>if all the values are <span class="css">auto</span> then set both inset values to zero and solve for size
<li>if none of the values are <span class="css">auto</span> then the situation is over-constrained: solve by
treating the end inset value as <span class="css">auto</span>
<li>if both inset properties are <span class="css">auto</span>, but the size is not, then solve with the additional constraint
that the inset values must have equal values (resulting in the rule being centered)
<li>if the size is <span class="css">auto</span> and only one of the inset values is <span class="css">auto</span> then set the <span class="css">auto</span> inset value to zero
and solve for size, if that makes size negative then set the size to zero and solve for the <span class="css">auto</span> inset value instead (i.e. the rule is sized to fill the remaining space, until it becomes zero in
which case its positioned at the non-<span class="css">auto</span> inset edge)
<li>if the size is <span class="css">auto</span> and both inset values are non-<span class="css">auto</span> then solve for size,
if that makes the size negative then set the size to zero and solve again by
treating the end inset value as <span class="css">auto</span>
</ol>
<p>These rules resolves the <span class="css">column-rule-width</span>, <span class="css">column-rule-lateral-inset-start</span>, and <span class="css">column-rule-lateral-inset-end</span> triplet
of values in a rule’s lateral axis.</p>
<p>The same rules are also used to resolve <span class="css">column-rule-length</span>, <span class="css">column-rule-longitudinal-[edge-]inset-start</span>, and <span class="css">column-rule-longitudinal-[edge-]inset-end</span> triplet of values in a rule’s longitudinal axis (see the <a href="#column-rule-longitudinal-inset-start">longitudinal</a> property
descriptions below for which of the "edge" or non-"edge" values is used).</p>
<p>Ditto for the corresponding <span class="css">row-rule-*</span> properties.</p>
<aside class="example" id="example-a31fa0e2">
<a class="self-link" href="#example-a31fa0e2"></a> This <a href="examples/grid-lateral-001.html">example</a> demonstrates the rules above.
Note in particular the latter two grids, which shows what happens when the sum of the
insets are greater than the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①⑦">rule containing rectangle’s</a> size. There’s still
a zero-sized column rule there, which the row rule (purple) aligns to.
<figure>
<img height="651" src="media/grid-lateral-001.png" width="997">
<figcaption> Examples of lateral rule sizing with various inset values. </figcaption>
</figure>
</aside>
<h3 class="heading settled" data-level="3.5" id="column-rule-lateral-inset"><span class="secno">3.5. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-lateral-inset" id="ref-for-propdef-column-rule-lateral-inset">column-rule-lateral-inset</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-lateral-inset" id="ref-for-propdef-row-rule-lateral-inset">row-rule-lateral-inset</a> Shorthands</span><a class="self-link" href="#column-rule-lateral-inset"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-lateral-inset">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-lateral-inset">column-rule-lateral-inset</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-column-rule-lateral-inset-start" id="ref-for-propdef-column-rule-lateral-inset-start"><'column-rule-lateral-inset-start'></a> <a class="production" data-link-type="propdesc" href="#propdef-column-rule-lateral-inset-end" id="ref-for-propdef-column-rule-lateral-inset-end"><'column-rule-lateral-inset-end'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
</table>
<table class="def propdef" data-link-for-hint="row-rule-lateral-inset">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-lateral-inset">row-rule-lateral-inset</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-row-rule-lateral-inset-start" id="ref-for-propdef-row-rule-lateral-inset-start"><'row-rule-lateral-inset-start'></a> <a class="production" data-link-type="propdesc" href="#propdef-row-rule-lateral-inset-end" id="ref-for-propdef-row-rule-lateral-inset-end"><'row-rule-lateral-inset-end'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt①">?</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
</table>
<p>These are shortands for specifying the corresponding start/end values.
If one value is specified it is used for both start and end.</p>
<h3 class="heading settled" data-level="3.6" id="column-rule-longitudinal-inset-start"><span class="secno">3.6. </span><span class="content">The Rule Longitudinal Inset Properties</span><a class="self-link" href="#column-rule-longitudinal-inset-start"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-longitudinal-inset-start">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-longitudinal-inset-start">column-rule-longitudinal-inset-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-longitudinal-inset-end">column-rule-longitudinal-inset-end</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-longitudinal-inset-start">row-rule-longitudinal-inset-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-longitudinal-inset-end">row-rule-longitudinal-inset-end</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage②"><length-percentage></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⓪">|</a> auto
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>0
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container⑨">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container⑨">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container⑨">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table⑨">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group⑨">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>refer to the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①⑧">rule containing rectangle’s</a> size in the rule’s <a data-link-type="dfn" href="#longitudinal-axis" id="ref-for-longitudinal-axis①">longitudinal axis</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>the specified value
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>by computed value type
</table>
<p>These properties sets the longitudinal start/end inset of the rule in the column
and row axis, respectively. They are only used on a rule’s edges that are interior.
The <a href="#column-rule-longitudinal-edge-inset-start">*-rule-longitudinal-edge-inset</a> properties are used for rule edges that are on the outer edges of an axis.
The <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#used-value" id="ref-for-used-value③">used values</a> are calculated the same as for the lateral properties above.</p>
<aside class="example" id="example-7f768fba">
<a class="self-link" href="#example-7f768fba"></a> This <a href="examples/grid-lateral-004.html">example</a> shows the default rule alignment and size in both axes.
<figure>
<img height="280" src="media/grid-lateral-004.png" width="514">
<figcaption> Example of a rule with default rule alignment and size in both axes. </figcaption>
</figure>
</aside>
<p class="note" role="note"><span>Note:</span> These have a different initial value than the lateral inset properties, meaning the rule will stretch to fill the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①⑨">rule containing rectangle</a> in this axis. The initial values as specified above are backward compatible with how column rules are sized and positioned in legacy <a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-layout" id="ref-for-multi-column-layout">multi-column layout</a>.</p>
<aside class="example" id="example-156ca2f0">
<a class="self-link" href="#example-156ca2f0"></a> Here’s a few simple <a href="examples/grid-longitudinal-001.html">examples</a> of
the rule sizing and inset properties.
Note that the grid items have <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-4/#propdef-opacity" id="ref-for-propdef-opacity">opacity: 0.5</a> to show any rules underneath them.
<figure>
<img height="889" src="media/grid-longitudinal-001.png" width="629">
<figcaption> Examples of rule sizing and inset values. </figcaption>
</figure>
</aside>
<aside class="example" id="example-3020da77">
<a class="self-link" href="#example-3020da77"></a> This <a href="examples/grid-longitudinal-002.html">example</a> demonstrates
that the inset properties can be animated and that they are relative the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①①⓪">rule containing rectangle</a>,
which itself depends on the <a href="#rule-align">rule’s alignment</a> in its longitudinal axis.
Note that the longitudinal insets in this example are definite and not animated. The reason
they follow the animated lateral position of the rule in the orthogonal axis is that they have <a href="#column-rule-align"><span class="css">rule</span> alignment</a>.
<figure>
<video autoplay loop src="media/grid-longitudinal-002.webm"></video>
<figcaption> Example of rule alignment and animated inset values. </figcaption>
</figure>
</aside>
<h3 class="heading settled" data-level="3.7" id="column-rule-longitudinal-inset"><span class="secno">3.7. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-longitudinal-inset" id="ref-for-propdef-column-rule-longitudinal-inset">column-rule-longitudinal-inset</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-longitudinal-inset" id="ref-for-propdef-row-rule-longitudinal-inset">row-rule-longitudinal-inset</a> Shorthands</span><a class="self-link" href="#column-rule-longitudinal-inset"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-longitudinal-inset">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-longitudinal-inset">column-rule-longitudinal-inset</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-column-rule-longitudinal-inset-start" id="ref-for-propdef-column-rule-longitudinal-inset-start"><'column-rule-longitudinal-inset-start'></a> <a class="production" data-link-type="propdesc" href="#propdef-column-rule-longitudinal-inset-end" id="ref-for-propdef-column-rule-longitudinal-inset-end"><'column-rule-longitudinal-inset-end'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt②">?</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
</table>
<table class="def propdef" data-link-for-hint="row-rule-longitudinal-inset">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-longitudinal-inset">row-rule-longitudinal-inset</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-row-rule-longitudinal-inset-start" id="ref-for-propdef-row-rule-longitudinal-inset-start"><'row-rule-longitudinal-inset-start'></a> <a class="production" data-link-type="propdesc" href="#propdef-row-rule-longitudinal-inset-end" id="ref-for-propdef-row-rule-longitudinal-inset-end"><'row-rule-longitudinal-inset-end'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt③">?</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
</table>
<p>These shortands specify the corresponding start/end values. If one value is specified it is used for both start/end.</p>
<h3 class="heading settled" data-level="3.8" id="column-rule-longitudinal-edge-inset-start"><span class="secno">3.8. </span><span class="content">The Rule Longitudinal Edge Inset Properties</span><a class="self-link" href="#column-rule-longitudinal-edge-inset-start"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-longitudinal-edge-inset-start">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-longitudinal-edge-inset-start">column-rule-longitudinal-edge-inset-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-longitudinal-edge-inset-end">column-rule-longitudinal-edge-inset-end</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-longitudinal-edge-inset-start">row-rule-longitudinal-edge-inset-start</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-longitudinal-edge-inset-end">row-rule-longitudinal-edge-inset-end</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage③"><length-percentage></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①">|</a> auto
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>0
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container①⓪">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container①⓪">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container①⓪">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table①⓪">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group①⓪">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>refer to the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①①①">rule containing rectangle’s</a> size in the rule’s <a data-link-type="dfn" href="#longitudinal-axis" id="ref-for-longitudinal-axis②">longitudinal axis</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>the specified value
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>by computed value type
</table>
<p>These properties are identical to their non-"edge" counter-parts. These properties are used
on the start edge of the first rule that on the container’s start edge in its <a data-link-type="dfn" href="#longitudinal-axis" id="ref-for-longitudinal-axis③">longitudinal axis</a>, and the end edge of the last rule at the end of the container.
For interior rule edges, the <a href="#column-rule-longitudinal-inset-start">non-"edge" properties</a> are used.
In other words, these properties are used together with the <a href="#column-rule-edge-align"><span class="css">*-rule-edge-align</span></a> properties (defined below) and the <span class="css">*-rule-longitudinal-inset</span> properties are used together with <a href="#column-rule-align"><span class="css">*-rule-align</span></a>.</p>
<h3 class="heading settled" data-level="3.9" id="column-rule-longitudinal-edge-inset"><span class="secno">3.9. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-longitudinal-edge-inset" id="ref-for-propdef-column-rule-longitudinal-edge-inset">column-rule-longitudinal-edge-inset</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-longitudinal-edge-inset" id="ref-for-propdef-row-rule-longitudinal-edge-inset">row-rule-longitudinal-edge-inset</a> Shorthands</span><a class="self-link" href="#column-rule-longitudinal-edge-inset"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-longitudinal-edge-inset">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-longitudinal-edge-inset">column-rule-longitudinal-edge-inset</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-column-rule-longitudinal-edge-inset-start" id="ref-for-propdef-column-rule-longitudinal-edge-inset-start"><'column-rule-longitudinal-edge-inset-start'></a> <a class="production" data-link-type="propdesc" href="#propdef-column-rule-longitudinal-edge-inset-end" id="ref-for-propdef-column-rule-longitudinal-edge-inset-end"><'column-rule-longitudinal-edge-inset-end'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt④">?</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
</table>
<table class="def propdef" data-link-for-hint="row-rule-longitudinal-edge-inset">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-longitudinal-edge-inset">row-rule-longitudinal-edge-inset</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-row-rule-longitudinal-edge-inset-start" id="ref-for-propdef-row-rule-longitudinal-edge-inset-start"><'row-rule-longitudinal-edge-inset-start'></a> <a class="production" data-link-type="propdesc" href="#propdef-row-rule-longitudinal-edge-inset-end" id="ref-for-propdef-row-rule-longitudinal-edge-inset-end"><'row-rule-longitudinal-edge-inset-end'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt⑤">?</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
</table>
<p>These shortands specify the corresponding start/end values. If one value is specified it is used for both start/end.</p>
<h2 class="heading settled" data-level="4" id="row-rule-props"><span class="secno">4. </span><span class="content">Row Rule Style and Color</span><a class="self-link" href="#row-rule-props"></a></h2>
<h3 class="heading settled" data-level="4.1" id="row-rule-style"><span class="secno">4.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-row-rule-style" id="ref-for-propdef-row-rule-style">row-rule-style</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-color" id="ref-for-propdef-row-rule-color">row-rule-color</a> Properties</span><a class="self-link" href="#row-rule-style"></a></h3>
<table class="def propdef" data-link-for-hint="row-rule-style">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-style">row-rule-style</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-backgrounds-3/#typedef-line-style" id="ref-for-typedef-line-style" title="Expands to: dashed | dotted | double | groove | hidden | inset | none | outset | ridge | solid"><line-style></a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>none
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container①①">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container①①">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container①①">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table①①">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group①①">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>N/A
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>specified keyword
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>discrete
</table>
<table class="def propdef" data-link-for-hint="row-rule-color">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-color">row-rule-color</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-4/#typedef-color" id="ref-for-typedef-color" title="Expands to: aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | currentcolor | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | none | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | transparent | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"><color></a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>currentcolor
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container①②">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container①②">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container①②">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table①②">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group①②">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>N/A
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>computed color
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>by computed value type
</table>
<p>These properties are the same as the <span class="css">column-</span> properties but for the row rules.</p>
<h3 class="heading settled" data-level="4.2" id="row-rule"><span class="secno">4.2. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-row-rule" id="ref-for-propdef-row-rule">row-rule</a> Shorthand</span><a class="self-link" href="#row-rule"></a></h3>
<p>This shorthand works the same as <span class="css">column-rule</span>.</p>
<table class="def propdef" data-link-for-hint="row-rule">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule">row-rule</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-row-rule-width" id="ref-for-propdef-row-rule-width①"><'row-rule-width'></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any②">||</a> <a class="production" data-link-type="propdesc" href="#propdef-row-rule-style" id="ref-for-propdef-row-rule-style①"><'row-rule-style'></a> <span id="ref-for-comb-any③">||</span> <a class="production" data-link-type="propdesc" href="#propdef-row-rule-color" id="ref-for-propdef-row-rule-color①"><'row-rule-color'></a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>see individual properties
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
</table>
<p class="issue" id="issue-53073ff7"><a class="self-link" href="#issue-53073ff7"></a> lots of new possible shorthands... we now have many
properties (and shorthands) with a <span class="css">column-rule</span> and <span class="css">row-rule</span> prefix.
Should we add shorthands for some of those with a <a class="property" data-link-type="propdesc">rule</a> prefix to specify
both axes, like so: 'rule-foo: <span class="production"><row-rule-foo></span> <span class="production"><column-rule-foo></span>?'.
As usual, we have to be careful with the separator though, to make it
forward-compatible with any changes we might want to make...</p>
<h2 class="heading settled" data-level="5" id="rule-align"><span class="secno">5. </span><span class="content">Rule Alignment</span><a class="self-link" href="#rule-align"></a></h2>
<h3 class="heading settled" data-level="5.1" id="column-rule-align"><span class="secno">5.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-align" id="ref-for-propdef-column-rule-align">column-rule-align</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-align" id="ref-for-propdef-row-rule-align">row-rule-align</a> Properties</span><a class="self-link" href="#column-rule-align"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-align">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-align">column-rule-align</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-align">row-rule-align</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod">[gap <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①②">|</a> gap-center <span id="ref-for-comb-one①③">|</span> gap-over <span id="ref-for-comb-one①④">|</span> rule <span id="ref-for-comb-one①⑤">|</span> rule-center <span id="ref-for-comb-one①⑥">|</span> rule-over]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-num-range" id="ref-for-mult-num-range①">{1,2}</a>
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a>
<td>gap
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a>
<td><a data-link-type="dfn" href="https://drafts.csswg.org/css-multicol-1/#multi-column-container" id="ref-for-multi-column-container①③">multi-column containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container①③">flex containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-container" id="ref-for-grid-container①③">grid containers</a>, <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table" id="ref-for-table①③">table</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-tables-3/#table-row-group" id="ref-for-table-row-group①③">table-row-group</a> containers
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a>
<td>no
<tr>
<th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a>
<td>N/A
<tr>
<th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a>
<td>the specified value
<tr>
<th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a>
<td>per grammar
<tr>
<th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a>
<td>discrete
</table>
<p>These properties specify the start/end attachment point of the <a data-link-type="dfn" href="#rule-containing-rectangle①" id="ref-for-rule-containing-rectangle①①②">rule containing rectangle</a> in the <a data-link-type="dfn" href="#longitudinal-axis" id="ref-for-longitudinal-axis④">longitudinal axis</a>. The start value is specified first, the end value second.
If only one value is specified it is used for both start and end.
These properties are only used for interior edges. The <a class="property" data-link-type="propdesc">*-rule-edge-align</a> properties
described below specify the alignment on the outer edges. The initial value, <span class="css">gap</span>,
means that, by default, a rule will stretch its longitudinal size to fill the space
from the end of the gap "above" to the start of the gap "below" ("above" meaning the gap
in the orthogonal axis on the rule’s start side).</p>
<aside class="example" id="example-d52ec54e">
<a class="self-link" href="#example-d52ec54e"></a> This <a href="examples/grid-align-001.html">example</a> illustrates a few alignment options.
Note that the row rules all have a 1px longitudinal inset
to separate the individual rule segments. (<span class="css">rule-center</span>,
for example, would otherwise look like one long rule)
<p>Note also that the column rule is intentionally not centered in
the gap (to separate the <span class="css">rule-center</span> position
from the <span class="css">gap-center</span> position)</p>
<figure>
<img height="596" src="media/grid-align-001.png" width="692">
<figcaption> Example of <a class="property" data-link-type="propdesc" href="#propdef-row-rule-align" id="ref-for-propdef-row-rule-align①">row-rule-align</a> in a grid container. </figcaption>
</figure>
<p>You might be wondering if there’s a bug in the bottom-right example.
Why is the <span class="css">gap-over</span> not honored there?
That’s a non-interior rule edge and it’s controlled separately with <span class="css">row-rule-edge-align</span>, see below.</p>
</aside>
<h3 class="heading settled" data-level="5.2" id="column-rule-edge-align"><span class="secno">5.2. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-column-rule-edge-align" id="ref-for-propdef-column-rule-edge-align">column-rule-edge-align</a> and <a class="property" data-link-type="propdesc" href="#propdef-row-rule-edge-align" id="ref-for-propdef-row-rule-edge-align">row-rule-edge-align</a> Properties</span><a class="self-link" href="#column-rule-edge-align"></a></h3>
<table class="def propdef" data-link-for-hint="column-rule-edge-align">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-column-rule-edge-align">column-rule-edge-align</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-row-rule-edge-align">row-rule-edge-align</dfn>
<tr class="value">
<th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a>
<td class="prod">[gap <a data-link-type="grammar" href="https://drafts.csswg.org/css-va | |