Skip to content

Commit dc682b0

Browse files
authored
Merge branch 'main' into color-adjust
2 parents 3ba3f1e + cb6bac6 commit dc682b0

66 files changed

Lines changed: 7443 additions & 925 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

css-align-3/Overview.bs

Lines changed: 19 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,186 +2036,23 @@ Default Alignment Shorthand: the 'place-items' property</h3>
20362036
<h2 id='gaps'>
20372037
Gaps Between Boxes</h2>
20382038

2039-
While 'margin' and 'padding' can be used to specify visual spacing around individual boxes,
2040-
it's sometimes more convenient to globally specify spacing
2041-
<em>between</em> adjacent boxes within a given layout context,
2042-
particularly when the spacing is different between sibling boxes
2043-
as opposed to between the first/last box and the container's edge.
2044-
2045-
The 'gap' property,
2046-
and its 'row-gap' and 'column-gap' sub-properties,
2047-
provide this functionality for
2048-
<a href="http://www.w3.org/TR/css3-multicol/">multi-column</a>,
2049-
<a href="http://www.w3.org/TR/css-flexbox/">flex</a>,
2050-
and <a href="http://www.w3.org/TR/css-grid/">grid layout</a>.
2051-
2052-
<h3 id='column-row-gap'>
2053-
Row and Column Gutters: the 'row-gap' and 'column-gap' properties</h3>
2054-
2055-
<pre class='propdef'>
2056-
Name: row-gap, column-gap
2057-
Value: normal | <<length-percentage [0,∞]>> | <<line-width>>
2058-
Initial: normal
2059-
Applies to: <a>multi-column containers</a>, <a>flex containers</a>, <a>grid containers</a>
2060-
Inherited: no
2061-
Percentages: see [[#gap-percent]]
2062-
Computed value: specified keyword, else a computed <<length-percentage>> value
2063-
Animation type: by computed value type
2064-
</pre>
2065-
2066-
These properties specify fixed-length <dfn export lt="gutter">gutters</dfn>
2067-
between items in the container,
2068-
adding space between them--
2069-
in a manner similar to the ''justify-content/space-between'' keyword
2070-
of the <a>content-distribution properties</a>,
2071-
but of a fixed size instead of as a fraction of remaining space.
2072-
The 'column-gap' property specifies spacing between “columns”,
2073-
separating boxes in the container's <a>inline axis</a>
2074-
similar to <a>inline-axis</a> margin;
2075-
while 'row-gap' indicates spacing between “rows”,
2076-
separating boxes in the container's <a>block axis</a>.
2077-
2078-
Values have the following meanings:
2079-
2080-
<dl dfn-type=value dfn-for="row-gap, column-gap, gap">
2081-
: <<length-percentage [0,∞]>>
2082-
: <<line-width>>
2083-
::
2084-
Specifies a gap between “rows” or “columns”,
2085-
as defined by the layout modes to which it applies;
2086-
see subsections below for details.
2087-
2088-
Negative values are invalid.
2089-
For percentages,
2090-
see [[#gap-percent]].
2091-
2092-
: <dfn>normal</dfn>
2093-
:: The value ''gap/normal'' represents
2094-
a used value of ''1em'' on <a>multi-column containers</a>,
2095-
and a used value of ''0px'' in all other contexts.
2096-
</dl>
2097-
2098-
Gutters effect a minimum spacing between items:
2099-
additional spacing may be added by 'justify-content'/'align-content'.
2100-
Such additional space effectively increases the size of these <a>gutters</a>.
2101-
2102-
The exact handling of these properties varies by layout container:
2103-
2104-
<dl>
2105-
<dt id="gap-multicol"><a>multi-column containers</a>
2106-
<dd>
2107-
'column-gap' specifies the [=gutter=] between adjacent <a>column boxes</a>,
2108-
see [[CSS-MULTICOL-1]].
2109-
'row-gap' specifies the [=gutter=] between the rows of [=column boxes=] established by 'column-height',
2110-
see [[CSS-MULTICOL-2]].
2111-
2112-
<dt id="gap-flex"><a>flex containers</a>
2113-
<dd>
2114-
When applied to the <a>main axis</a>
2115-
(e.g. 'column-gap' in a ''flex-flow/row'' <a>flex container</a>),
2116-
indicates the [=gutter=] between items
2117-
(as if an additional fixed-size margin were inserted
2118-
between adjacent <a>flex items</a>
2119-
in a single line).
2120-
2121-
When applied to the <a>cross axis</a>
2122-
(e.g. 'row-gap' in a ''flex-flow/row'' <a>flex container</a>),
2123-
indicates the [=gutter=] between adjacent <a>flex lines</a>.
2124-
2125-
<dt id="gap-grid"><a>grid containers</a>
2126-
<dd>
2127-
The 'row-gap' and 'column-gap' properties,
2128-
when specified on a <a>grid container</a>,
2129-
define the [=gutters=] between <a>grid rows</a> and <a>grid columns</a>,
2130-
respectively.
2131-
See [[css-grid-1#gutters]] for precise details.
2132-
</dl>
2133-
2134-
In all cases, the [=gutter=] disappears when it coincides with
2135-
a [=fragmentation break=]. [[CSS-BREAK-3]]
2136-
2137-
Note: Table boxes do not use the 'gap' properties
2138-
to specify separation between their cells.
2139-
Instead, they use the 'border-spacing' property,
2140-
which has slightly different functionality:
2141-
it inherits,
2142-
and it also specifies the additional spacing between the outermost cells
2143-
and the border of the table
2144-
(similar to ''space-evenly'' rather than ''space-between'').
2145-
2146-
<h3 id='gap-shorthand'>
2147-
Gap Shorthand: the 'gap' property</h3>
2148-
2149-
<pre class='propdef'>
2150-
Name: gap
2151-
Value: <<'row-gap'>> <<'column-gap'>>?
2152-
Initial: see individual properties
2153-
Applies to: <a>multi-column containers</a>, <a>flex containers</a>, <a>grid containers</a>
2154-
Inherited: no
2155-
Percentages: refer to corresponding dimension of the content area
2156-
Computed value: see individual properties
2157-
Animation type: by computed value type
2158-
</pre>
2159-
2160-
This property is a <a>shorthand</a> that sets 'row-gap' and 'column-gap' in one declaration.
2161-
If <<'column-gap'>> is omitted,
2162-
it's set to the same value as <<'row-gap'>>.
2163-
2164-
<div class='example'>
2165-
<figure>
2166-
<img src="images/gutters-gaps.svg" alt="A diagram showing how margins and padding add to the visible gutter size" width="500" height="616">
2167-
</figure>
2168-
2169-
Note: The 'gap' property is only one component of the visible “gutter” or “alley” created between boxes.
2170-
Margins, padding, or the use of distributed alignment
2171-
may increase the visible separation between boxes
2172-
beyond what is specified in 'gap'.
2173-
</div>
2174-
2175-
<h3 id='gap-percent'>
2176-
Percentages In 'gap' Properties</h3>
2177-
2178-
In general,
2179-
gaps introduced by the 'gap' properties
2180-
are intended to act like an empty item/track/etc
2181-
with the gap's size;
2182-
in other words,
2183-
an author should be able to reproduce the effects of 'gap'
2184-
by just inserting additional empty items/tracks/etc
2185-
into the container.
2186-
2187-
'gap' always resolves percentages against
2188-
the corresponding size of the [=content box=]
2189-
of the element.
2190-
When this size is definite,
2191-
the behavior is well-defined
2192-
and consistent across layout modes.
2193-
But since different layout modes treat [=cyclic percentage sizes=] for items/tracks/etc differently,
2194-
'gap' does as well:
2195-
2196-
: In Grid Layout
2197-
::
2198-
<a href="https://www.w3.org/TR/css-sizing-3/#percentage-sizing">As in the min size properties and margins/paddings</a> [[CSS-SIZING-3]],
2199-
[=cyclic percentage sizes=] resolve against zero
2200-
for determining intrinsic size contributions,
2201-
but resolve against the box’s content box
2202-
when laying out the box’s contents.
2203-
2204-
: In Flex Layout
2205-
::
2206-
[=Cyclic percentage sizes=] resolve against zero in all cases.
2207-
2208-
<h3 id='gap-legacy'>
2209-
Legacy Gap Properties: the 'grid-row-gap', 'grid-column-gap', and 'grid-gap' properties</h3>
2210-
2211-
The Grid Layout module was originally written with its own set of [=gutter=] properties,
2212-
before all such properties were unified into the existing 'row-gap'/'column-gap' naming.
2213-
For compatibility with legacy content,
2214-
these grid-prefixed names must be supported as follows:
2215-
2216-
* <dfn property>grid-row-gap</dfn> as a [=legacy name alias=] of the 'row-gap' property
2217-
* <dfn property>grid-column-gap</dfn> as a [=legacy name alias=] of the 'column-gap' property
2218-
* <dfn property>grid-gap</dfn> as a [=legacy name alias=] of the 'gap' property
2039+
<span id="column-row-gap"></span>
2040+
<span id="propdef-row-gap"></span>
2041+
<span id="propdef-column-gap"></span>
2042+
<span id="gutter"></span>
2043+
<span id="valdef-row-gap-normal"></span>
2044+
<span id="gap-multicol"></span>
2045+
<span id="gap-flex"></span>
2046+
<span id="gap-grid"></span>
2047+
<span id="gap-shorthand"></span>
2048+
<span id="propdef-gap"></span>
2049+
<span id="example-06510943"></span>
2050+
<span id="gap-percent"></span>
2051+
<span id="gap-legacy"></span>
2052+
<span id="propdef-grid-row-gap"></span>
2053+
<span id="propdef-grid-column-gap"></span>
2054+
<span id="propdef-grid-gap"></span>
2055+
This section has been moved to [[CSS-GAPS-1#gaps]].
22192056

22202057
<!--
22212058
████████ ███ ██████ ████████ ██ ████ ██ ██ ████████
@@ -2555,6 +2392,8 @@ Changes</h2>
25552392
* Defined that 'justify-self' affects the [=automatic size=] of block-level boxes
25562393
the same way it does for flex and grid items.
25572394
(<a href="https://github.com/w3c/csswg-drafts/issues/12102">Issue 12102</a>)
2395+
* Moved the gap properties to [[!CSS-GAPS-1]].
2396+
(<a href="https://github.com/w3c/csswg-drafts/issues/13089">Issue 13089</a>)
25582397

25592398
See also <a href="https://www.w3.org/TR/2025/WD-css-align-3-20250311/#changes">previous changes</a>.
25602399

css-anchor-position-1/Overview.bs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,8 +2219,8 @@ Conditional Hiding: the 'position-visibility' property {#position-visibility}
22192219

22202220
<pre class=propdef>
22212221
Name: position-visibility
2222-
Value: always | [ anchors-valid || anchors-visible || no-overflow ]
2223-
Initial: anchors-visible
2222+
Value: always | [ anchor-valid || anchor-visible || no-overflow ]
2223+
Initial: anchor-visible
22242224
Applies to: [=absolutely positioned boxes=]
22252225
Percentages: n/a
22262226
Inherited: no
@@ -2239,23 +2239,14 @@ depending on some commonly needed layout conditions.
22392239
(The box is displayed without regard for its anchors
22402240
or its overflowing status.)
22412241

2242-
: <dfn>anchors-valid</dfn>
2242+
: <dfn>anchor-valid</dfn>
22432243
::
2244-
If any of the box's [=required anchor references=]
2245-
do not resolve to a [=target anchor element=],
2244+
If the box references the [=default anchor box=]
2245+
(e.g. using 'position-area', 'anchor()' or 'anchor-size()' functions, or ''anchor-center''),
2246+
but the [=default anchor box=] cannot be resolved,
22462247
the box's 'visibility' property computes to ''force-hidden''.
22472248

2248-
Issue: What is a <dfn dfn for>required anchor reference</dfn>?
2249-
''anchor()'' functions that don't have a fallback value;
2250-
the default anchor *sometimes*?
2251-
Need more detail here.
2252-
2253-
Issue: <em>Any</em> anchors are missing,
2254-
or <em>all</em> anchors are missing?
2255-
I can see use-cases for either, potentially.
2256-
Do we want to make a decision here, or make it controllable somehow?
2257-
2258-
: <dfn>anchors-visible</dfn>
2249+
: <dfn>anchor-visible</dfn>
22592250
::
22602251
If the box has a [=default anchor box=]
22612252
but that [=anchor box=] is [=invisible=] or [=clipped by intervening boxes=],
@@ -2704,6 +2695,14 @@ No Privacy issues have been raised against this document.
27042695
Changes {#changes}
27052696
=======
27062697

2698+
Significant changes since the <a href="https://www.w3.org/TR/2026/WD-css-anchor-position-1-20260327/">27 March 2026 Working Draft</a>:
2699+
* Defined ''position-visibility/anchor-valid'' to (like ''position-visibility/anchor-valid'') only check the [=default anchor box=].
2700+
(<a href="https://github.com/w3c/csswg-drafts/issues/10201">Issue 10201</a>)
2701+
* Renamed <css>anchors-valid</css> and <css>anchors-visible</css>
2702+
to ''position-visibility/anchor-valid'' and ''position-visibility/anchor-visible''
2703+
since they only reference the [=default anchor box=].
2704+
(<a href="https://github.com/w3c/csswg-drafts/issues/10201">Issue 10201</a>)
2705+
27072706
Significant changes since the <a href="https://www.w3.org/TR/2026/WD-css-anchor-position-1-20260130/">30 January 2026 Working Draft</a>:
27082707
* Added ''position-area/match-parent'' value to 'position-area'.
27092708
(<a href="https://github.com/w3c/csswg-drafts/issues/8913">Issue 8913</a>)

css-cascade-6/Overview.bs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,8 @@ Identifying Scoping Roots and Limits</h4>
771771
: Finding any [=scoping limits=]
772772
:: For each [=scope=] created by a [=scoping root=],
773773
its [=scoping limits=] are set to all elements
774-
that are [=in scope=] and that match <<scope-end>>,
774+
that are [=descendants=] of the [=scoping root=]
775+
and that match <<scope-end>>,
775776
interpreting '':scope'' and ''&''
776777
exactly as in [=scoped style rules=].
777778

0 commit comments

Comments
 (0)