diff --git a/animation-triggers-1/Overview.bs b/animation-triggers-1/Overview.bs index 8506335c7251..a0e5dbe1a760 100644 --- a/animation-triggers-1/Overview.bs +++ b/animation-triggers-1/Overview.bs @@ -391,7 +391,7 @@ urlPrefix: https://www.w3.org/TR/web-animations-1/; type: dfn
 	Name: timeline-trigger
-	Value: none | [ <<'timeline-trigger-name'>> <<'timeline-trigger-source'>> <<'timeline-trigger-activation-range'>> [ '/' <<'timeline-trigger-active-range'>> ]? ]#
+	Value: none | [ <<'timeline-trigger-name'>> <<'timeline-trigger-source'>> <<'timeline-trigger-activation-range'>> [ / <<'timeline-trigger-active-range'>> ]? ]#
 	
The 'timeline-trigger' [=shorthand property=] diff --git a/css-align-3/Overview.bs b/css-align-3/Overview.bs index f2300b7efb4d..023b07495c7c 100644 --- a/css-align-3/Overview.bs +++ b/css-align-3/Overview.bs @@ -2145,7 +2145,8 @@ Determining the Baselines of a Box
tables
The first/last [=baseline set=] of a table box - is the first/last [=baseline set=] of its first/last row. + is the first/last [=baseline set=] of its first/last row + (after any reordering of [=table row groups=]). When finding the first/last baseline set of an inline-block, any baselines contributed by table boxes must be skipped. @@ -2153,16 +2154,43 @@ Determining the Baselines of a Box
table rows
- If any cells in the row participate in - ''first baseline''/''last baseline'' alignment - along the [=inline axis=], - the first/last [=baseline set=] of the row - is generated from their shared alignment baseline - and the row's first available font, - after alignment has been performed. - Otherwise, the first/last [=baseline set=] of the row - is synthesized from the lowest and highest content edges of the cells in the row. - [[!CSS2]] + The first [=baseline set=] of a [=table row box=] + is taken from the first available of: + + 1. If any cells in the row participate in + first [=baseline alignment=] along the table’s [=inline axis=], + [=generate=] a [=baseline set=] from their shared [=alignment baseline=] + and the row’s [=first available font=], + after alignment has been performed. + + 2. Otherwise, if any cells in the row participate in + last [=baseline alignment=] along the table’s [=inline axis=], + [=generate=] from that [=alignment baseline=]. + + + + 4. Otherwise, if the row is not empty, + [=synthesize=] from the lowest and highest [=content edges=] + of all the cells in the row. + See [[css2#height-layout]]. + + 5. Otherwise, + use the [=block-start=] [=content edge=] of the [=table row box=] itself + as the [=alignment baseline=]. + + For this purpose, + any [=table cell=] that spans multiple rows + is ignored if it’s span does not start in this row; + except that for step 2, + it's ignored if its span does not end in this row. + + Last baselines are analogous + (with “first”/“last” and “start”/“end” inverted). Spanning cells participate only in the first/last row that they span for the purpose of ''first baseline''/''last baseline''. diff --git a/css-anchor-position-1/Overview.bs b/css-anchor-position-1/Overview.bs index cee9b4434598..8a8911346c51 100644 --- a/css-anchor-position-1/Overview.bs +++ b/css-anchor-position-1/Overview.bs @@ -458,7 +458,7 @@ in anchor positioning. if all of the following are true: * |possible anchor| is either an [=element=] - or a fully styleable [=tree-abiding pseudo-element=]. + or a [=fully styleable pseudo-elements=]. * |possible anchor| is in scope for |positioned el|, per the effects of 'anchor-scope' on |possible anchor| @@ -573,6 +573,12 @@ is the box's default anchor box. +If an element has a [=default anchor element=], +then the [=scrollable containing block=] is used in place of the [=local containing block=] +when the [=absolute-position containing block=] is generated by a [=scroll container=], +so that the entire [=scrollable overflow area=] (typically) is available +for positioning. + ### Implicit Anchor Elements ### {#implicit} Some specifications can define that, @@ -687,10 +693,6 @@ what area of this [=position-area grid=] to lay out the positioned box in. Values other than ''position-area/none'' have the following additional effects: -* The [=scrollable containing block=] is used in place of the [=local containing block=] - when the [=absolute-position containing block=] is generated by a [=scroll container=], - so that the entire [=scrollable overflow area=] (typically) is available - for positioning. * The [=used value=] of any ''top/auto'' [=inset properties=] and ''margin/auto'' [=margin properties=] resolves to ''0''. @@ -1366,10 +1368,7 @@ then it is centered (insofar as possible) over the [=default anchor box=] in the relevant axis. Additionally: -* The [=scrollable containing block=] is used in place of the [=local containing block=] - where applicable, - so that the entire [=scrollable overflow area=] (typically) is available - for positioning. + * The [=used value=] of any ''top/auto'' [=inset properties=] and ''margin/auto'' [=margin properties=] resolves to ''0''. @@ -1504,12 +1503,12 @@ or being positioned partially off screen. To ameliorate this, an [=absolutely positioned=] box can use the 'position-try-fallbacks' property -to specify additional [=position options=] +to specify additional position options (variant sets of positioning/alignment properties generated from the box's existing styles, or specified in ''@position-try'' rules) that the UA can try if the box overflows its initial position. -Each is applied to the box, +Each [=position option=] is applied to the box, one by one in the order specified by 'position-try-order', and the first that doesn't cause the box to overflow its [=containing block=] @@ -1563,17 +1562,18 @@ Applies to: [=absolutely positioned boxes=] Animation type: discrete -This property provides a list of alternate positioning styles -to try when the [=absolutely positioned box=] -overflows its [=inset-modified containing block=]. -This position options list -initially contains a single [=position option=] -generated from the element's fallback base styles, -i.e. the [=computed values|computed styles=] without applying 'position-try-fallbacks'. +This property provides a list of additional, alternative [=position options=] +to try in order to prevent the [=absolutely positioned box=] +from overflowing its [=inset-modified containing block=]. -Each comma-separated entry in the list is a separate option: +Each comma-separated entry in the list is a separate [=position option=]: either the name of a ''@position-try'' block, -or a <> representing an automatic transformation of the box's existing computed style. +or a <> representing an automatic transformation +of the box's existing computed style (its fallback base styles). +Together with the [=fallback base styles=], +these options form the position options list +from which the effective style is chosen, +see [[#fallback-apply]]. Values have the following meanings: @@ -1581,7 +1581,8 @@ Values have the following meanings: : none :: The property has no effect; - the box's [=position options list=] is empty. + the box's [=position options list=] + consists only of the [=fallback base styles=]. : <> :: @@ -1597,8 +1598,8 @@ Values have the following meanings: :: Automatically creates a [=position option=] by [=executing a try-tactic|executing the specified try tactic=] - to the box's [=base styles=], - then adding the constructed [=position option=] + on the box's [=base styles=], + then adding this constructed [=position option=] to the box's [=position options list=].
@@ -1685,10 +1686,10 @@ Inherited: no
 Animation Type: discrete
 
-This property allows an element to sort its [=position options=] -by the available space they define, -if it's more important for the box to have as much space as possible -rather than strictly following the order declared in 'position-try-fallbacks'. +This property allows an element to sort its [=position option list=] +by the available space they produce. +This allows the box to prioritize having more layout space +over strictly following the order declared in 'position-try-fallbacks'.
 <> = most-width | most-height | most-block-size | most-inline-size
@@ -1846,11 +1847,10 @@ The ''@position-try'' Rule {#fallback-rule}
 -------------------------------
 
 The @position-try rule
-defines a position option
-with a given name,
+defines a [=position option=] with a given name,
 specifying one or more sets of positioning properties
 that can be applied to a box
-via 'position-try-fallbacks',
+via 'position-try-fallbacks'.
 
 The syntax of the ''@position-try'' rule is:
 
@@ -1863,10 +1863,10 @@ The syntax of the ''@position-try'' rule is:
 The <> specified in the prelude
 is the rule's name.
 If multiple ''@position-try'' rules are declared with the same name,
-they [=cascade=] the same as ''@keyframe'' rules do.
+they [=cascade=] (overriding each other) the same as ''@keyframes'' rules do.
 
-The ''@position-try'' rule only accepts
-the following [=properties=]:
+The ''@position-try'' rule only accepts
+the following accepted @position-try properties:
 
 * [=inset properties=]
 * [=margin properties=]
@@ -2035,7 +2035,7 @@ and thus trigger special behavior. These fallback-sensitive changes i
 		have been added, removed, or mutated.
 
 	For this purpose, only changes to the computed base style are considered,
-	i.e. the [=computed style=] ignoring any declarations originating
+	i.e. the [=computed value=] ignoring any declarations originating
 	from the Transitions or Animations [=cascade origins=].
 
 
@@ -2219,8 +2219,8 @@ Conditional Hiding: the 'position-visibility' property {#position-visibility}
 Name: position-visibility
-Value: always | [ anchors-valid || anchors-visible || no-overflow ]
-Initial: anchors-visible
+Value: always | [ anchor-valid || anchor-visible || no-overflow ]
+Initial: anchor-visible
 Applies to: [=absolutely positioned boxes=]
 Percentages: n/a
 Inherited: no
@@ -2239,23 +2239,14 @@ depending on some commonly needed layout conditions.
 		(The box is displayed without regard for its anchors
 		or its overflowing status.)
 
-	: anchors-valid
+	: anchor-valid
 	::
-		If any of the box's [=required anchor references=]
-		do not resolve to a [=target anchor element=],
+		If the box references the [=default anchor box=]
+		(e.g. using 'position-area', 'anchor()' or 'anchor-size()' functions, or ''anchor-center''),
+		but the [=default anchor box=] cannot be resolved,
 		the box's 'visibility' property computes to ''force-hidden''.
 
-		Issue: What is a required anchor reference?
-		''anchor()'' functions that don't have a fallback value;
-		the default anchor *sometimes*?
-		Need more detail here.
-
-		Issue: Any anchors are missing,
-		or all anchors are missing?
-		I can see use-cases for either, potentially.
-		Do we want to make a decision here, or make it controllable somehow?
-
-	: anchors-visible
+	: anchor-visible
 	::
 		If the box has a [=default anchor box=]
 		but that [=anchor box=] is [=invisible=] or [=clipped by intervening boxes=],
@@ -2309,6 +2300,10 @@ depending on some commonly needed layout conditions.
 	rather than also floating in a nonsensical location.
 
 
+User agents may recognize anchors-valid and anchors-visible
+as [=legacy value aliases=] of ''anchor-valid'' and ''anchor-visible''
+(but are not required to).
+
 
+	2. Let |alpha mult| be 1 - |leftover|,
 		interpreting |leftover| as a number between 0 and 1.
-	4. If |items| is length 1,
+	3. If |items| is length 1,
 		set |color| to the color of that sole item,
 		converted to the specified interpolation <>.
 
@@ -314,7 +316,10 @@ Otherwise, use the specified colorspace for mixing.
 				Let |combined percentage| be the sum of |a| and |b|’s percentages.
 			2. Interpolate |a| and |b|’s colors
 				as described in [[css-color-4#interpolation]],
-				with a progress percentage equal to (|b|’s percentage) / |combined percentage|).
+				with a progress percentage equal to
+				(|b|’s percentage) / |combined percentage|),
+				if |combined percentage| is greater than 0,
+				and 0.5 otherwise.
 				If the specified color space is a [=cylindrical polar color=] space,
 				then the <> controls the
 				interpolation of hue, as described in
@@ -325,8 +330,8 @@ Otherwise, use the specified colorspace for mixing.
 				and a percentage of |combined percentage|,
 				and [=stack/push=] it onto |item stack|.
 		3. Set |color| to the color of the sole remaining item in |item stack|.
-	5. Multiply the alpha component of |color| by |alpha mult|.
-	6. Return |color|.
+	4. Multiply the alpha component of |color| by |alpha mult|.
+	5. Return |color|.
 
 	Note: In [=cylindrical polar color=] spaces,
 	mixing is order-dependent,
@@ -2781,7 +2786,7 @@ or any other color or monochrome output device which has been characterized.
 	Reacting to the used color-scheme: the ''light-dark()'' Function
 
- System colors have the ability to react to the current used ''color-scheme'' value. + [=System colors=] have the ability to react to an element's [=color scheme=]. The ''light-dark()'' function exposes the same capability to authors. There are two forms of this function: one takes a pair of colors @@ -2800,23 +2805,18 @@ or any other color or monochrome output device which has been characterized.
For the color form, this function computes to the computed value of the first color, - if the used color scheme is ''light'' or unknown, + if the element color scheme is ''light'', or to the computed value of the second color, - if the used color scheme is ''dark''. + if the element color scheme is ''dark''. For the image form, this function returns the first image, - if the used color scheme is ''light'' or unknown, + if the element color scheme is ''light'', or the second image, - if the used color scheme is ''dark''. - The none keyword - produces a fully transparent image - with no natural size. + if the element color scheme is ''dark''. - It is equivalent to a single-stop gradient whose stop color is ''transparent''': - -
-		linear-gradient(transparent)
-	
+ The none keyword + computes to ''image(transparent)'' + (a fully transparent image with no natural size).
For example, to maintain a legible contrast on links, @@ -2838,35 +2838,41 @@ or any other color or monochrome output device which has been characterized. is used in dark mode. (WCAG contrast 13.28:1, AAA pass). -
-

Legible link text

-

Illegible link text

-

Legible link text

-
+
+

Legible link text

+

Illegible link text

+

Legible link text

+
-
- For example, to provide easily visible list bullets - for light mode and dark mode: +
+ For example, to provide easily visible list bullets + for light mode and dark mode: -
-			ul.fancy {
-			    list-style-image: light-dark(
-					url("icons/deep-maroon-ball.png"),
-					url("icons/pale-yellow-star.png")
-				);
-			}
+		
+		ul.fancy {
+			list-style-image: light-dark(
+				url("icons/deep-maroon-ball.png"),
+				url("icons/pale-yellow-star.png")
+			);
+		}
+	
+
+ +
+ For example, a raster image is used in light mode, + while in dark mode we want a fully-transparent image. + +
+			background-image: light-dark(url(my-light-image.png), none);
 		
-
-
- For example, a raster image is used in light mode, - while in dark mode we want a fully-transparent image. + This is equivalent to: -
-				background-image: light-dark(url(my-light-image.png), none);
-			
-
+
+			background-image: light-dark(url(my-light-image.png), image(transparent));
+		
+
@@ -3904,6 +3910,16 @@ This specification adds a way to ensure adequate contrast for text whose backgro
    +
  • Removed special casing of 100% from the color-mix() algorithm, + thus avoiding a discontinuity near fully-transparent colors + (Issue 14014), + (Issue 13996) +
  • +
  • + Guarded against division by zero in the color-mix() algorithm + (Issue 14013), + (Issue 13996) +
  • Added a backlink from Color Interpolation in this specification, to the same section in CSS Color 4 where most of this is defined (Issue 13788) diff --git a/css-color-adjust-1/Overview.bs b/css-color-adjust-1/Overview.bs index ab79a23479fd..6add2cb7d4d6 100644 --- a/css-color-adjust-1/Overview.bs +++ b/css-color-adjust-1/Overview.bs @@ -20,7 +20,6 @@ Editor: Tab Atkins Jr., Google, http://www.xanthir.com/contact/, w3cid 42199 Abstract: This module introduces a model and controls over automatic color adjustment by the user agent to handle user preferences, such as "Dark Mode", contrast adjustment, or specific desired color schemes. Ignored Terms: -webkit-tap-highlight-color, name, the head element WPT Path Prefix: css/css-color-adjust/ -WPT Display: open @@ -990,8 +990,7 @@ Line Spacing: the 'line-height' property
    <>
    The [=preferred line height=] - is this percentage of the element's used 'font-size'. - The [=computed value=] of the property + and [=computed value=] of the property is this percentage of the element's computed 'font-size'. Negative values are illegal. diff --git a/css-link-params-1/Overview.bs b/css-link-params-1/Overview.bs index 9fb1a4834eed..fa28c4aac9ec 100644 --- a/css-link-params-1/Overview.bs +++ b/css-link-params-1/Overview.bs @@ -2,10 +2,11 @@ Title: CSS Linked Parameters Module Level 1 Shortname: css-link-params Level: 1 -Status: ED +Status: FPWD Group: CSSWG -Work Status: exploring +Work Status: refining ED: https://drafts.csswg.org/css-link-params/ +TR: https://www.w3.org/TR/css-link-params-1/ Editor: Tab Atkins-Bittner, Google, http://xanthir.com/contact/ Editor: Daniel Holbert, Mozilla Editor: Jonathan Watt, Mozilla @@ -19,6 +20,7 @@ spec:html; type:element text: iframe text: a spec:fill-stroke-3; type:property; text:fill +spec:css-env-1; type:function; text:env() Introduction {#intro} @@ -178,11 +180,14 @@ The syntax of an SVG parameter fragment identifie Multiple [=link parameters=] can be passed to an image by appending multiple [=param()=] fragment identifiers to the URL. +When combined, either with each other or with other "fragment identifiers", +each value is separated with an & character, +as in a URL's query parameters.
    For example, if the image from the previous example also used ''env(--bg-color)'', it could be referenced with a url like - “http://example.com/image.svg#param(--text-color,blue)param(--bg-color,white)” + “http://example.com/image.svg#param(--text-color,blue)&param(--bg-color,white)” to set both ''env(--text-color)'' and ''env(--bg-color)''.
    @@ -258,31 +263,23 @@ accessible with the ''env()'' function in stylesheets. 1. On each ''env()'' function, provide a fallback value, like ''fill: env(--color, blue)''. 2. If the ''env()'' is going to be used a lot, such that providing a fallback for each individual ''env()'' is troublesome, - store the [=custom environment variable=] in a [=scoped environment variable=] - of a different name, + store the [=custom environment variable=] in a [=custom property=] on the root element with the default specified, like:
    -			@env --color2: env(--color, blue);
    -
    -			/* Alternately, store it in a custom property: */
     			:root {
     				--color: env(--color, blue);
     			}
     		
    In this example, if ''--color'' is provided via a [=linked parameter=], - ''env(--color2)'' will contain its value. + ''var(--color)'' will contain its value. If not, it will contain the default ''blue'' value. - In either case, ''env(--color2)'' can be used in the stylesheet unconditionally, + In either case, ''var(--color)'' can be used in the stylesheet unconditionally, secure in the knowledge that it will always have a value. -Note: When we define ''env(parent --color)'' to jump up a scope level, -you won't need to do the rename; -''@env --color: env(parent --color);'' will work just fine. -

    Privacy Considerations

    diff --git a/css-navigation-1/Overview.bs b/css-navigation-1/Overview.bs index 479c46e3a6f2..25f70faf9c6f 100644 --- a/css-navigation-1/Overview.bs +++ b/css-navigation-1/Overview.bs @@ -9,12 +9,13 @@ ED: https://drafts.csswg.org/css-navigation-1/ !Issue Tracking: w3c/csswg-drafts#12594 Editor: L. David Baron, Google https://www.google.com/, https://dbaron.org/, w3cid 15393 Editor: Noam Rosenthal, Google https://www.google.com/, w3cid 121539 -Abstract: This module contains conditional CSS rules for styling conditioned on the current URL - or conditioned on the status of navigating between particular URLs. +Abstract: This module contains conditional CSS rules for styling + conditioned on the status of navigating between particular URLs. @@ -23,6 +24,8 @@ url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-naviga type: dfn; spec: html; text: from entry; url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#window-navigation-api type: dfn; spec: html; text: navigation API; +url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-current-entry + type: dfn; spec: html; text: current entry; for: navigation API; url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#ongoing-navigate-event type: dfn; spec: html; text: ongoing navigate event; url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigation-transition @@ -31,46 +34,90 @@ url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-act type: dfn; spec: html; text: activation; url: https://html.spec.whatwg.org/multipage/browsing-the-web.html#has-been-revealed type: dfn; spec: html; text: has been revealed; +url: https://html.spec.whatwg.org/multipage/browsing-the-web.html#ongoing-navigation + type: dfn; spec: html; text: ongoing navigation; url: https://drafts.csswg.org/css-view-transitions-1/#capture-the-image type: dfn; spec: css-view-transitions-1; text: capture the image; -

    Declaring named URL patterns: the ''@route'' rule

    +

    Defining URL patterns in CSS

    + +

    The <> value type

    + +
    +<> = <> | <> | <>
    +<> = <>
    +
    + +A <> is defined to +match a [=/URL=]-or-null input if input is non-null, and: + +
    + +: the <> is a <> +:: [=URL pattern/match|match a URL pattern=] is non-null given + urlPattern as + the [=URL pattern=] represented by the ''@route'' rule referenced by the name and + input as input. + +: the <> is a <> +:: [=URL pattern/match|match a URL pattern=] is non-null given + urlPattern as + the [=URL pattern=] represented by the function (see + [=create a URL pattern for url-pattern()=]) and + input as input. + +: the <> is a <> +:: The given [=/URL=] [=url/equals=] input. + +
    + +

    Declaring named URL patterns: the ''@route'' rule

    The @route rule -is an at-rule that associates a name with a [=URL pattern=]. +is an at-rule that associates an author-defined name with a [=URL pattern=]. This name can be referenced in ''@navigation'' rules -and in '':link-to()'' pseudo-classes. +and in '':active-navigation()'' pseudo-classes. -The syntax of the ''@route'' rule is: +The syntax of the ''@route'' rule is described by the <> production in:
    -@route <> {
    -  [ <> | <> ]
    -}
    +<> = @route <> { <> }
     
    -based on the following definitions: +This means that the rule accepts a sequence of descriptors +that have the syntax of declarations. +However, in valid style sheets the only descriptors must match +the <> production below. +Any other descriptors are ignored. -
    -<> = ;* <> ;*
    +
    +<> = <> |
    +                     <> |
    +                     <>
     <> = pattern : <>
    -<> = ;* <> [ ;+ <> ]* ;*
     <> = <> : <>
     <> = protocol | hostname | port | pathname |
    -                         search | hash | base-url
    +                         search | hash
    +<> = base-url : stylesheet | document | <>
     
    -This associates an author-defined keyword with a URL pattern, -so that any URL that matches one of the URL patterns -matches the route named by the keyword. + +If two valid descriptors in a single rule have the same name, +the last one is used and the others are ignored. +If a rule has both a valid <> +and a valid <> +then it is ignored. The ''@route'' rule can be defined in one of two ways: : with the pattern descriptor :: in this case the URL pattern represented is - the one represented by the <> function - given as the descriptor's value. + the result of invoking + [=create a URL pattern for url-pattern()=] given + arg as the argument to the ''url-pattern()'' function + and baseURLSpecifier as + the (optional) value of the rule's <>. : with the other descriptors named by <> :: In this case the URL pattern represented is the result of invoking [=URL pattern/create|create a URL pattern=] given @@ -78,23 +125,22 @@ The ''@route'' rule can be defined in one of two ways: constructed from the descriptors and their values. Each dictionary member is given the value of the descriptor with the same name, - except the baseURL member is given the value of - the base-url descriptor. - If a base-url descriptor is not given then one is created from - the [=style resource base URL=] of the rule. + except the baseURL member is given the result of + [=create a URL for a base descriptor=] + given baseURLSpecifier as + the (optional) value of the rule's <>. ISSUE: Should this use <>, <>, or <> for the route names? -ISSUE: Is there value in being able to provide a list of <> -rather than just one? +ISSUE: Should we use base-url or just base as the descriptor name? NOTE: The list of allowed init descriptors does not include username or password since they seem unlikely to be useful.
    It's possible that this syntax with init descriptors in the ''@route'' rule -would make more sense as part of the ''urlpattern()'' function +would make more sense as part of the ''url-pattern()'' function (that is, as an alternate syntax for what goes inside the function). This would also give us the option to remove the braces from @@ -108,18 +154,18 @@ but it could also be added back later if we need it. Either this rule:
     @route --movie-list {
    -  pattern: url-pattern("/movie-list");
    +  pattern: url-pattern("/movies");
     }
     
    or this rule:
     @route --movie-list {
    -  pathname: "/movie-list";
    +  pathname: "/movies";
     }
     
    define an ''@route'' rule that associates the name --movie-list -with the URL "/movie-list" resolved relative to the style sheet. +with the URL "/movies" resolved relative to the style sheet.
    NOTE: The bracing syntax also allows for future expansion if needed. @@ -127,6 +173,492 @@ NOTE: The bracing syntax also allows for future expansion if needed. NOTE: Some of the design discussion for this feature has been in w3c/csswg-drafts#12594. +

    The ''url-pattern()'' function

    + + + +The url-pattern() function represents a [=URL pattern=], +which can be used to match URLs. + +
    +<> = url-pattern( <> )
    +
    + +This function represents the [=URL pattern=] resulting from +invoking [=create a URL pattern for url-pattern()=] with its string argument. + +The syntax used in the ''url-pattern()'' function follows that of [=URL Pattern=]. +It is a [=pattern string=] directly based on the syntax used by +the popular path-to-regexp JavaScript library. + +
    +Pattern strings can contain capture groups, which by default match the shortest possible string, +up to a component-specific separator (/ in the pathname, . in the hostname). + +For example, the pathname pattern "/movies/:id" +will match "/movies/123" +but not "/movies/123/cast". + +A regular expression enclosed in parentheses can also be used instead, +so the pathname pattern "/blog/:id(\\d+)" +will match "/movies/123" +but not "/movies/css". + +You may also omit the name of the capture group by using only a regular expression, +for example "/blog/(\\d+)". + +A group can also be made optional by using the ? modifier or by wrapping it in braces. +For example, the patterns "/movies/:id?" and "/movies{/:id}" +will match both "/movies" and "/movies/123" (but not "/movies/"). + +A full wildcard * can also be used to match as much as possible, +as in the pattern "/*/movies". +This too can be given a name, for example "/*lang/movies". +
    + +The steps of the create a URL pattern for url-pattern() algorithm, +given a string arg and +an optional baseURLSpecifier +which can be ''document'', ''stylesheet'', or a URL, are: + +1. Let baseURL be the result of + [=create a URL for a base descriptor=] given baseURLSpecifier. + +1. Return the result of [=URL pattern/create|create a URL pattern=] given + arg, baseURL, and an empty [=map=]. + +NOTE: This function requires that its argument is quoted. +This differs from the ''url()'' function, +which allows its argument to be quoted or unquoted. + +The create a URL for a base descriptor algorithm, given +an optional baseURLSpecifier +which can be ''document'', ''stylesheet'', or a URL, is: + +
    + +: if baseURLSpecifier is not present or is ''stylesheet'' +:: the [=style resource base URL=] of + the rule or declaration block containing the ''url-pattern()'' function. + +: if baseURLSpecifier is ''document'' +:: the [=document base URL=] of the document + +: if baseURLSpecifier is a URL +:: baseURLSpecifier + +
    + +
    +This rule: +
    +@route --movie-detail {
    +  pattern: url-pattern("/movies/:id");
    +}
    +
    +defines an ''@route'' rule that associates +the name --movie-detail +with any URL that matches the [=URL pattern=] /movies/:id. + +Any of the following URLs (relative to the style sheet) match: + +
      +
    • /movies/123
    • +
    • /movies/456
    • +
    • /movies/something
    • +
    + +These URLs will not match: + +
      +
    • /movies/123/ — The trailing slash is not matched by the pattern
    • +
    • /movies/456/extra — The /extra is not matched by the pattern
    • +
    +
    + +
    +To have the --movie-details route +match only numeric :id values, +define the route eiter as: + +
    +@route --movie-detail {
    +  pattern: url-pattern("/movies/:id(\\d+)");
    +}
    +
    + +or as: + +
    +@route --movie-detail {
    +  pattern: url-pattern("/movies/(\\d+)");
    +}
    +
    + +This way, /movies/something won’t be matched by the route. + +NOTE: Even though the capture groups are not currently exposed, +it is recommended to give the capture groups a name for future use. +
    + +
    +Should the default always be ''stylesheet''? +For use of ''url-pattern()'' in ''@navigation'', +it's likely more useful for the base URL +to be the document URL rather than the style sheet URL. +However, it would be very awkward for ''url-pattern()'' +to be inconsistent with ''url()''. + +Also see other proposed uses of {{URLPattern}} in CSS +in , +for '':local-link''. +
    + + +To serialize a ''url-pattern()'' function f, +[=serialize a function=] f, +using [=serialize a string=] on the single argument +to serialize f's contents. + +NOTE: This is defined this way because {{URLPattern}} +intentionally does not provide a serialization. + + + + + +This specification defines a new +'':link-to()'' functional pseudo-class +that matches link elements that link to a certain URL. + +
    +A simple example of a '':link-to()'' selector is this one, +which matches any links that link to the site's homepage: + +
    +:link-to(url-pattern("/")) {
    +  font-weight: bold;
    +}
    +
    + +Passing in a named route is also possible: + +
    +@route --homepage {
    +  pattern: url-pattern("/");
    +}
    +
    +:link-to(--homepage) {
    +  font-weight: bold;
    +}
    +
    + +Because there is no dynamic part in the homepage URL, +you might be tempted to pass in a <> directly: + +
    +:link-to(url("/")) {
    +  font-weight: bold;
    +}
    +
    + +However, url("/") won't match URLs such as +/#scroll-to-here or /?utm_id=something +so it is recommended to use the <> +or <> variants, or use the following alternative: + +
    +@route --homepage {
    +  pathname: "/";
    +  base-url: document;
    +}
    +
    +:link-to(--homepage) {
    +  font-weight: bold;
    +}
    +
    +
    + +The '':link-to()'' pseudo-class takes a single argument, a <>, +and the pseudo-class matches any element where both: +* the element matches '':any-link'' +* the <> [=route-location/matches=] the target of the link + +

    The '':active-navigation()'' pseudo-class

    + +This specification defines a new +'':active-navigation()'' +functional pseudo-class +that matches link elements that link to a certain URL +that is related to a navigation that is currently active. + +The '':active-navigation()'' pseudo-class takes a single argument, a <>, +and the pseudo-class matches any element where: +* the element matches '':any-link'' +* the target of the link matches the <>, as defined below. + +
    +<> =
    +  <>? [ <> | link-href ]?
    +<> = at | with | from | to
    +
    + +ISSUE: Should we use ''at''/''with''/''from''/''to'' or +''current''/''other''/''from''/''to''? + +An <> matches the target linkTarget of the link when +the following steps return true: +1. Let navigationURL be + the [=current navigation URL=] of the document given the <> in <> (default ''with''). + +1. If navigationURL is null, return false. +1. If ''link-href'' is present, or a <> is not provided: + 1. Return true if linkTarget [=url/equals=] navigationURL; Otherwise false. + +1. If a <> is present: + 1. Let targetMatchResult be the result of + [=URL pattern/match|matching a URL pattern=] + given urlPattern and linkTarget. + + 1. Let navigationMatchResult be the result of + [=URL pattern/match|matching a URL pattern=] given + urlPattern and navigationURL. + + 1. If navigationMatchResult or targetMatchResult is null, return false. + + 1. For each property prop of {{URLPatternResult}} that is a + {{URLPatternComponentResult}}: + + 1. If {{URLPatternComponentResult/groups}} of prop of + targetMatchResult is not equal to + {{URLPatternComponentResult/groups}} of prop of + navigationMatchResult, + then return false. + + ISSUE: Need to formally define equality of ordered maps. + + 1. Return true. + +
    + +The difference between '':link-to()'' and '':active-navigation()'' +is that the latter is only active while a navigation is in progress. + +Consider this example: + +
    +@route --homepage {
    +  pattern: url-pattern("/");
    +}
    +
    +:link-to(--homepage) {
    +  color: lime;
    +}
    +
    +:active-navigation(--homepage) {
    +  color: hotpink;
    +}
    +
    + +Links that link to the --homepage get a lime color. +When navigating to or from the --homepage, +their color changes to hotpink for as long as the animation is active. + +Once the navigation has completed, the '':active-navigation()'' +selector no longer applies, and those links revert back to lime. + +
    + +
    + +In the following examples, all links that link to the --movie-detail route, +get a lime color when a navigation is in progress. + +
    +@route --movie-detail {
    +  pattern: url-pattern("/movies/:id");
    +}
    +
    +:active-navigation(--movie-detail) {
    +  color: lime;
    +}
    +
    + +By adding the following selectors that use a <>, +the behavior changes a bit. + +
    +:active-navigation(from --movie-detail) {
    +  color: hotpink;
    +}
    +
    +:active-navigation(to --movie-detail) {
    +  color: yellow;
    +}
    +
    + +When navigating from /movies/1 to /movies/2: + +
      +
    • + Links that link to the --movie-detail route + with any :id + get a lime color + during the navigation. +
    • +
    • + Links that link to the --movie-detail route + whose target is /movies/1 + (the “from” page) + get a hotpink color + during the navigation. +
    • +
    • + Links that link to the --movie-detail route + whose target is /movies/2 + (the “to” page) + get a yellow color + during the navigation. +
    • +
    + +When navigating from /movies/2 to /: + +
      +
    • + Links that link to the --movie-detail route + with any :id + get a lime color + during the navigation. +
    • +
    • + Links that link to the --movie-detail route + whose target is /movies/3 + (the “from” page) + get a hotpink color + during the navigation. +
    • +
    + +When navigating from / to /movies/3: + +
      +
    • + Links that link to the --movie-detail route + with any :id + get a lime color + during the navigation. +
    • +
    • + Links that link to the --movie-detail route + whose target is /movies/3 + (the “to” page) + get a yellow color + during the navigation. +
    • +
    + +
    + +
    + +A an example of the '':active-navigation()'' pseudo-class +is this example which creates a view transition between +a item in a list that contains a link (in this document) +and the details page for that link (in a different document). +This transition works even when the navigation is a back/forward navigation +and even if the user has used a language selector UI +to change the page into a different language (and thus change the URL). +The use of the '':link-to()'' pseudo-class ensures that +the view transition animations from or to the correct item in the list +by matching the relevant parts of the navigation URL to the link URL. + +
    +@view-transition {
    +  /* allow cross-document view transitions */
    +  navigation: auto;
    +}
    +
    +@route --movie-detail {
    +  /* match URLs like /en/movies/123 which is the English page
    +     about a movie with ID 123.  Be careful to specify the
    +     language part with a "*" but the ID part with a named
    +     :id parameter so that matching will require equal IDs
    +     but allow differences of language. */
    +  pattern: url-pattern("/*/movies/:id");
    +}
    +
    +/* capture the overall area representing the movie, and a
    +   sub-area for its poster image */
    +
    +/* match an element with class movie-container with a child
    +   link that links to a movie whose id is the same as the
    +   movie we are currently navigating to or from.  (lang can
    +   be different, though.)
    +
    +   This depends on the --movie-detail route
    +   declaring the ID but not the language with a named
    +   parameter, and the use of the 'with' keyword.
    +
    +   This means that both the of the link and the other URL of
    +   the current navigation match the URL pattern defined by
    +   the "@route --movie-detail" rule, and that the
    +   id named group from both matches be the same.  (However,
    +   the URLs can be different because the * part of the
    +   match, containing the language, can be different.)
    +   */
    +.movie-container:has(
    +    > .movie-title:active-navigation(with --movie-detail)) {
    +
    +  view-transition-name: movie-container;
    +
    +  > .movie-poster {
    +    view-transition-name: movie-poster;
    +  }
    +
    +  /* leave the default cross-fade animation for both image
    +     captures */
    +}
    +
    + +
    + +NOTE: Some of the design discussion for this feature has been in +w3c/csswg-drafts#13163. + + + +This specification defines a new +'':trigger-link'' +that matches link elements that trigger the current navigation. + +The '':trigger-link'' pseudo-class matches any element where both: +* the element matches '':any-link'' +* the [=current navigation state=] is not null, and element is its [=navigation state/source element=]. + +Issue: should this apply to forms or submit buttons? + +
    + +A simple example of a '':trigger-link'' selector is this one, +which sets the ''view-transition-name'' for an image thumbnail that is a child of the link that triggers the current navigation. + + +
    +:trigger-link .thumb {
    +  view-transition-name: active-image;
    +}
    +
    + +
    +

    Conditional rules for navigation queries

    Navigation queries: the ''@navigation'' rule

    @@ -220,18 +752,20 @@ with <> defined as: <> = ( <> ) | ( <> ) | <> <> = <> | <> | - <> + <> | + <> -<> = <> : <> +<> = <> : <> <> = at | with | from | to -<> = <> | <> -<> = <> <> = - between : <> and <> + between : <> and <> <> = history : <> <> = traverse | back | forward | reload + +<> = phase : <> +<> = loading | ready | committed
    ISSUE: Should we use ''at''/''with''/''from''/''to'' or ''current''/''other''/''from''/''to''? @@ -267,63 +801,34 @@ as follows: :: The result is the result of the child subexpression. : <> -:: : at: <> - :: The result is whether the result of - [=URL pattern/match|match a URL pattern=] is non-null - given urlPattern as - the [=navigation location URL pattern=] of <> - and input as the document's [=Document/URL=]. - - : with: <> - :: The result is true if - the [=current other URL=] other of the document is non-null and - [=URL pattern/match|match a URL pattern=] is non-null when - given urlPattern as - the [=navigation location URL pattern=] of <> - and input as other. - - : from: <> - :: The result is true if - the [=current from URL=] from of the document is non-null and - [=URL pattern/match|match a URL pattern=] is non-null when - given urlPattern as - the [=navigation location URL pattern=] of <> - and input as from. - - : to: <> - :: The result is true if - the [=current to URL=] to of the document is non-null and - [=URL pattern/match|match a URL pattern=] is non-null when - given urlPattern as - the [=navigation location URL pattern=] of <> - and input as to. +:: The result is true if + the <> [=route-location/matches=] [=current navigation URL=] of the document given the <>. : <> -:: : between: <> and <> +:: : between: <> and <> :: The result is true if - the [=current from URL=] from of the document is non-null, - the [=current to URL=] to of the document is non-null, - [=URL pattern/match|match a URL pattern=] is non-null - given urlPattern as - the [=navigation location URL pattern=] of one of the two <>s - and input as from, and - [=URL pattern/match|match a URL pattern=] is non-null - given urlPattern as - the [=navigation location URL pattern=] of the other of the two <>s - and input as to. + the [=current navigation URL=] from of the document given ''from'' is non-null, + the [=current navigation URL=] to of the document ''to'' is non-null, + one of the two <>s + [=route-location/matches=] from, + and the other of the two <>s + [=route-location/matches=] to. : <> :: : history: traverse :: True if the [=current navigation type=] is {{NavigationType/traverse}}. : history: back :: True if the [=current navigation type=] is {{NavigationType/traverse}} and - the [=current navigation delta=] is less than 0. + the document's [=current navigation state=]'s [=navigation state/new index=] is less than its [=navigation state/old index=]. : history: forward :: True if the [=current navigation type=] is {{NavigationType/traverse}} and - the [=current navigation delta=] is greater than 0. + the document's [=current navigation state=]'s [=navigation state/new index=] is greater than its [=navigation state/old index=]. : history: reload :: True if the [=current navigation type=] is {{NavigationType/reload}}. +: <> +:: The [=current navigation state=] is not null, and its [=navigation state/phase=] matches the given ''phase'' value. + : <> :: The result is false. @@ -332,31 +837,6 @@ as follows: It exists only for future-compatibility, so that new syntax additions do not invalidate too much of a <> in older user agents. -The navigation location URL pattern of a <> -depends on the type of <>: - -: <> -:: the URL pattern represented by the ''@route'' rule referenced by the name. - -: <> -:: The [=URL pattern=] represented by the function; see - [=create a URL pattern for url-pattern()=]. - -ISSUE: Should it also be possible to reference -a name defined in a routemap? -See the -route matching explainer -for details. - -A document's navigation API is -the result of the following steps on document: - -1. Let window be the {{Window}} whose [=associated Document=] is document, or null if there is no such {{Window}}. - -1. If window is null, return null. - -1. Return window's [=navigation API=]. - The condition of the ''@navigation'' rule is the result of the <> in its prelude. @@ -389,414 +869,108 @@ ISSUE: This should probably have a more formal definition of the function, but I can't find the formal definitions of the existing ''if()'' functions to model it after. - - -This specification defines a new -'':link-to()'' functional pseudo-class -that matches link elements that link to a certain URL. - -
    - -A simple example of a '':link-to()'' selector is this one, -which matches any links that link to the site's homepage: - -
    -:link-to(url-pattern("/")) {
    -  font-weight: bold;
    -}
    -
    - -
    - -
    - -A more interesting example of the '':link-to()'' pseudo-class -is this example which creates a view transition between -a item in a list that contains a link (in this document) -and the details page for that link (in a different document). -This transition works even when the navigation is a back/forward navigation -and even if the user has used a language selector UI -to change the page into a different language (and thus change the URL). -The use of the '':link-to()'' pseudo-class ensures that -the view transition animations from or to the correct item in the list -by matching the relevant parts of the navigation URL to the link URL. - -
    -@view-transition {
    -  /* allow cross-document view transitions */
    -  navigation: auto;
    -}
    -
    -@route --movie-details-with-id {
    -  /* match URLs like /en/movie/123 which is the English page
    -     about a movie with ID 123.  Be careful to specify the
    -     language part with a "*" but the ID part with a named
    -     :id parameter so that matching using the 'match-params'
    -     keyword (the default) will require equal IDs but allow
    -     differences of language. */
    -  pattern: url-pattern("/*/movie/:id");
    -}
    -
    -/* capture the overall area representing the movie, and a
    -   sub-area for its poster image */
    -
    -/* match an element with class movie-container with a child
    -   link that links to a movie whose id is the same as the
    -   movie we are currently navigating to or from.  (lang can
    -   be different, though.)
    -
    -   This depends on the --movie-details-with-id route
    -   declaring the ID but not the language with a named
    -   parameter, and the use of match-params(navigation-with).
    -
    -   This means that both the of the link and the other URL of
    -   the current navigation match the URL pattern defined by
    -   the "@route --movie-details-with-id" rule, and that the
    -   id named group from both matches be the same.  (However,
    -   the URLs can be different because the * part of the
    -   match, containing the language, can be different.)
    -   */
    -.movie-container:has(
    -    > .movie-title:link-to(--movie-details-with-id
    -                             with match-params(navigation-with))) {
    -
    -  view-transition-name: movie-container;
    -
    -  > .movie-poster {
    -    view-transition-name: movie-poster;
    -  }
    -
    -  /* leave the default cross-fade animation for both image
    -     captures */
    -}
    -
    - -
    - -The '':link-to()'' pseudo-class takes a single argument, a <>, -and the pseudo-class matches any element where: -* the element matches '':any-link'' -* the target of link matches the <>, as defined below. - -
    -<> = <> [ with <> ]?
    -<> = <>
    -  // Note: <> is defining three functions
    -  // with identical syntax.
    -<> = <>( <> )
    -<> = match-pattern | match-params | match-url
    -<> = navigation-at | navigation-with |
    -                            navigation-from | navigation-to
    -
    - -ISSUE: Should we use ''navigation-''(''at''/''with''/''from''/''to'') or -''navigation-''(''current''/''other''/''from''/''to'')? - -ISSUE: Should the '':link-to()'' variant that has a <> have a different name, -such as '':navigating-link()''? - -A <> matches the target of the link when both: -* the <> matches the target of the link, and -* either: - * a <> is not present, or - * the <> matches the target of the link, - with the [=URL pattern=] represented by the <> as context - -A <> represents a [=URL pattern=]. -If the <> is a <>, -then it represents the URL pattern -represented by the <> function -(see [=create a URL pattern for url-pattern()=]). -If it is a <>, then it represents the URL pattern -represented by the ''@route'' rule. - -A <> matches a URL -when [=URL pattern/match|match a URL pattern=] is non-null -given urlPattern as -the [=URL pattern=] that it represents and -input as the given URL. - -A <> matches the URL linkTarget -(with a URL Pattern urlPattern as context) -if the following steps return true: -1. Let targetMatchResult be the result of - [=URL pattern/match|match a URL pattern=] - given urlPattern and linkTarget. -1. If targetMatchResult is null, return false. - - NOTE: This doesn't really matter because - in this case the <> also doesn't match. -1. Let matchType be the <> of the - <>. -1. Let matchTarget be the <> argument - of the <>. -1. Let navigationURL be: - : If matchTarget is ''navigation-at'', - :: the document's [[=Document/URL=]]. - : Otherwise, if matchTarget is ''navigation-with'', - :: the current other URL of the document. - : Otherwise, if matchTarget is ''navigation-from'', - :: the current from URL of the document. - : Otherwise (Assert: matchTarget is ''navigation-to''), - :: the current to URL of the document. -1. If navigationURL is null, return false. -1. : If matchType is ''match-pattern'' - :: Return true if - the result of [=URL pattern/match|match a URL pattern=] given - urlPattern and navigationURL is not null; - otherwise return false. - - : If matchType is ''match-params'' - :: 1. Let navigationMatchResult be the result of - [=URL pattern/match|match a URL pattern=] given - navigationURL and urlPattern. - - 1. If either navigationMatchResult is null, return false. - - 1. For each property prop of {{URLPatternResult}} that is a - {{URLPatternComponentResult}}: - - 1. If {{URLPatternComponentResult/groups}} of prop of - targetMatchResult is not equal to - {{URLPatternComponentResult/groups}} of prop of - navigationMatchResult, - then return false. - - ISSUE: Need to formally define equality of ordered maps. - - 1. Return true. - - : If matchType is ''match-url'' - :: Return true if linkTarget equals navigationURL; - otherwise return false. - -NOTE: Some of the design discussion for this feature has been in -w3c/csswg-drafts#13163. - -

    Definitions of current navigation state

    - -Both the ''@navigation'' rule and the '':link-to()'' pseudo-class -rely on the following definitions of -the [=current other URL=], [=current from URL=], and [=current to URL=]. - -The current from URL of a [=/document=] is a URL or null. -It is defined as follows: - -1. If the [=document's navigation API=] of the document is non-null and - its [=transition=] is non-null, - its [=from entry=]'s {{NavigationHistoryEntry/url}}. - - NOTE: This part is for when the old document in the navigation - is still the current document. - -1. If the [=document's navigation API=] of the document is non-null, - its [=activation=] is non-null, - the activation's {{NavigationActivation/from}} is non-null, and - the document's [=has been revealed=] is false or - was false at the start of the current [=task=], - the activation's {{NavigationActivation/from}}'s - {{NavigationHistoryEntry/url}}. - - NOTE: This part is for when the new document in the navigation - has become the current document. - -1. Otherwise, null. - - NOTE: The previous two branches can also produce null results. - -The current to URL of a [=/document=] is a URL or null. -It is defined as follows: - -1. If the [=document's navigation API=] of the document is non-null and - its [=ongoing navigate event=] is non-null: - - 1. if the {{pageswap}} event has fired since that navigation began, - and its {{PageSwapEvent/activation}} was non-null, - and that {{PageSwapEvent/activation}}'s - {{NavigationActivation/entry}}'s - {{NavigationHistoryEntry/url}} is non-null, - then that - {{NavigationHistoryEntry/url}}. - - NOTE: This part does expose the result of redirects. - - NOTE: This part is not relevant to normal page rendering. - However, it can be relevant to what is rendered - when [=capturing the image=] - for a [[css-view-transitions-2#cross-document-view-transitions|cross-document view transition]]. - - ISSUE: Is the final "non-null" check needed? - - 1. otherwise, the [=ongoing navigate event=]'s - {{NavigateEvent/destination}}'s - {{NavigationDestination/url}} - - NOTE: This part does not expose the result of redirects. - - ISSUE: This assumes that the [=ongoing navigate event=] - and the [=transition=] have the same lifetime, - but this isn't really - true if the event is intercepted. - After - whatwg/html#11690 / - whatwg/html#11692. - we could probably define this more like "from" above. - But which lifetime is the one we want? - - NOTE: This part is for when the old document in the navigation - is still the current document. - -1. If the [=document's navigation API=] of the document is non-null and - its [=activation=] is non-null, - the document's [=has been revealed=] is false or - was false at the start of the current [=task=], - and the activation's {{NavigationActivation/entry}}'s - {{NavigationHistoryEntry/url}}. - - NOTE: This part is for when the new document in the navigation - has become the current document. - - ISSUE: Does it make sense to expose this when - the activation's {{NavigationActivation/from}} is null, - and thus there is no [=current from URL=]? - -1. Otherwise, null. - - NOTE: The previous two branches can also produce null results. - -ISSUE: The above definitions of from and to apparently don't work right -if you start a same-document navigation (e.g., with {{History/pushState}}) -in the middle of a cross-document navigation. +

    Processing model

    -The current other URL of a [=/document=] is a URL or null. -It is defined as follows: +The at rules and pseudo-classes defined in this document rely on the [=current navigation state=]. -1. ISSUE: Write this! +A navigation state is a [=struct=] with the following items: -The current navigation type of a [=/document=] is a {{NavigationType}} or null. -It is defined as follows: +
    + : old URL + : new URL + :: a [=/URL=] + + : type + :: a {{NavigationType}} + + : old index + : new index + :: an integer -1. If the [=document's navigation API=] of the document is non-null and - its [=transition=] is non-null, - the transition's {{NavigationTransition/navigationType}}. + : phase + :: `loading`, `ready`, or `committed`. - NOTE: This part is for when the old document in the navigation - is still the current document. + : source element + :: null or an {{Element}}. +
    -1. If the [=document's navigation API=] of the document is non-null and - its [=activation=] is non-null, - the document's [=has been revealed=] is false or - was false at the start of the current [=task=], - the activation's {{NavigationActivation/navigationType}}. +
    +To get the current navigation state of a {{Document}} |document|: - NOTE: This part is for when the new document in the navigation - has become the current document. +1. If |document| is not [=Document/fully active=], return null. -1. Otherwise, null. +1. Let |navigation| be |document|'s [=relevant global object=]'s [=navigation API=]. -The current navigation delta of a [=/document=] is a {{NavigationType}} or null. -It is defined as follows: +1. Let |activation| be |navigation|'s {{Navigation/activation}}. -1. If the [=document's navigation API=] of the document is non-null and - its [=transition=] is non-null, +1. If |document| has not [=has been revealed|been revealed=]: + 1. If |activation| is null, return null. - 1. If the transition's {{NavigationTransition/navigationType}} is not {{NavigationType/traverse}}, null. + 1. [=Assert=]: |activation|'s {{NavigationActivation/entry}} is not null. - 1. Otherwise, - the transition's {{NavigationTransition/to}}'s {{NavigationDestination/index}} - minus - the transition's {{NavigationTransition/from}}'s {{NavigationHistoryEntry/index}}. + 1. Return a new [=navigation state=] whose + [=navigation state/old URL=] is |activation|'s {{NavigationActivation/from}}'s {{NavigationHistoryEntry/url}}, + [=navigation state/new URL=] is |activation|'s {{NavigationActivation/entry}}'s {{NavigationHistoryEntry/url}}, + [=navigation state/type=] is |activation|'s {{NavigationActivation/navigationType}}, + [=navigation state/old index=] is |activation|'s {{NavigationActivation/from}}'s {{NavigationHistoryEntry/index}}, + [=navigation state/new index=] is |activation|'s {{NavigationActivation/entry}}'s {{NavigationHistoryEntry/index}}, + [=navigation state/phase=] is `committed`, + and [=navigation state/source element=] is null. - NOTE: This part is for when the old document in the navigation - is still the current document. + Note: this means that navigations that occur before the page is revealed, e.g. calling {{History/pushState()}} in the head do not reflect in CSS. -1. If the [=document's navigation API=] of the document is non-null, - its [=activation=] is non-null, - the activation's {{NavigationActivation/from}} is non-null, and - the document's [=has been revealed=] is false or - was false at the start of the current [=task=], +1. Let |navigateEvent| be the [=ongoing navigate event=] of |navigation|. - 1. If the activation's {{NavigationActivation/navigationType}} is not {{NavigationType/traverse}}, null. +1. Let |phase| be `loading`. - 1. Otherwise, - the activation's {{NavigationActivation/entry}}'s {{NavigationHistoryEntry/index}} - minus - the activation's {{NavigationActivation/from}}'s {{NavigationHistoryEntry/index}}. +1. If |navigateEvent| is null and |navigation|'s [=traversing navigate event=] is not null: + 1. Set |navigateEvent| to |navigation|'s [=traversing navigate event=]. - NOTE: This part is for when the new document in the navigation - has become the current document. + 1. Set |phase| to `ready`. -1. Otherwise, null. +1. If |navigateEvent| is null, return null. -ISSUE: Generally improve integration with the HTML spec for these definitions, -instead of monkeypatching. -This includes the interaction with [=has been revealed=] -and the interaction with the {{pageswap}} event, -and other things where this section links to non-exported definitions. +1. Return a new [=navigation state=] whose + [=navigation state/old URL=] is |document|'s [=Document/URL=], + [=navigation state/new URL=] is |navigateEvent|'s {{NavigateEvent/destination}}'s {{NavigationDestination/url}}, + [=navigation state/type=] is |ongoingNavigateEvent|'s {{NavigateEvent/navigationType}}, + [=navigation state/old index=] is |navigation|'s [=navigation API/current entry=]'s {{NavigationHistoryEntry/index}}, + [=navigation state/new index=] is |navigateEvent|'s {{NavigateEvent/destination}}'s {{NavigationDestination/index}}, + [=navigation state/phase=] is |phase|, + and [=navigation state/source element=] is |ongoingNavigateEvent|'s {{NavigateEvent/sourceElement}}. -ISSUE: Generally figure out if these definitions should care about -the [=ongoing navigate event=] or the [=transition=]. +
    -

    The ''url-pattern()'' function

    +To get the current navigation URL given a {{Document}} |document| and a <> |relation|: - - -The url-pattern() function represents a [=URL pattern=], -which can be used to match URLs. - -
    -<> = url-pattern( <> )
    -
    +: ''from'' +:: |state|'s [=navigation state/old URL=]. -This function represents a [=URL pattern=] that can be created -using the steps of the create a URL pattern for url-pattern() algorithm: +: ''at'' +:: |state|'s [=navigation state/new URL=] if |state|'s [=navigation state/phase=] is `committed`; Otherwise |state|'s [=navigation state/old URL=]. -1. Let arg be the <> argument to the ''url-pattern()'' function. +: ''with'' +:: |state|'s [=navigation state/old URL=] if |state|'s [=navigation state/phase=] is `committed`; Otherwise |state|'s [=navigation state/new URL=]. -1. Let baseURL be the [=style resource base URL=] of - the rule or declaration block containing the ''url-pattern()'' function. + -
    - Do we want this to be the base URL all the time? - For use of ''url-pattern()'' in ''@navigation'', - it's likely more useful for the base URL - to be the document URL rather than the style sheet URL. - However, it would be very awkward for ''url-pattern()'' - to be inconsistent with ''url()''. - - Should we allow the base URL of ''url-pattern()'' - to be defined by the consumer? - Should we introduce document-url-pattern()? - Should we do something similar to - [[css-images-3#ambiguous-urls]] - (see )? - - Also see other proposed uses of {{URLPattern}} in CSS - in , - for '':local-link''. -
    +To get the current navigation type of a [=/document=] |document|: + 1. If |document|'s [=current navigation state=] is non-null, return its [=navigation state/type=]. + 1. Return null. -1. Return the result of [=URL pattern/create|create a URL pattern=] given - arg, baseURL, and an empty [=map=]. +The traversing navigate event is the [=ongoing navigate event=] which was reset when the [=ongoing navigation=] is set to `traversal`. -NOTE: This function requires that its argument is quoted. -This differs from the ''url()'' function, -which allows its argument to be quoted or unquoted. -To serialize a ''url-pattern()'' function f, -[=serialize a function=] f, -using [=serialize a string=] on the single argument -to serialize f's contents. -NOTE: This is defined this way because {{URLPattern}} -intentionally does not provide a serialization. +ISSUE: Improve integration with the HTML standard, especially the concept of [=traversing navigate event=] and unexported definitions.

    Privacy Considerations

    diff --git a/css-overflow-3/Overview.bs b/css-overflow-3/Overview.bs index 7b02a033ee6c..1906c5fa7997 100644 --- a/css-overflow-3/Overview.bs +++ b/css-overflow-3/Overview.bs @@ -91,11 +91,12 @@ Introduction which makes sense when the author's intent is that the content not be shown. - This specification introduces the long-standing de-facto 'overflow-x' and 'overflow-y' properties, + This specification defines the long-standing de-facto 'overflow-x' and 'overflow-y' properties, adds a ''overflow/clip'' value, + introduces an 'overflow-clip-margin' property, and defines overflow handling more fully. - - [Something something 'max-lines'.] + It also introduces control over smooth scrolling via 'scroll-behavior' + and for reserving space for the scrollbar via 'scrollbar-gutter'. Note: This specification also reproduces the definition of the 'text-overflow' property previously defined in [[CSS-UI-3]], @@ -123,6 +124,11 @@ Module Interactions and [[!CSS-UI-3]] section 5.2. Overflow Ellipsis: the text-overflow property. + When applied to 'display: table' elements, + the properties defined in this module apply to the [=table grid box=] + (not the [=table wrapper box=]). + [[!CSS2]] [[!CSS-TABLES-3]] + - - Note: The scrollable overflow rectangle is always a rectangle - in the box's own coordinate system, but might be non-rectangular - in other coordinate systems due to transforms [[CSS3-TRANSFORMS]]. - This means scrollbars can sometimes appear when not actually necessary. + See [[#scrollable-overflow-calculation]] for details.

    Scrolling Overflow

    @@ -336,8 +234,9 @@ Scrolling Overflow (through which the scrollable overflow area can be viewed) coincides with its padding box, and is called the scrollport. - A box’s nearest scrollport - is the [=scrollport=] of its nearest [=scroll container=] ancestor. + A box’s nearest scroll container + is the nearest [=scroll container=] ancestor in the [=containing block chain=]. + (See [[#overflow-properties]] for control over whether a box clips or scrolls its overflow.) Scrolling operations can be initiated by the user (for example, by manipulating a scrollbar, swiping a touchscreen, or using keyboard controls) @@ -364,12 +263,6 @@ Scrolling Overflow Unless otherwise specified, it is the [=block-start=] [=inline-start=] corner of the [=scrollable overflow rectangle=]. (For example, in a [=flex container=] it is the [=main-start=] [=cross-start=] corner.) - Unless otherwise adjusted - (e.g. [[css-align-3#overflow-scroll-position|by content alignment]] [[css-align-3]]), - the area beyond the [=scroll origin=] in either axis - is considered the unreachable scrollable overflow region: - content rendered here is not accessible to the reader, - see [[#scrollable]]. A [=scroll container=] is said to be scrolled to its [=scroll origin=] when its [=scroll origin=] coincides with the corresponding corner of its [=scrollport=]. This [=scroll position=], the scroll origin position, @@ -392,6 +285,13 @@ Scrolling Overflow or away from the [=scroll origin=] is not defined. Should each API define its coordinate model? + Unless otherwise adjusted + (e.g. [[css-align-3#overflow-scroll-position|by content alignment]] [[css-align-3]]), + the area beyond the [=scroll origin=] in either axis + is considered the unreachable scrollable overflow region: + content rendered here is not accessible to the reader, + see [[#scrollable]]. + The root viewport, which scrolls the page [=canvas=], uses the principal writing mode for determining its [=scroll origin=] and [=initial scroll position=]. @@ -421,20 +321,39 @@ Scrolling Overflow -->

    -Scrolling and Clipping Overflow

    +Clipping and Scrolling Overflow + + The properties in this chapter specify whether and where a box’s [=overflow=] is clipped; + if so, whether it is a [=scroll container=]; + and if so, in which axis(es) it is allowed to scroll (its scrollable axis(es)), + thus which of the following types of [=scroll container=] it is: + +
    +
    single-axis scroll container +
    + A [=scroll container=] that is scrollable in only one axis. + +
    dual-axis scroll container +
    + A [=scroll container=] that is scrollable in both axes. + +
    block-axis scroll container +
    inline-axis scroll container +
    x-axis scroll container +
    y-axis scroll container +
    + A [=scroll container=] that is scrollable in the specified axis, + regardless of whether it can also scroll in the other axis. +

    Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties

    - These properties specify whether a box’s [=overflow=] is clipped, - and if so, - whether it is a [=scroll container=]. -
     		Name: overflow-x, overflow-y, overflow-block, overflow-inline
     		Value: visible | hidden | clip | scroll | auto
     		Initial: ''visible''
    -		Applies to: block containers [[!CSS2]], flex containers [[!CSS3-FLEXBOX]], grid containers [[!CSS3-GRID-LAYOUT]]
    +		Applies to: [=block containers=] [[!CSS2]], [=flex containers=] [[!CSS-FLEXBOX-1]], [=grid containers=] [[!CSS-GRID-1]], and [=table grid boxes=] [[!CSS-TABLES-3]]
     		Inherited: no
     		Logical property group: overflow
     		Percentages: N/A
    @@ -479,7 +398,6 @@ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties
    There is no special handling of overflow, that is, the box’s content is rendered outside the box if positioned there. - The box is not a scroll container.
    hidden
    @@ -491,8 +409,7 @@ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' propertiesscroll container. + for example using the mechanisms defined in [[CSSOM-VIEW]].
    clip
    @@ -503,8 +420,7 @@ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' propertiesscroll container. + through any mechanism. Unlike ''hidden'', this value does not cause the element to establish a new formatting context. @@ -516,8 +432,8 @@ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties
    This value indicates that the content is clipped to the [=overflow clip edge=], - but can be scrolled into view - (and therefore the box is a scroll container). + but can be scrolled into view. + Furthermore, if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed @@ -539,25 +455,31 @@ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties The ''overflow/scroll'', ''overflow/auto'', and ''overflow/hidden'' values - are known as the scrollable values of 'overflow'. + are known as the scrollable values of 'overflow'. + They cause the box to be a [=scroll container=] + and the affected axis to be a [=scrollable axis=]. + A [=block box=] that becomes a [=scroll container=] + also establishes an [=independent formatting context=]. + The ''overflow/visible'' and ''overflow/clip'' values are known as the non-scrollable values. - - The ''visible''/''overflow/clip'' values of 'overflow' - compute to ''overflow/auto''/''hidden'' (respectively) - if one of 'overflow-x' or 'overflow-y' is neither ''visible'' nor ''overflow/clip''. - On [=replaced elements=], - a [=computed value|computed=] ''overflow/hidden'' value further resolves - to a [=used value=] of ''overflow/clip''. - - If the computed value of 'overflow' on a block box - is neither ''overflow/visible'' nor ''overflow/clip'' nor a combination thereof, - it [=establishes an independent formatting context=] for its contents. + However, if the other axis specifies a [=scrollable value=], + a specified value of ''visible'' + [=computed value|computes=] to ''overflow/auto'', + enabling scrolling in its axis. + If neither axis computes to a [=scrollable value=], + the box is not a [=scroll container=]. + If only one axis computes to a [=scrollable value=] + (i.e. the other axis is ''overflow/clip''), + the box is a [=single-axis scroll container=]. User agents must also support the overlay keyword as a [=legacy value alias=] of ''overflow/auto''. + Note: The 'overflow' properties are expanded to apply to [=replaced elements=] + in Level 4. +

    Interaction of 'visibility' and 'overflow'

    @@ -618,6 +540,37 @@ Overflow in Print and Other Static Media for example, e-book readers paginate content, but are interactive. +

    +Overflow Viewport Propagation

    + + UAs must apply the 'overflow' values + set on the root element to the viewport + when the root element’s 'display' value is not ''display/none''. + However, + when the root element is an [[!HTML]] <{html}> element + (including XML syntax for HTML) + whose 'overflow' value is ''overflow/visible'' (in both axes), + and that element has as a child + a <{body}> element whose 'display' value is also not ''display/none'', + user agents must instead apply the 'overflow' values + of the first such child element to the viewport. + The element from which the value is propagated must then have + a used 'overflow' value of ''overflow/visible''. + + Note: Using [=containment=] on the HTML <{html}> or <{body}> elements disables + this special handling of the HTML <{body}> element. + See the [[CSS-CONTAIN-1#contain-property]] for details. + + Note: ''overflow: hidden'' on the root element + might not clip everything outside the [=Initial Containing Block=] + if the ICB is smaller than the viewport, + which can happen on mobile. + + If ''overflow/visible'' is applied to the viewport, + it must be interpreted as ''overflow/auto''. + If ''overflow/clip'' is applied to the viewport, + it must be interpreted as ''overflow/hidden''. +

    Expanding Clipping Bounds: the 'overflow-clip-margin' property

    @@ -668,46 +621,135 @@ Expanding Clipping Bounds: the 'overflow-clip-margin' property * the [=overflow clip edge=] is clamped to stay within the element's [=padding box=]. (This does not affect the [=computed value|computed=] or [=used value=] of this property.) - * the ''border-box'' value - behaves as ''padding-box'' - and ignores any specified offset. + * the ''overflow-clip-margin/border-box'' value + ignores any specified offset + (and, due to the previous bullet point, + effectively acts as ''overflow-clip-margin/padding-box'') Note: This property was previously defined to only affect ''overflow: clip''. It now also affects [=scroll containers=], but only to shrink the clipping edge. +

    +Calculating the Scrollable Overflow Area

    -

    -Overflow Viewport Propagation

    + The scrollable overflow area of a box is the union of: +
      +
    • + Its own [=padding box=]. - UAs must apply the 'overflow-*' values - set on the root element to the viewport - when the root element’s 'display' value is not ''display/none''. - However, - when the root element is an [[!HTML]] <{html}> element - (including XML syntax for HTML) - whose 'overflow' value is ''overflow/visible'' (in both axes), - and that element has as a child - a <{body}> element whose 'display' value is also not ''display/none'', - user agents must instead apply the 'overflow-*' values - of the first such child element to the viewport. - The element from which the value is propagated must then have - a used 'overflow' value of ''overflow/visible''. +
    • + All [=line boxes=] it directly contains. - Note: Using [=containment=] on the HTML <{html}> or <{body}> elements disables - this special handling of the HTML <{body}> element. - See the [[CSS-CONTAIN-1#contain-property]] for details. +
    • + The border boxes + of all boxes for which it is the containing block + and whose border boxes are positioned not wholly + within its [=unreachable scrollable overflow region=] (if any), + accounting for transforms by projecting each box onto + the plane of the element that establishes its 3D rendering context. + [[!CSS3-TRANSFORMS]] - Note: ''overflow: hidden'' on the root element - might not clip everything outside the [=Initial Containing Block=] - if the ICB is smaller than the viewport, - which can happen on mobile. + Issue: Is this description of handling transforms + sufficiently accurate? - If ''overflow/visible'' is applied to the viewport, - it must be interpreted as ''overflow/auto''. - If ''overflow/clip'' is applied to the viewport, - it must be interpreted as ''overflow/hidden''. + Border boxes with zero area + do not affect the [=scrollable overflow area=]. + +
    • + The margin areas of grid item and flex item boxes + for which the box establishes a containing block. + + The UA may additionally include + the margin areas of other boxes + for which the box establishes a containing block; + however, + the conditions under which such margin areas are included + is undefined in this level. + This needs further testing and investigation; + is therefore deferred in this draft. + +
    • + The [=scrollable overflow rectangles=] of all of the above boxes + (including zero-area boxes), + clipped to their [=overflow clip edge=] + if 'overflow' is not ''overflow/visible'' or 'contain' applies ''contain/paint'', + and accounting for transforms as described above. + + Note: The 'clip', 'clip-path', and 'mask-*' properties [[!CSS-MASKING-1]] + do not affect the scrollable overflow area. + Only effects that clip to the [=overflow clip edge=] are taken into account. + + Note: The [=scrollable overflow rectangle=] is always a rectangle + in its box's own coordinate system, but might be non-rectangular + in ancestor coordinate systems due to transforms [[CSS3-TRANSFORMS]]. + This means scrollbars can sometimes appear when not actually necessary. + +
    • + Additional padding added + to the [=scrollable overflow rectangle=] + as necessary to enable scroll positions + that satisfy the requirements of both + ''place-content: start'' and ''place-content: end'' alignment. + + Note: This padding represents, + within the [=scrollable overflow rectangle=], + the box’s own padding + so that when its content is scrolled to its end, + there is padding between the edge of its [=in-flow=] (or floated) content + and the border edge of the box. + It typically ends up being exactly the same size as the box's own padding, + except in a few cases-- + such as when an [=out-of-flow=] positioned element, + or the visible overflow of a descendent, + has already increased the size of the [=scrollable overflow rectangle=] + outside the conceptual “content edge” of the [=scroll container=]’s content. + +
      + +
      + Issue: Replace this image with a proper SVG. +
      +
      + +
    + + Additionally, due to Web-compatibility constraints + (caused by authors exploiting legacy bugs to surreptitiously hide content from visual readers but not search engines and/or speech output), + UAs must clip any content in the [=unreachable scrollable overflow region=]. + + Note: The [=content-distribution properties=] can + [[css-align-3#overflow-scroll-position|alter the unreachable scrollable overflow region]] + to ensure that a [=scroll container=]’s [=alignment subject=] + is reachable after alignment. + [[css-align-3]] + + + +

    +Scrolling Behaviors and Animations

    +CSS provides several controls over how scrolling behaves when triggered. + * CSS Scroll Snap allows defining "snap positions", + which are scroll positions to which the [=scroll container=] is biased to land. + * CSS Overscroll Behavior + allows controlling what happens when scrolling past the end of the scrollable area. + * 'scroll-behavior', defined below, controls whether programmatic scrolling animates smoothly or not. + + Note: For animating other things in conjunction with scrolling, see [[SCROLL-ANIMATIONS-1]].

    Smooth Scrolling: the 'scroll-behavior' Property

    @@ -1298,6 +1340,15 @@ ellipsis interaction with scrolling interfaces This appendix is informative. + Significant changes since the 7 October 2025 Working Draft: + * Allow combining ''overflow: clip'' behavior in one axis with scrolling in the other, + to allow single-axis trapping for e.g. [=sticky positioning=]. + (Issue 12289) + * Clarify which clipping affects limit contributions to the scrollable overflow area of the nearest [=scroll container=]. + (Issue 8607) + * Clarify application of 'overflow' to tables. + (Isue 10881) + Significant changes since the 29 March 2023 Working Draft: * Define that ''overflow: hidden'' is treated as ''overflow: clip'' on [=replaced elements=]. diff --git a/css-overflow-4/Overview.bs b/css-overflow-4/Overview.bs index 260683891551..bda42d7115cd 100644 --- a/css-overflow-4/Overview.bs +++ b/css-overflow-4/Overview.bs @@ -24,6 +24,7 @@ spec:css-pseudo-4; type:selector; text:::first-letter spec:css-pseudo-4; type:selector; text:::first-line spec:css-writing-modes-4; type:dfn; text:start spec:css-writing-modes-4; type:dfn; text:end +spec:dom; type:dfn; for: Document; text:mode
     url: https://drafts.csswg.org/selectors-3/#subject; type: dfn; text: subject;
    @@ -925,11 +926,23 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property
     
     		If this results in the entire contents of the line box being displaced,
     		the line box is considered to contain a [=strut=], as defined in [[CSS2/visudet#leading]].
    +		
    +		This requirement applies regardless of the document's [=mode=],
    +		and is not affected by the [[quirks#the-blocks-ignore-line-height-quirk|line-height quirk]].
    +		
    +		
    +
     
     		
     			block-ellipsis-016.html
     			block-ellipsis-018.html
     			block-ellipsis-025.html
    +			block-ellipsis-quirk-001.html
     		
     
     		Displacing content to make room for the [=block overflow ellipsis=]
    @@ -1305,6 +1318,7 @@ Forcing a Break After a Set Number of Lines: the 'max-lines' property
     		webkit-line-clamp-013.html
     		webkit-line-clamp-027.html
     		webkit-line-clamp-029.html
    +		line-clamp-with-floats-007.html
     	
     
     	Note: This implies that 'max-lines' has no effect when applied to [=multi-column containers=],
    @@ -1696,6 +1710,8 @@ Handling of Excess Content: the 'continue' property
     			line-clamp-033.html
     			line-clamp-auto-033.html
     			line-clamp-auto-with-ruby-002.html
    +			line-clamp-with-floats-003.html
    +			line-clamp-with-floats-004.html
     		
     
     	- Any [=line boxes=] that follow the [=clamp point=]
    @@ -1759,6 +1775,7 @@ Handling of Excess Content: the 'continue' property
     	is always counted as [=ink overflow=] rather than [=scrollable overflow=].
     
     	
    +		line-clamp-with-floats-010.html
     		line-clamp-021.html
     		line-clamp-with-abspos-019.html
     	
    @@ -1768,12 +1785,20 @@ Handling of Excess Content: the 'continue' property
     
     	Within a [=line-clamp container=],
     	floats which have not been made into [=invisible boxes=]
    -	must be visually clipped to the [=content edge=]
    +	must be visually clipped to the [=block-end=] [=content edge=]
     	of the [=line-clamp container=].
     	They do not introduce any clearance
     	that would make the [=line-clamp container=] increase its height,
     	and do not contribute to the [=scrollable overflow area=].
     
    +	
    +		line-clamp-with-floats-001.html
    +		line-clamp-with-floats-002.html
    +		line-clamp-with-floats-005.html
    +		line-clamp-with-floats-006.html
    +		line-clamp-with-floats-010.html
    +	
    +
     	If a [=block container=] contains a [=clamp point=],
     	within itself or in any of its descendants,
     	its [=automatic block size=] will not take into account any invisible boxes,
    diff --git a/css-pseudo-4/Overview.bs b/css-pseudo-4/Overview.bs
    index 996d4ced6af1..331854a6d17f 100644
    --- a/css-pseudo-4/Overview.bs
    +++ b/css-pseudo-4/Overview.bs
    @@ -1810,7 +1810,9 @@ Additions to the CSS Object Model
     
       The type attribute
       is a string representing the type of the pseudo-element.
    -  This can be one of the following values:
    +  This can be any standardized [=tree-abiding pseudo-element=]
    +  that is not an [=element-backed pseudo-element=],
    +  for example:
     
       
    "::before" @@ -1819,6 +1821,10 @@ Additions to the CSS Object Model
    Represents the ''::after'' pseudo-element.
    "::marker"
    Represents the ''::marker'' pseudo-element. +
    "::backdrop" +
    Represents the ''::backdrop'' pseudo-element. +
    "::view-transition" +
    Represents the ''::view-transition'' pseudo-element.
    The element attribute is the @@ -1881,7 +1887,13 @@ Additions to the CSS Object Model 2. If |type| is failure, return null. - 3. Otherwise, return the {{CSSPseudoElement}} object + 3. If |type| is an [=element-backed pseudo-element=], + return null. + + 4. If |type| is not a [=tree-abiding pseudo-element=], + return null. + + 5. Otherwise, return the {{CSSPseudoElement}} object representing the pseudo-element that would match the selector |type| with [=this=] as its [=originating element=]. diff --git a/css-shapes-1/Overview.bs b/css-shapes-1/Overview.bs index f7764d0735a8..ab9d65831346 100644 --- a/css-shapes-1/Overview.bs +++ b/css-shapes-1/Overview.bs @@ -329,6 +329,11 @@ Basic Shapes The <basic-shape> type can be specified using basic shape functions. + +
    +		<> = <> | <> | <> |  <> | <> | <>
    +	
    + When using this syntax to define shapes, the reference box is defined @@ -460,7 +465,7 @@ Supported Shapes shape-functions/xywh-function-valid.html -
    rect() = +
    rect()
    Defines a rectangle via insets from the top and left edges of the [=reference box=]. diff --git a/css-shapes-2/Overview.bs b/css-shapes-2/Overview.bs index 8fa209b74d03..90d54b081257 100644 --- a/css-shapes-2/Overview.bs +++ b/css-shapes-2/Overview.bs @@ -125,6 +125,13 @@ Basic Shapes level 1 section. + This level extends the <> functions + to include ''shape()'': + +
    +		<> = <> | <> | <> |  <> | <> | <>
    +	
    +

    Supported Shapes

    diff --git a/css-sizing-4/responsive-iframes-explainer.md b/css-sizing-4/responsive-iframes-explainer.md index a1c0912328f7..464487f10cb6 100644 --- a/css-sizing-4/responsive-iframes-explainer.md +++ b/css-sizing-4/responsive-iframes-explainer.md @@ -29,9 +29,9 @@ In general, there is a lot of demand for this feature, as evidenced by: ## Solution -The embedding document opts in via the `contain-intrinsic-size: from-element` CSS property on the `