diff --git a/README.markdown b/README.markdown index 6c6c65263288..6752c4feaf35 100644 --- a/README.markdown +++ b/README.markdown @@ -5,15 +5,14 @@ This is the official CSSWG repository for editor's drafts of CSS specifications. See the [contributor guidelines](CONTRIBUTING.md) for how to contribute. Specification issues are discussed as issues in this repository. -General CSSWG discussion can be found on the public + +Minutes of CSSWG discussion can be found on the public [www-style mailing list](https://lists.w3.org/Archives/Public/www-style/). To read the specifications in this repository, see them at the [index of all specifications](https://drafts.csswg.org/). -This repository is a two-way mirror of https://hg.csswg.org/drafts, and -contributing using Mercurial is also possible. Also see the related repositories: -* [fxtf-drafts github repository](https://github.com/w3c/fxtf-drafts/) - [fxtf mercurial repository](https://hg.fxtf.org/drafts/) - [FX Task Force generated specification index](https://drafts.fxtf.org/) -* [css-houdini-drafts github repository](https://github.com/w3c/css-houdini-drafts/) - [css-houdini mercurial repository](https://hg.css-houdini.org/drafts/) - [CSS-TAG Houdini Task Force generated specification index](https://drafts.css-houdini.org/) +* [fxtf-drafts github repository](https://github.com/w3c/fxtf-drafts/) - [FX Task Force generated specification index](https://drafts.fxtf.org/) +* [css-houdini-drafts github repository](https://github.com/w3c/css-houdini-drafts/) - [CSS-TAG Houdini Task Force generated specification index](https://drafts.css-houdini.org/) diff --git a/css-2020/Overview.bs b/css-2020/Overview.bs index 66c83809a0c8..5c61be9f60b7 100644 --- a/css-2020/Overview.bs +++ b/css-2020/Overview.bs @@ -4,8 +4,7 @@ Shortname: css-2020 Level: none Status: ED Group: CSSWG -Date: 2020-12-21 -Prepare for TR: yes +Prepare for TR: no Work Status: revising URL: https://drafts.csswg.org/css-2020/ TR: https://www.w3.org/TR/css-2020/ diff --git a/css-2022/Overview.bs b/css-2022/Overview.bs index c7a013d108d5..ba4a53be0dce 100644 --- a/css-2022/Overview.bs +++ b/css-2022/Overview.bs @@ -2,9 +2,8 @@ Title: CSS Snapshot 2022 Shortname: css-2022 Level: none -Status: NOTE-FPWD -Date: 2022-11-22 -Prepare for TR: yes +Status: ED +Prepare for TR: no Group: CSSWG Work Status: revising URL: https://drafts.csswg.org/css-2022/ diff --git a/css-2023/Overview.bs b/css-2023/Overview.bs index 3b37deba34bd..696e4cba3419 100644 --- a/css-2023/Overview.bs +++ b/css-2023/Overview.bs @@ -2,9 +2,8 @@ Title: CSS Snapshot 2023 Shortname: css-2023 Level: none -Status: NOTE -Prepare for TR: yes -Date: 2023-12-07 +Status: ED +Prepare for TR: no Group: CSSWG Work Status: revising URL: https://drafts.csswg.org/css-2023/ diff --git a/css-2024/Overview.bs b/css-2024/Overview.bs index 3a33e35a3384..78f28348ea55 100644 --- a/css-2024/Overview.bs +++ b/css-2024/Overview.bs @@ -2,9 +2,8 @@ Title: CSS Snapshot 2024 Shortname: css-2024 Level: none -Status: NOTE -Prepare for TR: yes -Date: 2025-02-25 +Status: ED +Prepare for TR: no Group: CSSWG Work Status: revising URL: https://drafts.csswg.org/css-2024/ diff --git a/css-2025/Overview.bs b/css-2025/Overview.bs index 4fb2b6e5c576..4f1c16c1e445 100644 --- a/css-2025/Overview.bs +++ b/css-2025/Overview.bs @@ -2,7 +2,7 @@ Title: CSS Snapshot 2025 Shortname: css-2025 Level: none -Status: NOTE +Status: ED Prepare for TR: no Group: CSSWG Work Status: revising @@ -357,7 +357,7 @@ Classification of CSS Specifications and/or the CSS Working Group Blog for any resulting changes, corrections, or clarifications. -

+

Reliable Candidate Recommendations

The following specifications are considered to be in a reliable state, meaning they have largely stable implementations and specifications, but are not yet at the Recommendation level due to minor issues or the need for additional implementation reports. @@ -395,6 +395,22 @@ The following specifications are considered to be in a reliable state, meaning t
Extends and supersedes [[CSS-GRID-1]], introducing “subgrids” for managing nested markup in a shared grid framework. + +
CSS Cascading and Inheritance Module Level 5 + [[CSS-CASCADE-5]] +
+ Extends and supersedes [[CSS-CASCADE-4]], + introducing cascade layers which provide a structured way to organize and balance concerns within a single origin. + +
CSS Color Adjustment Module Level 1 + [[CSS-COLOR-ADJUST-1]] +
+ This module introduces a model and controls over automatic color adjustment by the user agent to handle user preferences and device output optimizations. + +
CSS Conditional Rules Module Level 4 + [[CSS-CONDITIONAL-4]] +
+ Extends [[CSS-CONDITIONAL-3]] to allow testing for supported selectors.

@@ -570,21 +586,6 @@ Modules with Rough Interoperability

and provides more control over font choice and feature selection, including support for OpenType variations. -
CSS Color Adjustment Module Level 1 - [[CSS-COLOR-ADJUST-1]] -
- This module introduces a model and controls over automatic color adjustment by the user agent to handle user preferences and device output optimizations. - -
CSS Conditional Rules Module Level 4 - [[CSS-CONDITIONAL-4]] -
- Extends CSS Conditional 3 to allow testing for supported selectors.
- -
CSS Cascading and Inheritance Level 5 - [[CSS-CASCADE-5]] -
- Extends CSS Cascade 4 to add cascade layers.
-
Motion Path Module Level 1 [[MOTION-1]]
@@ -614,6 +615,18 @@ Modules with Rough Interoperability pseudo-elements, and combinators, enhancing the ability to select elements based on more complex criteria and states. + +
CSS Containment Module Level 2 + [[CSS-CONTAIN-2]] +
+ Extends CSS Containment 1 to add style containment. + +
CSSOM View Module + [[CSSOM-VIEW-1]] +
+ This module defines APIs for querying and manipulating + the visual viewport and layout viewport, + as well as methods for scrolling elements into view.

@@ -935,6 +948,23 @@ Safe to Release pre-CR Exceptions

  • The [=relative color=] syntax, defined in [[!CSS-COLOR-5]]
  • The [[CSS-VALUES-5#request-url-modifiers|request url modifiers]], defined in [[!CSS-VALUES-5]]
  • + +
  • The [[MEDIAQUERIES-5#display-modes|display-modes]], + [[MEDIAQUERIES-5#dynamic-range|dynamic-range]], + [[MEDIAQUERIES-5#scripting|scripting]], + [[MEDIAQUERIES-5#prefers-reduced-motion|prefers-reduced-motion]], + [[MEDIAQUERIES-5#prefers-reduced-transparency|prefers-reduced-transparency]], + [[MEDIAQUERIES-5#prefers-contrast|prefers-contrast]], + [[MEDIAQUERIES-5#forced-colors|forced-colors]], + and [[MEDIAQUERIES-5#prefers-color-scheme|prefers-color-scheme]], + media features, defined in [[!MEDIAQUERIES-5]] + +
  • The [[CSS-CONDITIONAL-5#at-supports-ext|font-tech()]] and [[CSS-CONDITIONAL-5#at-supports-ext|font-format()]] functions, defined in [[!CSS-CONDITIONAL-5]] + +
  • The '':is()'', '':where()'', and '':has()'' pseudo-classes, + and selector lists in '':not()'', defined in [[!SELECTORS-4]] + +
  • The 'text-decoration-thickness' and 'text-underline-offset' properties and the from-font value for 'text-underline-position', defined in [[!CSS-TEXT-DECOR-4]] The following features have been explicitly and retroactively cleared diff --git a/css-align-3/Overview.bs b/css-align-3/Overview.bs index 3d06f9b04cb4..dba512560204 100644 --- a/css-align-3/Overview.bs +++ b/css-align-3/Overview.bs @@ -898,7 +898,7 @@ Content Distribution for Scroll Containers Self-Alignment for Absolutely Positioned Boxes For [=absolutely positioned=] [=alignment subjects=] - whose relevant [=self-alignment property=] is not ''justify-self/normal'', + whose relevant [=used value|used=] [=self-alignment property=] is not ''justify-self/normal'', the default [=overflow alignment=] behavior is as follows:
    @@ -918,6 +918,12 @@ Self-Alignment for Absolutely Positioned Boxes For this purpose, the |overflow limit rect| is the bounding rectangle of the [=alignment subject's=] [=inset-modified containing block=] and its [=original containing block=]. + However, because the [=scrollable overflow area=] of a [=scroll container=] + can be extended to ensure the visibility of overflowing [=absolutely positioned=] boxes, + if the [=original containing block=] is generated by a [=scroll container=] + (and is not its [=fixed containing block=]), + the |overflow limit rect| is extended to infinity + in any direction that does not extend into the [=unreachable scrollable overflow region=].
    (For [=absolutely-positioned=] [=alignment subjects=] that fail the above condition, @@ -1157,7 +1163,7 @@ Content-Distribution Shorthand: the 'place-content' property Name: place-content Value: <<'align-content'>> <<'justify-content'>>? Initial: normal - Applies to: block containers, flex containers, and grid containers + Applies to: see individual properties Inherited: no Percentages: n/a Computed value: see individual properties @@ -1764,7 +1770,7 @@ Self-Alignment Shorthand: the 'place-self' property Name: place-self Value: <<'align-self'>> <<'justify-self'>>? Initial: auto - Applies to: block-level boxes, absolutely-positioned boxes, and grid items + Applies to: see individual properties Inherited: no Percentages: n/a Computed value: see individual properties @@ -1961,7 +1967,7 @@ Block-Axis (or Cross-Axis) Default Alignment: the 'align-items' property
     	Name: align-items
    -	Value: normal | stretch | <> | [ <>? <> ]
    +	Value: normal | stretch | <> | <>? <>
     	Initial: normal
     	Applies to: all elements
     	Inherited: no
    @@ -2064,7 +2070,7 @@ Row and Column Gutters: the 'row-gap' and 'column-gap' properties
     			see [[#gap-percent]].
     
     		: normal
    -		:: The ''gap/normal'' represents
    +		:: The value ''gap/normal'' represents
     			a used value of ''1em'' on multi-column containers,
     			and a used value of ''0px'' in all other contexts.
     	
    @@ -2252,8 +2258,8 @@ Determining the Baselines of a Box
     		
    block containers
    The first/last [=baseline set=] of a block container - is taken from the first/last in-flow line box in the block container - or the first/last in-flow block-level child in the block container + is taken from the first/last [=in-flow=] line box in the block container + or the first/last [=in-flow=] block-level child in the block container that contributes a set of first/last baselines, whichever comes first/last. If there is no such line box or child, @@ -2349,7 +2355,7 @@ Determining the Baselines of a Box and ''vertical-rl'' if 'direction' is ''rtl''. For the purposes of finding the baselines of a box, - it and all its in-flow descendants with a scrolling mechanism (see the 'overflow' property) + it and all its [=in-flow=] descendants with a scrolling mechanism (see the 'overflow' property) must be considered as if scrolled to their initial scroll position. Additionally, if the position of a [=scroll container=]’s first/last baseline @@ -2514,175 +2520,13 @@ Appendix A: Static Position Terminology

    Changes

    - Changes since the 17 February 2023 Working Draft include: -
      -
    • Made [=block containers=] default to ''safe'' alignment. - See [[#auto-safety-default]]. - (Issue 8992) -
    • Made [=absolutely positioned boxes=] default to using a “smart” safe alignment - that allows unsafe overflow of the [=inset-modified containing block=] - while maintaining safety within the [=original containing block=]. - See [[#auto-safety-position]]. - (Issue 10316, - Issue 9960) -
    • Make all the ''space-*'' keywords fallback to ''safe'' overflow. - (Issue 10154) -
    • Clearly define the interaction of overflowing [=content distribution=] and [=scroll containers=] - to not impact layout, but to only affect the extent of the [=scrollable overflow area=]. - (Issue 4957) -
    • Only apply the special margin-edge baseline rule for [=scroll container=] [=block containers=] - when 'baseline-source' is its [=initial value=]. - (Issue 8214) -
    • When synthesizing the baseline of an orthogonal-flow box, - make the assumed parallel [=writing mode=] sensitive to 'direction'. - (Issue 7775) -
      -

      Otherwise, - assume either ''horizontal-tb'' or ''vertical-lr'' 'writing-mode', - whichever is orthogonal to the box’s own 'writing-mode'.

      -

      Otherwise:

      -
        -
      • If the box’s own [=writing mode=] is vertical, - assume ''horizontal-tb''. -
      • If the box’s own [=writing mode=] is horizontal, - assume ''vertical-lr'' if 'direction' is ''ltr'' - and ''vertical-rl'' if 'direction' is ''rtl''. -
      -
      -
      -
    • Clarify that spanning cells only participate in the first/last row they span - when participating in first/last baseline alignment. - (Issue 7655) -
    • Define the 'grid-gap' properties as [=legacy name aliases=] of the 'gap' properties. - (Issue 8014) -
    • Defer definition of ''align-self/normal'' alignment for [=absolutely positioned boxes=] to [[css-position-3]]. - (Issue 11215, - Issue 11285) -
    • Changed sentence about applicability of 'row-gap' to [=multi-column containers=] - to indicate that it applies in [[CSS-MULTICOL-2]]. - (Issue 11539) -
    • Defined that [=gutters=] dissappear at [=fragmentation breaks=]. - (Issue 11520) -
    - - Changes since the 24 December 2021 Working Draft include: -
      -
    • Define the baselines of a [=multi-column container=]. - (Issue 7856, - Issue 7639) -
    • Use the [=writing mode=] of the [=static-position containing block=] - when determining the [=static position=]. - (Issue 7599, - Issue 7612; - Changes) -
    • Remove definition of special behavior for including padding in [=scrollable overflow=] - for non-''align-content/normal'' alignments - since this is now defined unconditionally in [[!CSS-OVERFLOW-3]]. - (Issue 129) -
    • Minor clarifications: - * Define [=fallback alignment=] of a [=baseline-sharing group=] - as the shared [=fallback alignment=] of its individual items. - * Annotate <> value definitions using [=CSS bracketed range notation=]. -
    - - Changes since the 21 April 2020 Working Draft include: -
      -
    • Allowed reordering of ''[ first | last ]'' and ''align-self/baseline'' components of <>. - (Issue 5235) -
    • Make [=fallback alignment=] of ''space-around'' and ''space-evenly'' include ''safe''. - (Issue 5088) -
    • Various corrections to normal alignment and percentage gaps - to match respective layout specs. -
    • Corrections to special legacy handling of the [=last baseline set=] of [=scroll containers=]. - (Issue 3611) -
    • Clarify that a box with no [=baseline set=] synthesizes its [=alignment baseline=] as needed. - (Issue 3611) -
    • Clarified that only non-replaced boxes are affected by [=content distribution=]. - (Issue 4545) -
    • Clarified when a box has a [=coordinated self-alignment preference=] - that enables [=baseline content-alignment=], - particularly with respect to ''margin/auto'' [=margins=]. - (Issue 5923) -
    • Better define how baseline self-alignment and content-alignment interact. - (Issue 6389) -
    • Clarify how baseline-sharing groups determine their fallback alignment. - (Issue 7645) -
    + Changes since the 11 March 2025 Working Draft include: + * Clarify that [[#auto-safety-position]] applies when 'position-area' alters the [=used value=] of ''align-self/normal''. + * Allow absolutely positioned boxes to honor alignment even when overflowing into + the scrollable overflow area of a scroll container containing block. + (Issue 12106) - Changes since the 6 December 2018 Working Draft include: -
      -
    • Improved the center self-alignment of absolutely-positioned elements. - Issue 4659 -
    • Fixed inconsistent fallback of baseline alignment in mixed writing modes. - Issue 3454 -
    • Minor editorial fixes and clarifications. -
    - - Changes since the 30 August 2018 Working Draft consist of some minor clarifications. - - Changes since the 23 April 2018 Working Draft include: -
      -
    • Better definition of how the alignment properties interact with absolutely-positioned boxes with ''left/auto'' offsets. - See [[#justify-abspos]], [[#align-abspos]], [[#abspos-sizing]], and [[#staticpos-rect]]. -
    • More detailed definition of how the content-distribution properties work on scroll containers. - See [[#overflow-scroll-position]]. -
    • Noted CSS2’s special rules about the baselines of inline-block scroll containers. -
    • Defined that percentage gaps compute against zero when calculating intrinsic sizes, and resolve during layout. (Issue 509) -
    • Miscellaneous minor clarifications. -
    - - Changes since the 6 September 2017 Working Draft include: -
      -
    • Added more illustrations! Many thanks to Melanie Richards for working through a difficult diagramming problem. -
    • Fixed errors in property definition table of 'gap' shorthand. -
    • Defining percentage gaps to resolve to zero when the containing block’s size depends on the gaps. - (Issue 509, - Issue 2297) -
    • Fixed errors in handling left and right in the grammars. -
    • Fixed discrepancy in ''align-content/space-align'' fallback alignment. - (Issue 2316) -
    • Tightened up handling of baseline alignment in cases where the box edges don't align. - (Issue 1556, - Issue 1611) -
    • Miscellaneous clarifications. -
    - - Changes since the 20 July 2017 Working Draft include: -
      -
    • Added the 'row-gap' and 'column-gap' properties and 'gap' shorthand, - applying them to both grid layout and flex layout - to replace the grid-specific 'grid-row-gap'/'grid-column-gap'/'grid-gap' properties. -
    - - Changes since the 15 May 2017 Working Draft include: -
      -
    • Dropped the ''left'' and ''right'' keywords from 'align-self' and 'align-content'. - They may be re-introduced in a later level if there is demand. - (Issue 1403) -
    • Assigned ''end'' fallback alignment to ''align-self/stretch'' cases when combined with ''last baseline'' content-alignment. -
    • Disabled baseline alignment across cells in a table column, - due to implementation complexity. -
    • A large number of minor corrections and clarifications reported by David Baron. -
    - - Changes since the 7 April 2017 Working Draft include: -
      -
    • Adding a section to clarify handling of partial implementations. - (Issue 1167) -
    • Dropped <> value of 'justify-content' since it can't do anything anyway. - (Issue 1184) -
    • Deferred ability to specify fallback alignments to Level 4. - (Issue 1002) -
    • Fixed position of <> wrt <>. - (Issue 1001) -
    • Fixed rules for handling baseline-aligned boxes being aligned along their block axis. - (Issue 1038) -
    • Renamed ''justify-items: auto'' to ''justify-items: legacy''. - (Issue 1318) -
    • Clamped baselines of scrollable boxes to the border edge, rather than margin edge. - (Issue 766) -
    • Updated the flex container gap definition to use 'gutter'. (Issue 12084) -
    + See also previous changes.

    Privacy Considerations

    diff --git a/css-anchor-position-1/Overview.bs b/css-anchor-position-1/Overview.bs index 5c49434f9e9e..9abafa68c6e2 100644 --- a/css-anchor-position-1/Overview.bs +++ b/css-anchor-position-1/Overview.bs @@ -1,5 +1,5 @@ + + Note that using the [[HTML#the-popover-attribute|Popover API]] + will automatically set 'position' and create the anchoring relationship + without setting 'anchor-name' or 'position-anchor' value + (by defining an [=implicit anchor element=]), + so those properties wouldn't need to be explicitly set again. + So with the correct markup, this example can be simplified to: + +
    +	.tooltip {
    +		/* Using the popover + popovertarget attributes sets 'position: fixed'
    +		   and creates the necessary position-anchor relationship already. */
    +		position-area: block-start;
    +		position-try: flip-block;
    +		max-inline-size: 20em;
    +	}
    +	

    @@ -156,7 +173,7 @@ Animation Type: discrete The 'anchor-name' property declares that an element is an anchor element, -whose [=principal box=] is an anchor box, +whose [=principal box=] is an [=anchor box=], and gives it a list of anchor names to be targeted by. Values are defined as follows: @@ -168,7 +185,7 @@ Values are defined as follows: :: If the element generates a [=principal box=], the element is an [=anchor element=], with a list of [=anchor names=] as specified. - Each [=anchor name=] is a [=tree-scoped name=]. + Each [=anchor name=] is a [=tree-scoped name/loosely matched=] [=tree-scoped name=]. Otherwise, the property has no effect. @@ -195,6 +212,11 @@ Note: While an element is in the [=skipped contents=] of another element it's not an [=acceptable anchor element=], effectively acting as if it had no names. +Note: Positioned elements in [=shadow trees=] +can reference [=anchor names=] defined in “higher” trees. +Currently, they cannot reference [=anchor names=] +defined in “lower” shadow trees, though. + ### Implicit Anchor Elements ### {#implicit} Some specifications can define that, @@ -214,20 +236,37 @@ The [=implicit anchor element=] of a [=pseudo-element=] is its [=originating element=], unless otherwise specified. -### The Anchor's Position ### {#determining-position} - -Several features of this specification refer to the position and size of an [=anchor box=]. -The [=anchor box=]'s position and size is determined after layout, -and for these purposes -includes 'position'-based adjustments -(such as ''position: relative'' or ''position: sticky''). +### The Anchor Box ### {#anchor-position-size} + +Several features of this specification refer to the position and size of an anchor box. +Unless otherwise specified, +this refers to the [=border box=] edge of the [=principal box=] of the [=anchor element=]. +The [=anchor box=]'s position and size is determined after layout. + +This position and size includes 'zoom' and 'position'-based adjustments +(such as ''position: relative'' or ''position: sticky'') +as well as transforms (such as 'transform' or 'offset-path'). +In these cases, the axis-aligned bounding rectangle of the [=anchor box=] +in the coordinate space of the [=absolutely positioned=] element's [=containing block=] +is used instead. +Transforms are often optimized onto a different thread, +so transform-based updates to an [=anchor box’s=] position +may be delayed by a few frames. +Authors can avoid this delay by using absolute or relative positioning instead where practical. + +If the [=anchor box=] is [=fragmented=], +and the [=containing block=] of the [=absolutely positioned=] box +referring to that [=anchor box=] is outside the relevant [=fragmentation context=], +the axis-aligned bounding rectangle of its [=box fragments=] is used instead. +(If the [=absolutely positioned=] box is inside the [=fragmentation context=], +it sees the [=anchor box=] as unfragmented-- +and can be itself fragmented by the [=fragmentation context=].) -Post-layout effects, such as 'transform', +For performance reasons, +scrolling is handled specially, see [[#scroll]]. +Other post-layout effects, such as filters, do not affect the [=anchor box's=] position. -Note: Allowing an anchor to opt into including the effects of 'transform' -or similar properties -might be allowed in the future. - -Centering on the Anchor: the ''anchor-center'' alignment value {#anchor-center} --------------------------------------------------------------- - -
    -Name: justify-self, align-self, justify-items, align-items
    -New Values: anchor-center
    -
    - -The [=self-alignment properties=] allow an [=absolutely positioned box=] -to align itself within the [=inset-modified containing block=]. -The existing values, -plus carefully chosen [=inset properties=], -are usually enough for useful alignment, -but a common case for anchored positioning-- -centering over the [=anchor box=]-- -requires careful and somewhat complex set-up to achieve. - -The new anchor-center value -makes this case extremely simple: -if the positioned box has a [=default anchor box=], -then it is centered (insofar as possible) -over the [=default anchor box=] -in the relevant axis. - -Additionally, -any ''top/auto'' [=inset properties=] resolve to ''0''. - -If the box is not [=absolutely positioned=], -or does not have a [=default anchor box=], -this value behaves as ''/center'' -and has no additional effect on how [=inset properties=] resolve. - -Note: When using ''anchor-center'', by default -if the anchor is too close to the edge of the box's -[=original containing block=], -it will “shift” from being purely centered, -in order to remain within the [=original containing block=]. -See [[css-align-3#overflow-values]] for more details. - -Conditional Hiding: the 'position-visibility' property {#position-visibility} ------------------------------------------------------- +Anchor-Based Alignment {#alignment} +====================== -
    -Name: position-visibility
    -Value: always | [ anchors-valid || anchors-visible || no-overflow ]
    -Initial: anchors-visible
    -Applies to: [=absolutely positioned boxes=]
    -Percentages: n/a
    -Inherited: no
    -Animation type: discrete
    -
    +

    +Area-specific Default Alignment

    -There are some conditions in which it might not make sense -to display an [=absolutely positioned box=]. -This property allows such boxes to be made conditionally visible, -depending on some commonly needed layout conditions. +When 'position-area' is not ''position-area/none'', +the [=used value=] of ''align-self/normal'' [=self-alignment=] +changes depending on the <> value, +to align the box towards the anchor: -
    - : always - :: - This property has no effect. - (The box is displayed without regard for its anchors - or its overflowing status.) +* If the only the center track in an axis is selected, + the default alignment in that axis is ''align-self/center''. +* If all three tracks are selected, + the default alignment in that axis is ''align-self/anchor-center''. +* Otherwise, the default alignment in that axis + is toward the non-specified side track: + if it's specifying the “start” track of its axis, + the default alignment in that axis is ''align-self/end''; etc. - : anchors-valid - :: - If any of the box's [=required anchor references=] - do not resolve to a [=target anchor element=], - the box's 'visibility' property computes to ''force-hidden''. +However, if only one [=inset property=] in the relevant axis is ''inset/auto'', +the default alignment is instead +towards the edge with the non-''inset/auto'' inset; +and this is an ''align-self/unsafe'' alignment. - Issue: What is a required anchor reference? - ''anchor()'' functions that don't have a fallback value; - the default anchor *sometimes*? - Need more detail here. +Note: This single-''inset/auto'' behavior preserves the way +a single specified inset controls the position of an [=absolutely positioned=] box. - 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? +
    + For example, assuming an English-equivalent writing mode (horizontal-tb, ltr), + then the value ''span-x-start top'' resolves to + the ''position-area/start'' region of the vertical axis, + and the ''position-area/start'' and ''position-area/center'' regions of the horizontal axis, + so the default alignments will be ''align-self: end'' + (making the box's bottom [=margin edge=] flush with the bottom of the ''position-area/top'' region) + and ''justify-self: end'' + (making the box's end-side [=margin edge=] flush with the end side of the ''position-area/span-start'' region). +
    - : anchors-visible - :: - If the box has a [=default anchor box=] - but that [=anchor box=] is [=invisible=] or [=clipped by intervening boxes=], - the box's 'visibility' property computes to ''force-hidden''. +
    + If the box overflows its [=inset-modified containing block=], + but would still fit within its [=original containing block=], + by default it will “shift” to stay within its [=original containing block=], + even if that violates its normal alignment. + See [[css-align-3#overflow-values]] for details. - : no-overflow - :: - If the box overflows its [=inset-modified containing block=] - even after applying 'position-try', - the box's 'visibility' property computes to ''force-hidden''. -
    + This behavior makes it more likely + that positioned boxes remain visible + and within their intended bounds, + even when their [=containing block=] + ends up smaller than anticipated. -
    - An anchor box |anchor| - is clipped by intervening boxes - relative to a positioned box |abspos| relying on it - if |anchor|'s [=ink overflow rectangle=] - is fully clipped by a box - which is an ancestor of |anchor| - but a descendant of |abspos|'s containing block. - Clipping in this case refers only to clipping due to 'overflow', - or other effects (such as [=paint containment=]) - that clip to the [=overflow clip edge=]. + For example, a ''position-area: bottom span-right'' value + lets the positioned box stretch + from its anchor's left edge + to its containing block's right edge, + and left-aligns it in that space by default. + But if the positioned box is larger than that space + (such as if the anchor is very close to the right edge of the screen), + it will shift leftwards to stay visible. +
    - Note: This means that if an abspos is next to its anchor in the DOM, - for example, - it'll remain visible even if its default anchor is scrolled off, - since it's clipped by the same scroller anyway. - Issue: Make sure this definition of clipped - is consistent with View Transitions, - which wants a similar concept. + + +Centering on the Anchor: the ''anchor-center'' alignment value {#anchor-center} +-------------------------------------------------------------- + +
    +Name: justify-self, align-self, justify-items, align-items
    +New Values: anchor-center
    +
    + +The [=self-alignment properties=] allow an [=absolutely positioned box=] +to align itself within the [=inset-modified containing block=]. +The existing values, +plus carefully chosen [=inset properties=], +are usually enough for useful alignment, +but a common case for anchored positioning-- +centering over the [=anchor box=]-- +requires careful and somewhat complex set-up to achieve. + +The new anchor-center value +makes this case extremely simple: +if the positioned box has a [=default anchor box=], +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''. + +If the box is not [=absolutely positioned=], +or does not have a [=default anchor box=], +this value behaves as ''/center'' +and has no additional effect on how [=inset properties=] resolve. + +Note: When using ''anchor-center'', by default +if the anchor is too close to the edge of the box's +[=original containing block=], +it will “shift” from being purely centered, +in order to remain within the [=original containing block=]. +See [[css-align-3#overflow-values]] for more details. Anchor-Based Sizing {#sizing} @@ -1458,10 +1404,10 @@ is equivalent to ''width: anchor-size(width)''.) An ''anchor-size()'' function representing a [=resolvable anchor-size function=] resolves at [=computed value=] time (via [=style & layout interleaving=]) -to the <> separating the relevant border edges +to the <> separating the relevant edges (either left and right, or top and bottom, whichever is in the specified axis) -of the [=target anchor element=]. +of the [=target anchor element's=] [=anchor box=].

    @@ -1526,7 +1472,7 @@ Giving Fallback Options: the 'position-try-fallbacks' property {#position-try-fa
     Name: position-try-fallbacks
    -Value: none | [ [<> || <>] | <<'position-area'>> ]#
    +Value: none | [ [<> || <>] | <> ]#
     Initial: none
     Inherited: no
     Applies to: [=absolutely positioned boxes=]
    @@ -1537,7 +1483,8 @@ 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
    -is initially empty.
    +initially contains a single [=position option=]
    +generated from the element's base styles.
     
     Each comma-separated entry in the list is a separate option:
     either the name of a ''@position-try'' block,
    @@ -1572,7 +1519,7 @@ Values have the following meanings:
     		and adds it to the [=position options list=].
     
     		
    -		<> = flip-block || flip-inline || flip-start
    +		<> = flip-block || flip-inline || flip-start || flip-x || flip-y
     		
    : flip-block @@ -1586,6 +1533,17 @@ Values have the following meanings: swaps the values in the [=inline axis=], essentially mirroring across a [=block-axis=] line. + : flip-x + :: + swaps the values in the [=horizontal axis=] + (between, for example, 'margin-left' and 'margin-right'), + essentially mirroring across a [=vertical-axis=] line. + + : flip-y + :: + swaps the values in the [=vertical axis=], + essentially mirroring across a [=horizontal-axis=] line. + : flip-start :: swaps the values of the [=start=] properties with each other, @@ -1599,6 +1557,8 @@ Values have the following meanings: If multiple keywords are given, the transformations are composed in order to produce a single [=position option=]. + Logical directions are resolved against + the [=writing mode=] of the [=containing block=]. : <> || <> :: @@ -1612,7 +1572,7 @@ Values have the following meanings: Otherwise, does nothing. - : <<'position-area'>> + : <> :: Automatically creates a [=position option=] composed solely of a 'position-area' property @@ -1925,7 +1885,7 @@ 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, -the last one in document order "wins". +they [=cascade=] the same as ''@keyframe'' rules do. The ''@position-try'' rule only accepts the following [=properties=]: @@ -2002,7 +1962,7 @@ Applying Position Fallback {#fallback-apply} When a positioned box (shifted by its [=default scroll shift=]) overflows its [=inset-modified containing block=], -and has a non-empty [=position options list=], +and has more than one [=position option=] in its [=position options list=], it [=determines position fallback styles=] to attempt to find an option that avoids overflow. @@ -2011,6 +1971,10 @@ so they affect [=computed values=] (and can trigger transitions/etc) even though they depend on layout and [=used values=]. +ISSUE: Rewrite this section to be less confusing and more correct. +See Issue 12818, +Issue 12890. +
    To apply a position option to a box's element |el|, given a [=position option=] |new styles|: @@ -2098,18 +2062,16 @@ laying out later boxes cannot change this decision.
    At the time that {{ResizeObserver}} events are determined and delivered: - * If a box |el| is [=absolutely positioned=], - set its last successful position option - to the set of [=accepted @position-try properties=] (and values) - that it's currently using. + * If |el| has a [=last successful position option=] + remove its [=last successful position option=] + if any of the following are true: - * Otherwise, if |el| has a [=last successful position option=] - and if any of the following are true of it, - remove its [=last successful position option=]: - - * |el| is not [=absolutely positioned=] - * |el|'s computed value for 'position-try-fallbacks' has changed - * Any of the ''@position-try'' rules referenced by |el|'s 'position-try-fallbacks' + * Its computed 'position' value has changed, + its [=containing block=] association has changed, + or it no longer generates a box. + * Its computed value for any [=longhand property|longhand=] of 'position-try' has changed. + * Its computed value for any [=accepted @position-try property=] has changed. + * Any of the ''@position-try'' rules referenced by it have been added, removed, or mutated. Then, [=determine position fallback styles=] for |el| @@ -2117,6 +2079,11 @@ laying out later boxes cannot change this decision. to the set of [=accepted @position-try properties=] (and values) that it's now using. + * Otherwise, if a box |el| is [=absolutely positioned=], + set its last successful position option + to the set of [=accepted @position-try properties=] (and values) + that it's currently using. + Note: The timing of this recording/removal is intentionally identical to the treatment of [=last remembered sizes=].
    @@ -2151,6 +2118,110 @@ This limit must be at least five.
    + + + +Conditional Hiding: the 'position-visibility' property {#position-visibility} +------------------------------------------------------ + +
    +Name: position-visibility
    +Value: always | [ anchors-valid || anchors-visible || no-overflow ]
    +Initial: anchors-visible
    +Applies to: [=absolutely positioned boxes=]
    +Percentages: n/a
    +Inherited: no
    +Animation type: discrete
    +
    + +There are some conditions in which it might not make sense +to display an [=absolutely positioned box=]. +This property allows such boxes to be made conditionally visible, +depending on some commonly needed layout conditions. + +
    + : always + :: + This property has no effect. + (The box is displayed without regard for its anchors + or its overflowing status.) + + : anchors-valid + :: + If any of the box's [=required anchor references=] + do not resolve to a [=target anchor element=], + 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 + :: + If the box has a [=default anchor box=] + but that [=anchor box=] is [=invisible=] or [=clipped by intervening boxes=], + the box's 'visibility' property computes to ''force-hidden''. + + : no-overflow + :: + If the box overflows its [=inset-modified containing block=] + even after applying 'position-try', + the box's 'visibility' property computes to ''force-hidden''. +
    + +
    + An anchor box |anchor| + is clipped by intervening boxes + relative to a positioned box |abspos| relying on it + if |anchor|'s [=ink overflow rectangle=] + is fully clipped by a box + which is an ancestor of |anchor| + but a descendant of |abspos|'s containing block. + Clipping in this case refers only to the same clipping effects + that are (by default) checked by {{IntersectionObserver}}, + i.e. clipping due to 'clip-path', + 'overflow', or other effects (such as [=paint containment=]) + that clip to the [=overflow clip edge=]. + + Whether or not |anchor| is [=clipped by intervening boxes=] + must be checked after [=updating content relevancy for a document=] + (see 'content-visibility' in [[css-contain-2]]) + and running any {{ResizeObserver}}, + but before running any {{IntersectionObserver}}. + It may also be checked at other times to improve responsiveness. + + + Note: This means that if an abspos is next to its anchor in the DOM, + for example, + it'll remain visible even if its default anchor is scrolled off, + since it's clipped by the same scroller anyway. + + Issue: Make sure this definition of clipped + is consistent with View Transitions, + which wants a similar concept. + + Note: This ensures that in a “chained anchor” situation, + if the first abspos is hidden due to this property + (due to its anchor being scrolled off), + then another abspos using it as an anchor will also be hidden, + rather than also floating in a nonsensical location. +
    +
    @@ -372,7 +371,7 @@ Declaring Keyframes

    the state of the animation if it were given a duration of ''10s''.
    - +
    Animation states specified by keyframes
    @@ -1082,7 +1081,7 @@ Attributes

    The declared declarations in the rule, in specified order.
    parent CSS rule -
    The context object (i.e. this {{CSSKeyframeRule}}). +
    The context object (i.e. this {{CSSKeyframeRule}}).
    owner node
    Null. diff --git a/css-animations-2/Overview.bs b/css-animations-2/Overview.bs index 647e64b169d1..bc6fb0839acf 100644 --- a/css-animations-2/Overview.bs +++ b/css-animations-2/Overview.bs @@ -17,7 +17,7 @@ - The 'device-width' media feature describes the width of the rendering surface of the output device. + The '@media/device-width' media feature describes the width of the rendering surface of the output device. For [=continuous media=], this is the width of the Web-exposed screen area. For [=paged media=], this is the width of the page sheet size. @@ -3611,7 +3763,7 @@ device-height Type: range
    - The 'device-height' media feature describes the height of the rendering surface of the output device. + The '@media/device-height' media feature describes the height of the rendering surface of the output device. For [=continuous media=], this is the height of the Web-exposed screen area. For [=paged media=], this is the height of the page sheet size. @@ -3636,9 +3788,9 @@ device-aspect-ratio Type: range - The 'device-aspect-ratio media feature is defined as the ratio of - the value of the 'device-width' media feature to - the value of the 'device-height media feature. + The '@media/device-aspect-ratio' media feature is defined as the ratio of + the value of the '@media/device-width' media feature to + the value of the '@media/device-height' media feature.
    For example, if a screen device with square pixels @@ -3654,78 +3806,12 @@ device-aspect-ratio
    -

    -Appendix B: Privacy Considerations

    - - This section is not normative. - -
    - - Issue: this section is incomplete - - Many media features enable fingerprinting of users - based on the display and interaction characteristics of their device: - - * Colors: {{color}}, {{color-index}}, {{monochrome}}, {{color-gamut}} and {{dynamic-range}} - * Display quality: {{resolution}}, {{scan}}, {{grid}}, {{update}} and {{environment-blending}} - * Interaction devices: {{pointer}}, {{hover}}, {{any-pointer}} and {{any-hover}}. - - The {{environment-blending}} feature is of particular concern - because it suggests where a user may be located, - and is likely present in a small set of devices. - Uncommon device properties are stronger fingerprinting features - because they help segment devices into smaller sets. - - Media features that reflect operating system preferences are a fingerprinting risk - because such preferences are correlated with characteristics of the user themselves: - - * The {{prefers-reduced-data}} media feature may be correlated with low income and limited data. - * The {{prefers-reduced-motion}}, {{prefers-color-scheme}}, {{prefers-reduced-transparency}}, - {{forced-colors}} and {{inverted-colors}} queries reflect affordances for a range of special needs. - - Properties dependent on one of the above media queries may be accessed by script: - - * Colors and other property values may be directly accessed through computed style, - though user agents may elect to return constants for some colors - (see, for example, CSS Color 4). - * Layout affecting properties (such as font size) influence lengths, positions and sizes available to script. - - User agents may disable these media features when users have expressed sensitivity to tracking. - Alternatively, user agents may limit the combination of features within a single page - to reduce the fingerprinting power of the page. - - The {{PreferenceManager}} object allows querying some user-preference [=media features=]. This - is not a privacy leak, as that information is already trivially - available by using [=media features=] themselves. - - The {{PreferenceManager}} object also allows overriding these user-preference [=media features=]; this - is also neither a privacy nor accessibility regression, as the [=media features=] were already ignorable by simply - not querying them. - -
    - -

    - Appendix C: Security Considerations

    - - This section is not normative. - -
    - - Issue: this section is incomplete - - The {{display-mode}} media feature allows an origin - access to aspects of a user’s local computing environment and, - particularly when used together with an [=application manifest=] [=manifest/display=] member [[APPMANIFEST]], - allows an origin some measure of control over a user agent’s native UI. - Through a CSS media query, a script can know the display mode of a web application. - An attacker could, in such a case, - exploit the fact that an application is being displayed in fullscreen - to mimic the user interface of another application. - -
    + + device-aspect-ratio-002.html + device-aspect-ratio-003.html + device-aspect-ratio-004.html + device-aspect-ratio-006.html +

    Changes

    @@ -3741,11 +3827,11 @@ In addition to editorial changes and minor clarifications, the following changes and additions were made to this module since the 2021-12-18 Working Draft: -* Moved 'display mode' definition back to [[APPMANIFEST]] ('display-mode' media feature remains +* Moved 'display mode' definition back to [[APPMANIFEST]] ('@media/display-mode' media feature remains here). (See Issue 7306) * Establish a normative reference for [[Display-P3]] * Disallow use of ''layer'' as a media type, rather than merely treat it as an unknown one, for compatibility with [=cascade layers=]. -* Clarify intent of 'prefers-reduced-motion' +* Clarify intent of '@media/prefers-reduced-motion' * Added further discussion of fingerprinting vectors

    video-height, and video-resolution. (See Issue 5044) - * Renamed 'prefers-contrast' values high and low + * Renamed '@media/prefers-contrast' values high and low to ''prefers-contrast/more'' and ''prefers-contrast'' less. (See Issue 2943) - * Rework the interaction between 'prefers-contrast' and 'forced-colors', + * Rework the interaction between '@media/prefers-contrast' and '@media/forced-colors', retiring prefers-contrast: forced and introducing ''prefers-contrast/custom''. (See Issue 5433) and Issue 6036) - * Added the 'horizontal-viewport-segments' and 'vertical-viewport-segments' media feature. + * Added the '@media/horizontal-viewport-segments' and '@media/vertical-viewport-segments' media feature. (See Issue 6234) - * Added the 'nav-controls' media feature. + * Added the '@media/nav-controls' media feature. (See Issue 6234) - * Make it possible for multiple values of 'dynamic-range' to match at the same time. + * Make it possible for multiple values of '@media/dynamic-range' to match at the same time. (See Issue 6793) @@ -3787,7 +3873,7 @@ The following additions were made to this module since the
    • - Added a UA style sheet rule for 'inverted-colors'. + Added a UA style sheet rule for '@media/inverted-colors'.
    • Added the ''prefers-contrast: forced'' value. @@ -3824,7 +3910,7 @@ The following additions were made to this module since the
      • - Added 'video-*' and 'dynamic-range' media features + Added 'video-*' and '@media/dynamic-range' media features
      • Removed 'prefers-color-scheme: no-preference' @@ -3849,19 +3935,17 @@ The following additions were made to create the First Public Working Draft of th
        • - Reinstate the light-level, 'inverted-colors', and Custom Media Queries sections + Reinstate the light-level, '@media/inverted-colors', and Custom Media Queries sections from earlier Media Queries Level 4 drafts.
        • - Added 'prefers-reduced-motion', - 'prefers-reduced-transparency', - 'prefers-contrast', - 'prefers-color-scheme', - and 'forced-colors' media features. + Added '@media/prefers-reduced-motion', + '@media/prefers-reduced-transparency', + '@media/prefers-contrast', + '@media/prefers-color-scheme', + and '@media/forced-colors' media features.
        - -

        Acknowledgments

        @@ -3871,61 +3955,124 @@ This specification is the product of the W3C Working Group on Cascading Style Sheets. Comments from - Adam Argyle, - Amelia Bellamy-Royds, - Andreas Lind, - Andres Galante, - Arve Bersvendsen, - Björn Höhrmann, - Chen Hui Jing, - Chris Lilley, - Chris Rebert, - Christian Biesinger, - Christoph Päper, - Elika J. Etemad (fantasai), - Emilio Cobos Álvarez, - François Remy, - Frédéric Wang, - Fuqiao Xue, - Greg Whitworth, - Ian Pouncey, - James Craig, - Jay Harris, - Jinfeng Ma, - Kivi Shapiro, - L. David Baron, - Masataka Yakura, - Matt Giuca, - Melinda Grant, - Michael Smith, - Nicholas C. Zakas - Patrick H. Lauke, - Philipp Hoschka, - Rick Byers, - Rijk van Geijtenbeek, - Rik Cabanier, - Roger Gimson, - Rossen Atanassov, - Sam Sneddon, - Sigurd Lerstad, - Simon Kissane, - Simon Pieters, - Stephen Chenney, - Steven Pemberton, - Susan Lesch, - Tantek Çelik, - Thomas Wisniewski, - Vi Nguyen, - Xidorn Quan, - Yves Lafon, - akklesed, - and 張俊芝 +Adam Argyle, +Amelia Bellamy-Royds, +Andreas Lind, +Andres Galante, +Arve Bersvendsen, +Björn Höhrmann, +Chen Hui Jing, +Chris Lilley, +Chris Rebert, +Christian Biesinger, +Christoph Päper, +Elika J. Etemad (fantasai), +Emilio Cobos Álvarez, +François Remy, +Frédéric Wang, +Fuqiao Xue, +Greg Whitworth, +Ian Pouncey, +James Craig, +Jay Harris, +Jinfeng Ma, +Kivi Shapiro, +L. David Baron, +Masataka Yakura, +Matt Giuca, +Melinda Grant, +Michael Smith, +Nicholas C. Zakas +Patrick H. Lauke, +Philipp Hoschka, +Rick Byers, +Rijk van Geijtenbeek, +Rik Cabanier, +Roger Gimson, +Rossen Atanassov, +Sam Sneddon, +Sigurd Lerstad, +Simon Kissane, +Simon Pieters, +Stephen Chenney, +Steven Pemberton, +Susan Lesch, +Tantek Çelik, +Thomas Wisniewski, +Vi Nguyen, +Xidorn Quan, +Yves Lafon, +akklesed, +and 張俊芝 improved this specification.

        Privacy Considerations

        -No new privacy considerations have been reported on this specification. + This section is not normative. + +
        + + Issue: this section is incomplete + + Many media features enable fingerprinting of users + based on the display and interaction characteristics of their device: + + * Colors: '@media/color', '@media/color-index', '@media/monochrome', '@media/color-gamut' and '@media/dynamic-range' + * Viewport characteristics: '@media/aspect-ratio', '@media/orientation', + '@media/horizontal-viewport-segments' and + '@media/vertical-viewport-segments' + * Display quality: '@media/resolution', '@media/scan', '@media/grid', '@media/update' and '@media/environment-blending' + * Interaction devices: '@media/pointer', '@media/hover', '@media/any-pointer' and '@media/any-hover'. + + The '@media/environment-blending' feature is of particular concern + because it suggests where a user may be located, + and is likely present in a small set of devices. + Uncommon device properties are stronger fingerprinting features + because they help segment devices into smaller sets. + + Media features that reflect operating system preferences are a fingerprinting risk + because such preferences are correlated with characteristics of the user themselves: + + * The '@media/prefers-reduced-data' media feature may be correlated with low income and limited data. + * The '@media/prefers-reduced-motion', '@media/prefers-color-scheme', '@media/prefers-reduced-transparency', + '@media/forced-colors' and '@media/inverted-colors' queries reflect affordances for a range of special needs. + + Properties dependent on one of the above media queries may be accessed by script: + + * Colors and other property values may be directly accessed through computed style, + though user agents may elect to return constants for some colors + (see, for example, CSS Color 4). + * Layout affecting properties (such as font size) influence lengths, positions and sizes available to script. + + User agents may disable these media features when users have expressed sensitivity to tracking. + Alternatively, user agents may limit the combination of features within a single page + to reduce the fingerprinting power of the page. + + The {{PreferenceManager}} object allows querying some user-preference [=media features=]. This + is not a privacy leak, as that information is already trivially + available by using [=media features=] themselves. + + The {{PreferenceManager}} object also allows overriding these user-preference [=media features=]; this + is also neither a privacy nor accessibility regression, as the [=media features=] were already ignorable by simply + not querying them. + +

        Security Considerations

        -No new security considerations have been reported on this specification. + This section is not normative. + +
        + + Issue: this section is incomplete + + The '@media/display-mode' media feature allows an origin + access to aspects of a user’s local computing environment and, + particularly when used together with an [=application manifest=] [=manifest/display=] member [[APPMANIFEST]], + allows an origin some measure of control over a user agent’s native UI. + Through a CSS media query, a script can know the display mode of a web application. + An attacker could, in such a case, + exploit the fact that an application is being displayed in fullscreen + to mimic the user interface of another application. + +
        diff --git a/resize-observer-1/Overview.bs b/resize-observer-1/Overview.bs index a1b146f06ea0..5566e51c535d 100644 --- a/resize-observer-1/Overview.bs +++ b/resize-observer-1/Overview.bs @@ -1,5 +1,5 @@

    This section is not normative. + + A selector is a boolean predicate that takes an element in a tree structure and tests whether the element matches the selector or not. @@ -88,6 +92,8 @@ Introduction

    Module Interactions

    + + This module replaces the definitions of and extends the set of selectors defined for CSS in [[SELECT]] and [[CSS21]]. @@ -104,6 +110,8 @@ Selectors Overview This section is non-normative, as it merely summarizes the following sections. + + A selector represents a structure. This structure can be used as a condition (e.g. in a CSS rule) that determines which elements a selector matches in the document tree, or as a flat description of the @@ -490,6 +498,306 @@ Selectors Overview Note: Some Level 4 selectors (noted above as "3-UI") were introduced in [[CSS3UI]]. + + old-tests/css3-modsel-1.xml + old-tests/css3-modsel-10.xml + old-tests/css3-modsel-100.xml + old-tests/css3-modsel-100b.xml + old-tests/css3-modsel-101.xml + old-tests/css3-modsel-101b.xml + old-tests/css3-modsel-102.xml + old-tests/css3-modsel-102b.xml + old-tests/css3-modsel-103.xml + old-tests/css3-modsel-103b.xml + old-tests/css3-modsel-104.xml + old-tests/css3-modsel-104b.xml + old-tests/css3-modsel-105.xml + old-tests/css3-modsel-105b.xml + old-tests/css3-modsel-106.xml + old-tests/css3-modsel-106b.xml + old-tests/css3-modsel-107.xml + old-tests/css3-modsel-107b.xml + old-tests/css3-modsel-108.xml + old-tests/css3-modsel-108b.xml + old-tests/css3-modsel-109.xml + old-tests/css3-modsel-109b.xml + old-tests/css3-modsel-11.xml + old-tests/css3-modsel-110.xml + old-tests/css3-modsel-110b.xml + old-tests/css3-modsel-111.xml + old-tests/css3-modsel-111b.xml + old-tests/css3-modsel-112.xml + old-tests/css3-modsel-112b.xml + old-tests/css3-modsel-113.xml + old-tests/css3-modsel-113b.xml + old-tests/css3-modsel-114.xml + old-tests/css3-modsel-114b.xml + old-tests/css3-modsel-115.xml + old-tests/css3-modsel-115b.xml + old-tests/css3-modsel-116.xml + old-tests/css3-modsel-116b.xml + old-tests/css3-modsel-117.xml + old-tests/css3-modsel-117b.xml + old-tests/css3-modsel-118.xml + old-tests/css3-modsel-119.xml + old-tests/css3-modsel-120.xml + old-tests/css3-modsel-121.xml + old-tests/css3-modsel-122.xml + old-tests/css3-modsel-123.xml + old-tests/css3-modsel-123b.xml + old-tests/css3-modsel-124.xml + old-tests/css3-modsel-124b.xml + old-tests/css3-modsel-125.xml + old-tests/css3-modsel-125b.xml + old-tests/css3-modsel-126.xml + old-tests/css3-modsel-126b.xml + old-tests/css3-modsel-127.xml + old-tests/css3-modsel-127b.xml + old-tests/css3-modsel-128.xml + old-tests/css3-modsel-128b.xml + old-tests/css3-modsel-129.xml + old-tests/css3-modsel-129b.xml + old-tests/css3-modsel-13.xml + old-tests/css3-modsel-130.xml + old-tests/css3-modsel-130b.xml + old-tests/css3-modsel-131.xml + old-tests/css3-modsel-131b.xml + old-tests/css3-modsel-132.xml + old-tests/css3-modsel-132b.xml + old-tests/css3-modsel-133.xml + old-tests/css3-modsel-133b.xml + old-tests/css3-modsel-134.xml + old-tests/css3-modsel-134b.xml + old-tests/css3-modsel-135.xml + old-tests/css3-modsel-135b.xml + old-tests/css3-modsel-136.xml + old-tests/css3-modsel-136b.xml + old-tests/css3-modsel-137.xml + old-tests/css3-modsel-137b.xml + old-tests/css3-modsel-138.xml + old-tests/css3-modsel-138b.xml + old-tests/css3-modsel-139.xml + old-tests/css3-modsel-139b.xml + old-tests/css3-modsel-14.xml + old-tests/css3-modsel-140.xml + old-tests/css3-modsel-140b.xml + old-tests/css3-modsel-141.xml + old-tests/css3-modsel-141b.xml + old-tests/css3-modsel-142.xml + old-tests/css3-modsel-142b.xml + old-tests/css3-modsel-143.xml + old-tests/css3-modsel-143b.xml + old-tests/css3-modsel-144.xml + old-tests/css3-modsel-145a.xml + old-tests/css3-modsel-145b.xml + old-tests/css3-modsel-146a.xml + old-tests/css3-modsel-146b.xml + old-tests/css3-modsel-147a.xml + old-tests/css3-modsel-147b.xml + old-tests/css3-modsel-148.xml + old-tests/css3-modsel-149.xml + old-tests/css3-modsel-149b.xml + old-tests/css3-modsel-14b.xml + old-tests/css3-modsel-14c.xml + old-tests/css3-modsel-14d.xml + old-tests/css3-modsel-14e.xml + old-tests/css3-modsel-15.xml + old-tests/css3-modsel-150.xml + old-tests/css3-modsel-151.xml + old-tests/css3-modsel-152.xml + old-tests/css3-modsel-153.xml + old-tests/css3-modsel-154.xml + old-tests/css3-modsel-155.xml + old-tests/css3-modsel-155a.xml + old-tests/css3-modsel-155b.xml + old-tests/css3-modsel-155c.xml + old-tests/css3-modsel-155d.xml + old-tests/css3-modsel-156.xml + old-tests/css3-modsel-156b.xml + old-tests/css3-modsel-156c.xml + old-tests/css3-modsel-157.xml + old-tests/css3-modsel-158.xml + old-tests/css3-modsel-159.xml + old-tests/css3-modsel-15b.xml + old-tests/css3-modsel-16.xml + old-tests/css3-modsel-160.xml + old-tests/css3-modsel-161.xml + old-tests/css3-modsel-166.xml + old-tests/css3-modsel-166a.xml + old-tests/css3-modsel-167.xml + old-tests/css3-modsel-167a.xml + old-tests/css3-modsel-168.xml + old-tests/css3-modsel-168a.xml + old-tests/css3-modsel-169.xml + old-tests/css3-modsel-169a.xml + old-tests/css3-modsel-17.xml + old-tests/css3-modsel-170.xml + old-tests/css3-modsel-170a.xml + old-tests/css3-modsel-170b.xml + old-tests/css3-modsel-170c.xml + old-tests/css3-modsel-170d.xml + old-tests/css3-modsel-171.xml + old-tests/css3-modsel-172a.xml + old-tests/css3-modsel-172b.xml + old-tests/css3-modsel-173a.xml + old-tests/css3-modsel-173b.xml + old-tests/css3-modsel-174a.xml + old-tests/css3-modsel-174b.xml + old-tests/css3-modsel-175a.xml + old-tests/css3-modsel-175b.xml + old-tests/css3-modsel-175c.xml + old-tests/css3-modsel-176.xml + old-tests/css3-modsel-177a.xml + old-tests/css3-modsel-177b.xml + old-tests/css3-modsel-178.xml + old-tests/css3-modsel-179.xml + old-tests/css3-modsel-179a.xml + old-tests/css3-modsel-18.xml + old-tests/css3-modsel-180a.xml + old-tests/css3-modsel-181.xml + old-tests/css3-modsel-182.xml + old-tests/css3-modsel-183.xml + old-tests/css3-modsel-184a.xml + old-tests/css3-modsel-184b.xml + old-tests/css3-modsel-184c.xml + old-tests/css3-modsel-184d.xml + old-tests/css3-modsel-184e.xml + old-tests/css3-modsel-184f.xml + old-tests/css3-modsel-18a.xml + old-tests/css3-modsel-18b.xml + old-tests/css3-modsel-18c.xml + old-tests/css3-modsel-19.xml + old-tests/css3-modsel-19b.xml + old-tests/css3-modsel-2.xml + old-tests/css3-modsel-20.xml + old-tests/css3-modsel-21.xml + old-tests/css3-modsel-21b.xml + old-tests/css3-modsel-21c.xml + old-tests/css3-modsel-22.xml + old-tests/css3-modsel-25.xml + old-tests/css3-modsel-27.xml + old-tests/css3-modsel-27a.xml + old-tests/css3-modsel-27b.xml + old-tests/css3-modsel-28.xml + old-tests/css3-modsel-28b.xml + old-tests/css3-modsel-29.xml + old-tests/css3-modsel-29b.xml + old-tests/css3-modsel-3.xml + old-tests/css3-modsel-30.xml + old-tests/css3-modsel-31.xml + old-tests/css3-modsel-32.xml + old-tests/css3-modsel-33.xml + old-tests/css3-modsel-34.xml + old-tests/css3-modsel-35.xml + old-tests/css3-modsel-36.xml + old-tests/css3-modsel-37.xml + old-tests/css3-modsel-38.xml + old-tests/css3-modsel-39.xml + old-tests/css3-modsel-39a.xml + old-tests/css3-modsel-39b.xml + old-tests/css3-modsel-39c.xml + old-tests/css3-modsel-3a.xml + old-tests/css3-modsel-4.xml + old-tests/css3-modsel-41.xml + old-tests/css3-modsel-41a.xml + old-tests/css3-modsel-42.xml + old-tests/css3-modsel-42a.xml + old-tests/css3-modsel-43.xml + old-tests/css3-modsel-43b.xml + old-tests/css3-modsel-44.xml + old-tests/css3-modsel-44b.xml + old-tests/css3-modsel-44c.xml + old-tests/css3-modsel-44d.xml + old-tests/css3-modsel-45.xml + old-tests/css3-modsel-45b.xml + old-tests/css3-modsel-45c.xml + old-tests/css3-modsel-46.xml + old-tests/css3-modsel-46b.xml + old-tests/css3-modsel-47.xml + old-tests/css3-modsel-48.xml + old-tests/css3-modsel-49.xml + old-tests/css3-modsel-5.xml + old-tests/css3-modsel-50.xml + old-tests/css3-modsel-51.xml + old-tests/css3-modsel-52.xml + old-tests/css3-modsel-53.xml + old-tests/css3-modsel-54.xml + old-tests/css3-modsel-55.xml + old-tests/css3-modsel-56.xml + old-tests/css3-modsel-57.xml + old-tests/css3-modsel-57b.xml + old-tests/css3-modsel-59.xml + old-tests/css3-modsel-6.xml + old-tests/css3-modsel-60.xml + old-tests/css3-modsel-61.xml + old-tests/css3-modsel-62.xml + old-tests/css3-modsel-63.xml + old-tests/css3-modsel-64.xml + old-tests/css3-modsel-65.xml + old-tests/css3-modsel-66.xml + old-tests/css3-modsel-66b.xml + old-tests/css3-modsel-67.xml + old-tests/css3-modsel-7.xml + old-tests/css3-modsel-70.xml + old-tests/css3-modsel-72.xml + old-tests/css3-modsel-72b.xml + old-tests/css3-modsel-73.xml + old-tests/css3-modsel-73b.xml + old-tests/css3-modsel-74.xml + old-tests/css3-modsel-74b.xml + old-tests/css3-modsel-75.xml + old-tests/css3-modsel-75b.xml + old-tests/css3-modsel-76.xml + old-tests/css3-modsel-76b.xml + old-tests/css3-modsel-77.xml + old-tests/css3-modsel-77b.xml + old-tests/css3-modsel-78.xml + old-tests/css3-modsel-78b.xml + old-tests/css3-modsel-79.xml + old-tests/css3-modsel-7b.xml + old-tests/css3-modsel-8.xml + old-tests/css3-modsel-80.xml + old-tests/css3-modsel-81.xml + old-tests/css3-modsel-81b.xml + old-tests/css3-modsel-82.xml + old-tests/css3-modsel-82b.xml + old-tests/css3-modsel-83.xml + old-tests/css3-modsel-86.xml + old-tests/css3-modsel-87.xml + old-tests/css3-modsel-87b.xml + old-tests/css3-modsel-88.xml + old-tests/css3-modsel-88b.xml + old-tests/css3-modsel-89.xml + old-tests/css3-modsel-9.xml + old-tests/css3-modsel-90.xml + old-tests/css3-modsel-90b.xml + old-tests/css3-modsel-91.xml + old-tests/css3-modsel-92.xml + old-tests/css3-modsel-93.xml + old-tests/css3-modsel-94.xml + old-tests/css3-modsel-94b.xml + old-tests/css3-modsel-95.xml + old-tests/css3-modsel-96.xml + old-tests/css3-modsel-96b.xml + old-tests/css3-modsel-97.xml + old-tests/css3-modsel-97b.xml + old-tests/css3-modsel-98.xml + old-tests/css3-modsel-98b.xml + old-tests/css3-modsel-99.xml + old-tests/css3-modsel-99b.xml + old-tests/css3-modsel-d1.xml + old-tests/css3-modsel-d1b.xml + old-tests/css3-modsel-d2.xml + old-tests/css3-modsel-d3.xml + old-tests/css3-modsel-d4.xml + + + + eof-right-after-selector-crash.html + eof-some-after-selector-crash.html + hash-collision.html + parsing/invalid-pseudos.html +

    Selector Syntax and Structure

    @@ -664,6 +972,14 @@ Data Model

    Featureless Elements

    + + featureless-001.html + featureless-002.html + featureless-003.html + featureless-004.html + featureless-005.html + + While individual elements may lack any of the above features, some elements are featureless. A featureless element does not match any selector at all, @@ -770,7 +1086,6 @@ Relative Selectors and lists of them by <>. -

    Pseudo-classes

    @@ -813,8 +1128,13 @@ Pseudo-classes (such that a compound selector containing them, while valid, will never match anything), while others can apply simultaneously to the same element. +

    Pseudo-elements

    + + x-pseudo-element.html + + Similar to how certain pseudo-classes represent additional state information not directly present in the document tree, a pseudo-element represents an element @@ -1007,6 +1327,12 @@ Internal Structure

    Characters and case sensitivity

    + + case-insensitive-parent.html + invalidation/quirks-mode-stylesheet-dynamic-add-001.html + selectors-case-sensitive-001.html + + All Selectors syntax is [=ASCII case-insensitive=] (i.e. [a-z] and \[A-Z] are equivalent), except for the parts @@ -1054,6 +1380,12 @@ Declaring Namespace Prefixes

    Invalid Selectors and Error Handling

    + + invalidation/selectorText-dynamic-001.html + invalidation/sheet-going-away-001.html + invalidation/sheet-going-away-002.html + + User agents must observe the rules for handling invalid selectors: @@ -1077,6 +1409,7 @@ Invalid Selectors and Error Handling An invalid selector represents, and therefore matches, nothing. +

    Legacy Aliases

    @@ -1084,9 +1417,15 @@ Invalid Selectors and Error Handling This is a name which, at parse time, is converted to the standard name (and thus does not appear anywhere in any object model representing the selector). +

    Logical Combinations

    + + invalidation/is-where-pseudo-containing-hard-pseudo-and-never-matching.html + invalidation/is-where-pseudo-containing-hard-pseudo.html + + Selector logic can be manipulated by [=compound selector|compounding=] (logical AND), [=selector lists=] (logical OR), @@ -1103,6 +1442,7 @@ Logical Combinations selector arguments that are invalidated by contextual restrictions likewise do not invalidate the '':is()'' pseudo-class itself. +

    Selector Lists

    @@ -1153,9 +1493,32 @@ Selector Lists is dropped.) +

    The Matches-Any Pseudo-class: '':is()''

    + + invalidation/is.html + is-default-ns-001.html + is-default-ns-002.html + is-default-ns-003.html + is-default-ns-002.html + is-default-ns-003.html + is-nested.html + is-specificity-shadow.html + is-specificity.html + is-where-basic.html + is-where-error-recovery.html + is-where-not.html + is-where-pseudo-classes.html + is-where-pseudo-elements.html + is-where-shadow.html + is-where-visited.html + parsing/parse-is-where.html + parsing/parse-is.html + query/query-is.html + + The matches-any pseudo-class, :is(), is a functional pseudo-class taking a <> as its sole argument. @@ -1207,9 +1570,23 @@ The Matches-Any Pseudo-class: '':is()'' as a [=legacy selector alias=] for '':is()'' if needed for backwards-compatibility. +

    The Negation (Matches-None) Pseudo-class: '':not()''

    + + invalidation/not-001.html + invalidation/not-002.html + not-complex.html + not-default-ns-001.html + not-default-ns-002.html + not-default-ns-003.html + not-links.html + not-specificity.html + parsing/parse-not.html + query/query-where.html + + The negation pseudo-class, :not(), is a functional pseudo-class taking a <> as an argument. It represents an element that is not represented by its argument. @@ -1257,6 +1634,12 @@ The Negation (Matches-None) Pseudo-class: '':not()''

    The Specificity-adjustment Pseudo-class: '':where()''

    + + invalidation/where.html + parsing/parse-where.html + pseudo-where-crash.html + + The Specificity-adjustment pseudo-class, :where(), is a functional pseudo-class with the same syntax and functionality as '':is()''. @@ -1303,6 +1686,94 @@ The Specificity-adjustment Pseudo-class: '':where()''

    The Relational Pseudo-class: '':has()''

    + + has-argument-with-explicit-scope.html + has-basic.html + has-display-none-checked.html + has-focus-display-change.html + has-matches-to-uninserted-elements.html + has-nth-of-crash.html + has-relative-argument.html + has-sibling-chrome-crash.html + has-specificity.html + has-style-sharing-001.html + has-style-sharing-002.html + has-style-sharing-003.html + has-style-sharing-004.html + has-style-sharing-005.html + has-style-sharing-006.html + has-style-sharing-007.html + has-style-sharing-pseudo-001.html + has-style-sharing-pseudo-002.html + has-style-sharing-pseudo-003.html + has-style-sharing-pseudo-004.html + has-style-sharing-pseudo-005.html + has-style-sharing-pseudo-006.html + has-style-sharing-pseudo-007.html + has-style-sharing-pseudo-008.html + has-visited.html + invalidation/attribute-or-elemental-selectors-in-has.html + invalidation/child-indexed-pseudo-classes-in-has.html + invalidation/crashtests/has-pseudoclass-only-crash.html + invalidation/defined-in-has.html + invalidation/dir-pseudo-class-in-has.html + invalidation/empty-pseudo-in-has.html + invalidation/fullscreen-pseudo-class-in-has.html + invalidation/has-append-first-node.html + invalidation/has-complexity.html + invalidation/has-css-nesting-shared.html + invalidation/has-in-adjacent-position.html + invalidation/has-in-ancestor-position.html + invalidation/has-in-parent-position.html + invalidation/has-in-sibling-position.html + invalidation/has-invalidation-after-removing-non-first-element.html + invalidation/has-invalidation-first-in-sibling-chain.html + invalidation/has-invalidation-for-wiping-an-element.html + invalidation/has-nested-pseudo-001-crash.html + invalidation/has-nested-pseudo-002-crash.html + invalidation/has-nested-pseudo-003-crash.html + invalidation/has-pseudo-element.html + invalidation/has-pseudoclass-only.html + invalidation/has-sibling-insertion-removal.html + invalidation/has-sibling.html + invalidation/has-side-effect.html + invalidation/has-unstyled.html + invalidation/has-with-nesting-parent-containing-complex.html + invalidation/has-with-nesting-parent-containing-hover.html + invalidation/has-with-not.html + invalidation/has-with-nth-child-sibling-remove.html + invalidation/has-with-nth-child.html + invalidation/has-with-pseudo-class.html + invalidation/host-context-pseudo-class-in-has.html + invalidation/host-has-shadow-tree-element-at-nonsubject-position.html + invalidation/host-has-shadow-tree-element-at-subject-position.html + invalidation/host-pseudo-class-in-has.html + invalidation/input-pseudo-classes-in-has.html + invalidation/is-pseudo-containing-complex-in-has.html + invalidation/is-pseudo-containing-sibling-relationship-in-has.html + invalidation/lang-pseudo-class-in-has-document-element.html + invalidation/lang-pseudo-class-in-has-multiple-document-elements.html + invalidation/lang-pseudo-class-in-has-xhtml.xhtml + invalidation/lang-pseudo-class-in-has.html + invalidation/link-pseudo-class-in-has.html + invalidation/link-pseudo-in-has.html + invalidation/location-pseudo-classes-in-has.html + invalidation/media-loading-pseudo-classes-in-has.html + invalidation/media-pseudo-classes-in-has.html + invalidation/modal-pseudo-class-in-has.html + invalidation/negated-has-in-nonsubject-position.html + invalidation/not-pseudo-containing-complex-in-has.html + invalidation/not-pseudo-containing-sibling-relationship-in-has.html + invalidation/state-in-has.html + invalidation/subject-has-invalidation-with-display-none-anchor-element.html + invalidation/target-pseudo-in-has.html + invalidation/typed-child-indexed-pseudo-classes-in-has.html + invalidation/user-action-pseudo-classes-in-has.html + parsing/parse-has-disallow-nesting-has-inside-has.html + parsing/parse-has-forgiving-selector.html + parsing/parse-has.html + + The relational pseudo-class, :has(), is a functional pseudo-class taking a <> as an argument. It represents an element if any of the relative selectors @@ -1371,9 +1842,14 @@ Type (tag name) selector [[!CSS3NAMESPACE]] (See [[#type-nmsp]].) +

    Universal selector

    + + parsing/parse-universal.html + + The universal selector is a special type selector, that represents an element of any element type. @@ -1407,6 +1883,7 @@ Universal selector For example, ''div :first-child'' and ''div:first-child'' are somewhat difficult to tell apart at a quick glance, but writing the former as ''div *:first-child'' makes the difference obvious. +

    Namespaces in Elemental Selectors

    @@ -1489,9 +1966,14 @@ Namespaces in Elemental Selectors that has not been previously declared is an invalid selector. +

    The Defined Pseudo-class: '':defined''

    + + invalidation/defined.html + + In some host languages, elements can have a distinction between being “defined”/“constructed” or not. The :defined pseudo-class matches elements @@ -1518,9 +2000,19 @@ The Defined Pseudo-class: '':defined''
    custom-element:defined { visibility: visible }
    +

    Attribute selectors

    + + attribute-selectors/style-attribute-selector.html + invalidation/attribute.html + invalidation/class-id-attr.html + missing-right-token.html + parsing/parse-attribute.html + selectors-attr-many.html + + Selectors allow the representation of an element's attributes. When a selector is used as an expression to match against an element, an attribute selector must be considered to match an element if that @@ -1531,6 +2023,7 @@ Attribute selectors multiple-value matching? e.g. [rel ~= next, prev, up, first, last] +

    Attribute presence and value selectors

    @@ -1630,6 +2123,7 @@ Attribute presence and value selectors +

    Substring matching attribute selectors

    @@ -1679,9 +2173,16 @@ Substring matching attribute selectors
    p[title*="hello"] 
    +

    Case-sensitivity

    + + attribute-selectors/attribute-case/cssom.html + attribute-selectors/attribute-case/semantics.html + attribute-selectors/attribute-case/syntax.html + + By default case-sensitivity of attribute names and values in selectors depends on the document language. @@ -1738,6 +2239,10 @@ Case-sensitivity

    Attribute selectors and namespaces

    + + selectors-namespace-001.xml + + The attribute name in an attribute selector is given as a [=CSS qualified name=]: a namespace prefix that has been previously [=declared=] may be prepended to the attribute name separated by the namespace @@ -1777,6 +2282,7 @@ Attribute selectors and namespaces in a namespace. +

    Default attribute values in DTDs

    @@ -1836,9 +2342,15 @@ Default attribute values in DTDs are overridden in the non-default cases' style rules. +

    Class selectors

    + + parsing/parse-class.html + xml-class-selector.xml + + The class selector is given as a full stop (. U+002E) immediately followed by an identifier. It represents an element belonging to the class identified by the identifier, as defined by the document language. @@ -1907,9 +2419,15 @@ Class selectors class selectors are otherwise case-sensitive, only matching class names they are [=identical to=]. [[INFRA]] +

    ID selectors

    + + historical-xmlid.xht + parsing/parse-id.html + + Document languages may contain attributes that are declared to be of type ID. What makes attributes of type ID special is that no two such attributes can have the same value in a conformant document, @@ -1965,12 +2483,40 @@ ID selectors ID selectors are otherwise case-sensitive, only matching IDs they are [=identical to=]. [[INFRA]] +

    Linguistic Pseudo-classes

    The Directionality Pseudo-class: '':dir()''

    + + dir-pseudo-in-has.html + dir-pseudo-on-bdi-element.html + dir-pseudo-on-input-element.html + dir-pseudo-update-document-element.html + dir-selector-auto-direction-change-001.html + dir-selector-auto.html + dir-selector-change-001.html + dir-selector-change-002.html + dir-selector-change-003.html + dir-selector-change-004.html + dir-selector-ltr-001.html + dir-selector-ltr-002.html + dir-selector-ltr-003.html + dir-selector-querySelector.html + dir-selector-rtl-001.html + dir-selector-white-space-001.html + dir-style-01a.html + dir-style-01b.html + dir-style-02a.html + dir-style-02b.html + dir-style-03a.html + dir-style-03b.html + dir-style-04.html + invalidation/part-dir.html + + The :dir() pseudo-class allows the author to write selectors that represent an element based on its directionality as determined by the document language. @@ -2007,9 +2553,85 @@ The Directionality Pseudo-class: '':dir()'' '':dir(ltr)'' or '':dir(rtl)'' depending on the resolved directionality of the elements as determined by its contents. [[HTML5]] +

    The Language Pseudo-class: '':lang()''

    + + i18n/css3-selectors-lang-001.html + i18n/css3-selectors-lang-002.html + i18n/css3-selectors-lang-004.html + i18n/css3-selectors-lang-005.html + i18n/css3-selectors-lang-006.html + i18n/css3-selectors-lang-007.html + i18n/css3-selectors-lang-008.html + i18n/css3-selectors-lang-009.html + i18n/css3-selectors-lang-010.html + i18n/css3-selectors-lang-011.html + i18n/css3-selectors-lang-012.html + i18n/css3-selectors-lang-014.html + i18n/css3-selectors-lang-015.html + i18n/css3-selectors-lang-016.html + i18n/css3-selectors-lang-021.html + i18n/css3-selectors-lang-022.html + i18n/css3-selectors-lang-024.html + i18n/css3-selectors-lang-025.html + i18n/css3-selectors-lang-026.html + i18n/css3-selectors-lang-027.html + i18n/css3-selectors-lang-028.html + i18n/css3-selectors-lang-029.html + i18n/css3-selectors-lang-030.html + i18n/css3-selectors-lang-031.html + i18n/css3-selectors-lang-032.html + i18n/css3-selectors-lang-034.html + i18n/css3-selectors-lang-035.html + i18n/css3-selectors-lang-036.html + i18n/css3-selectors-lang-041.html + i18n/css3-selectors-lang-042.html + i18n/css3-selectors-lang-044.html + i18n/css3-selectors-lang-045.html + i18n/css3-selectors-lang-046.html + i18n/css3-selectors-lang-047.html + i18n/css3-selectors-lang-048.html + i18n/css3-selectors-lang-049.html + i18n/css3-selectors-lang-050.html + i18n/css3-selectors-lang-051.html + i18n/css3-selectors-lang-052.html + i18n/css3-selectors-lang-054.html + i18n/css3-selectors-lang-055.html + i18n/css3-selectors-lang-056.html + i18n/lang-pseudo-class-across-shadow-boundaries.html + i18n/lang-pseudo-class-disconnected.html + i18n/lang-pseudo-class-empty-attribute.xhtml + invalidation/part-lang.html + selectors-4/lang-000.html + selectors-4/lang-001.html + selectors-4/lang-002.html + selectors-4/lang-003.html + selectors-4/lang-004.html + selectors-4/lang-005.html + selectors-4/lang-006.html + selectors-4/lang-007.html + selectors-4/lang-008.html + selectors-4/lang-009.html + selectors-4/lang-010.html + selectors-4/lang-011.html + selectors-4/lang-012.html + selectors-4/lang-013.html + selectors-4/lang-014.html + selectors-4/lang-015.html + selectors-4/lang-016.html + selectors-4/lang-017.html + selectors-4/lang-018.html + selectors-4/lang-019.html + selectors-4/lang-020.html + selectors-4/lang-021.html + selectors-4/lang-022.html + selectors-4/lang-023.html + selectors-4/lang-024.html + selectors-4/lang-025.html + + If the document language specifies how the (human) content language of an element is determined, it is possible to write selectors that @@ -2121,6 +2743,11 @@ Location Pseudo-classes + + invalidation/any-link-attribute-removal.html + invalidation/any-link-pseudo.html + + The :any-link pseudo-class represents an element that acts as the source anchor of a hyperlink. For example, in [[HTML5]], @@ -2133,6 +2760,17 @@ The Hyperlink Pseudo-class: '':any-link'' + + caret-color-visited-inheritance.html + text-emphasis-visited-inheritance.html + text-fill-color-visited-inheritance.html + text-stroke-color-visited-inheritance.html + visited-in-visited-compound.html + visited-inheritance.html + visited-nested.html + visited-part-crash.html + + User agents commonly display unvisited [[#the-any-link-pseudo|hyperlinks]] differently from previously visited ones. Selectors provides the pseudo-classes @@ -2276,6 +2914,11 @@ The Target Pseudo-class: '':target''

    The Reference Element Pseudo-class: '':scope''

    + + scope-selector.html + scope-without-scoping.html + + In some contexts, selectors are matched with respect to one or more [=scoping roots=], such as when calling the {{Element/querySelector()}} method in [[DOM]]. @@ -2309,6 +2952,7 @@ The Reference Element Pseudo-class: '':scope'' as the document fragment itself can't be the [=subject of the selector=]. +

    User Action Pseudo-classes

    @@ -2350,6 +2994,12 @@ User Action Pseudo-classes

    The Pointer Hover Pseudo-class: '':hover''

    + + hover-001-manual.html + hover-002.html + remove-hovered-element.html + + The :hover pseudo-class applies while the user designates an element (or pseudo-element) with a pointing device, @@ -2375,6 +3025,7 @@ The Pointer Hover Pseudo-class: '':hover'' it is possible for '':hover'' to apply to an element that is not underneath the pointing device. +

    The Activation Pseudo-class: '':active''

    @@ -2403,6 +3054,12 @@ The Activation Pseudo-class: '':active''

    The Input Focus Pseudo-class: '':focus''

    + + focus-display-none-001.html + focus-in-focus-event-001.html + focus-in-focusin-event-001.html + + The :focus pseudo-class applies while an element (or pseudo-element) has the focus (accepts keyboard or other forms of input). @@ -2424,9 +3081,58 @@ The Input Focus Pseudo-class: '':focus'' See CSSWG issue (CSS) and WHATWG issue (HTML). +

    The Focus-Indicated Pseudo-class: '':focus-visible''

    + + focus-visible-001.html + focus-visible-002.html + focus-visible-003.html + focus-visible-004.html + focus-visible-005.html + focus-visible-006.html + focus-visible-007.html + focus-visible-008.html + focus-visible-009.html + focus-visible-010.html + focus-visible-011.html + focus-visible-012.html + focus-visible-013.html + focus-visible-014.html + focus-visible-015.html + focus-visible-016.html + focus-visible-017-2.html + focus-visible-017.html + focus-visible-018-2.html + focus-visible-018.html + focus-visible-019.html + focus-visible-020.html + focus-visible-021.html + focus-visible-023.html + focus-visible-024.html + focus-visible-025.html + focus-visible-026.html + focus-visible-027.html + focus-visible-028.html + focus-visible-script-focus-001.html + focus-visible-script-focus-004.html + focus-visible-script-focus-005.html + focus-visible-script-focus-008-b.html + focus-visible-script-focus-008.html + focus-visible-script-focus-009.html + focus-visible-script-focus-010.html + focus-visible-script-focus-011.html + focus-visible-script-focus-012.html + focus-visible-script-focus-013.html + focus-visible-script-focus-014.html + focus-visible-script-focus-015.html + focus-visible-script-focus-018.html + focus-visible-script-focus-019.html + focus-visible-script-focus-020.html + parsing/parse-focus-visible.html + + While the '':focus'' [=pseudo-class=] always matches the currently-focused element, UAs only sometimes visibly indicate focus (such as by drawing a “focus ring”), @@ -2502,9 +3208,33 @@ The Focus-Indicated Pseudo-class: '':focus-visible'' so that authors using '':focus-visible'' will not also need to disable the default '':focus'' style. +

    The Focus Container Pseudo-class: '':focus-within''

    + + focus-within-001.html + focus-within-002.html + focus-within-003.html + focus-within-004.html + focus-within-005.html + focus-within-006.html + focus-within-007.html + focus-within-008.html + focus-within-009.html + focus-within-010.html + focus-within-011.html + focus-within-012.html + focus-within-013.html + focus-within-display-none-001.html + focus-within-shadow-001.html + focus-within-shadow-002.html + focus-within-shadow-003.html + focus-within-shadow-004.html + focus-within-shadow-005.html + focus-within-shadow-006.html + + The :focus-within pseudo-class applies to any element (or pseudo-element) for which the '':focus'' pseudo-class applies, @@ -2513,6 +3243,7 @@ The Focus Container Pseudo-class: '':focus-within'' (including non-element nodes, such as text nodes) matches the conditions for matching '':focus''. +

    The Interest Pseudo-classes: '':interest-source'' and '':interest-target''

    @@ -2556,7 +3287,7 @@ The Interest Pseudo-classes: '':interest-source'' and '':interest-target'' the user has to actually indicate interest in it too. Similarly, '':interest-target'' only matches an [=interest target=] that is linked to an element the user is currently interested in, - not any element pointed to by an <{html-global/interestefor}> attribute. + not any element pointed to by an <{html-global/interestfor}> attribute.

    @@ -2631,6 +3362,10 @@ Resource State Pseudo-classes

    Media Playback State: the '':playing'', '':paused'', and '':seeking'' pseudo-classes

    + + media/media-playback-state.html + + The :playing pseudo-class represents an element that is capable of being “played” or “paused”, when that element is “playing”. @@ -2653,6 +3388,10 @@ Media Playback State: the '':playing'', '':paused'', and '':seeking'' pseudo-cla

    Media Loading State: the '':buffering'' and '':stalled'' pseudo-classes

    + + media/media-loading-state.html + + The :buffering pseudo-class represents an element that is capable of being “played” or “paused”, when that element cannot continue playing @@ -2673,9 +3412,14 @@ Media Loading State: the '':buffering'' and '':stalled'' pseudo-classes Whenever '':stalled'' matches an element, '':playing'' also matches the element.) +

    Sound State: the '':muted'' and '':volume-locked'' pseudo-classes

    + + media/sound-state.html + + The :muted pseudo-class represents an element that is capable of making sound, but is currently “muted“ (forced silent). @@ -2689,12 +3433,20 @@ Sound State: the '':muted'' and '':volume-locked'' pseudo-classes (For the <{audio}> and <{video}> elements of HTML, see the algorithm for setting the element's [=HTMLMediaElement/effective media volume=]. [[HTML]]) +

    Element Display State Pseudo-classes

    Collapse State: the '':open'' pseudo-class

    + + open-pseudo.html + selectors-4/details-open-pseudo-001.html + selectors-4/details-open-pseudo-002.html + selectors-4/details-open-pseudo-003.html + + The :open pseudo-class represents an element that has both “open” and “closed” states, and which is currently in the “open” state. @@ -2714,9 +3466,14 @@ Collapse State: the '':open'' pseudo-class Note: A ":closed" pseudo-class might be added in the future once the full set of things that support '':open'' is known. +

    Popover State: the '':popover-open'' pseudo-class

    + + popover-open-with-has-sibling-selector.html + + The :popover-open pseudo-class represents an element that has both “popover-showing” and “popover-hidden” states and which is currently in the “popover-showing” state. @@ -2731,9 +3488,14 @@ Popover State: the '':popover-open'' pseudo-class but is exemplified by the presence of the HTML <{html-global/popover}> attribute and the associated popover visibility state. + + + modal-pseudo-class.html + + The :modal pseudo-class represents an element which is in a state that excludes all interaction with elements outside it until it has been dismissed. @@ -2748,6 +3510,7 @@ Modal (Exclusive Interaction) State: the '':modal'' pseudo-class since this prevents interaction with the rest of the page. +

    Fullscreen Presentation State: the '':fullscreen'' pseudo-class

    @@ -2756,6 +3519,7 @@ Fullscreen Presentation State: the '':fullscreen'' pseudo-class takes up most (usually all) of the screen, such as that defined by the Fullscreen API. [[FULLSCREEN]] +

    Picture-in-Picture Presentation State: the '':picture-in-picture'' pseudo-class

    @@ -2766,18 +3530,25 @@ Picture-in-Picture Presentation State: the '':picture-in-picture'' pseudo-class< while being displayed over other content, for example when using the Picture-in-Picture API. [[picture-in-picture]] +

    The Input Pseudo-classes

    The pseudo-classes in this section mostly apply to elements that take user input, such as HTML's input element. +

    Input Control States

    The '':enabled'' and '':disabled'' Pseudo-classes

    + + invalidation/enabled-disabled.html + pseudo-enabled-disabled.html + + The :enabled pseudo-class represents user interface elements that are in an enabled state; such elements must have a corresponding disabled state. @@ -2801,6 +3572,11 @@ The '':enabled'' and '':disabled'' Pseudo-classes

    The Mutability Pseudo-classes: '':read-only'' and '':read-write''

    + + selector-read-write-type-change-001.html + selector-read-write-type-change-002.html + + An element matches :read-write if it is user-alterable, as defined by the document language. Otherwise, it is :read-only. @@ -2811,6 +3587,15 @@ The Mutability Pseudo-classes: '':read-only'' and '':read-write''

    The Placeholder-shown Pseudo-class: '':placeholder-shown''

    + + invalidation/placeholder-shown.html + placeholder-shown.html + selector-placeholder-shown-emptify-placeholder.html + selector-placeholder-shown-type-change-001.html + selector-placeholder-shown-type-change-002.html + selector-placeholder-shown-type-change-003.html + + Input elements can sometimes show placeholder text as a hint to the user on what to type in. See, for example, the placeholder attribute in [[HTML5]]. @@ -2849,6 +3634,7 @@ The Default-option Pseudo-class: '':default'' the initially-selected <option>(s) in a <select>, and a few other elements. +

    Input Value States

    @@ -2981,6 +3767,12 @@ The Range Pseudo-classes: '':in-range'' and '':out-of-range''

    The Optionality Pseudo-classes: '':required'' and '':optional''

    + + selector-required-type-change-001.html + selector-required-type-change-002.html + selector-required.html + + A form element is :required or :optional if a value for it is, respectively, required or optional before the @@ -2990,6 +3782,14 @@ The Optionality Pseudo-classes: '':required'' and '':optional''

    The User-interaction Pseudo-classes: '':user-valid'' and '':user-invalid''

    + + invalidation/user-valid-user-invalid.html + user-invalid-form-submission-invalidation.html + user-invalid.html + user-valid.html + valid-invalid-form-fieldset.html + + The :user-invalid and the :user-valid pseudo-classes represent an element with incorrect or correct input, respectively, @@ -3037,9 +3837,14 @@ The User-interaction Pseudo-classes: '':user-valid'' and '':user-invalid'' +

    Tree-Structural pseudo-classes

    + + selector-structural-pseudo-root.html + + Selectors introduces the concept of structural pseudo-classes to permit selection based on extra information that lies in the document tree but cannot be represented by other simple selectors or @@ -3057,6 +3862,10 @@ Tree-Structural pseudo-classes

    '':root'' pseudo-class

    + + root-siblings.html + + The :root pseudo-class represents an element that is the root of the document. @@ -3065,9 +3874,14 @@ Tree-Structural pseudo-classes In HTML, this will be the <{html}> element (unless scripting has been used to modify the document). +

    '':empty'' pseudo-class

    + + selectors-empty-001.xml + + The :empty pseudo-class represents an element that has no children except, optionally, document white space characters. @@ -3112,9 +3926,87 @@ Tree-Structural pseudo-classes elements which authors perceive of as empty can be selected by this selector, as they expect. +

    Child-indexed Pseudo-classes

    + + child-indexed-no-parent.html + child-indexed-pseudo-class.html + invalidation/negated-nth-child-when-ancestor-changes.html + invalidation/negated-nth-last-child-when-ancestor-changes.html + invalidation/nth-child-containing-ancestor.html + invalidation/nth-child-in-shadow-root.html + invalidation/nth-child-of-attr-largedom.html + invalidation/nth-child-of-attr.html + invalidation/nth-child-of-class-prefix.html + invalidation/nth-child-of-class.html + invalidation/nth-child-of-has.html + invalidation/nth-child-of-id-prefix.html + invalidation/nth-child-of-ids.html + invalidation/nth-child-of-in-ancestor.html + invalidation/nth-child-of-in-is.html + invalidation/nth-child-of-in-shadow-root.html + invalidation/nth-child-of-is.html + invalidation/nth-child-of-pseudo-class.html + invalidation/nth-child-of-sibling.html + invalidation/nth-child-when-ancestor-changes.html + invalidation/nth-child-when-sibling-changes.html + invalidation/nth-child-whole-subtree.html + invalidation/nth-last-child-containing-ancestor.html + invalidation/nth-last-child-in-shadow-root.html + invalidation/nth-last-child-of-attr.html + invalidation/nth-last-child-of-class-prefix.html + invalidation/nth-last-child-of-class.html + invalidation/nth-last-child-of-has.html + invalidation/nth-last-child-of-id-prefix.html + invalidation/nth-last-child-of-ids.html + invalidation/nth-last-child-of-in-ancestor.html + invalidation/nth-last-child-of-in-is.html + invalidation/nth-last-child-of-in-shadow-root.html + invalidation/nth-last-child-of-is.html + invalidation/nth-last-child-of-pseudo-class.html + invalidation/nth-last-child-of-sibling.html + invalidation/nth-last-child-when-ancestor-changes.html + invalidation/nth-last-child-when-sibling-changes.html + nth-child-and-nth-last-child.html + nth-child-of-attribute.html + nth-child-of-classname-002.html + nth-child-of-classname.html + nth-child-of-complex-selector-many-children-2.html + nth-child-of-complex-selector-many-children.html + nth-child-of-complex-selector.html + nth-child-of-compound-selector.html + nth-child-of-has.html + nth-child-of-nesting.html + nth-child-of-no-space-after-of.html + nth-child-of-not.html + nth-child-of-nth-child.html + nth-child-of-pseudo.html + nth-child-of-tagname.html + nth-child-of-universal-selector.html + nth-child-specificity-1.html + nth-child-specificity-2.html + nth-child-specificity-3.html + nth-child-specificity-4.html + nth-child-spurious-brace-crash.html + nth-last-child-invalid.html + nth-last-child-of-classname.html + nth-last-child-of-complex-selector.html + nth-last-child-of-compound-selector.html + nth-last-child-of-nesting.html + nth-last-child-of-no-space-after-of.html + nth-last-child-of-style-sharing-1.html + nth-last-child-of-style-sharing-2.html + nth-last-child-of-tagname.html + nth-last-child-specificity-1.html + nth-last-child-specificity-2.html + nth-last-child-specificity-3.html + nth-last-child-specificity-4.html + sharing-in-svg-use.html + parsing/parse-anplusb.html + + The pseudo-classes defined in this section select elements based on their index amongst their inclusive siblings. @@ -3127,6 +4019,12 @@ Child-indexed Pseudo-classes

    '':nth-child()'' pseudo-class

    + + nth-of-invalid.html + invalidation/crashtests/nth-child-of-attribute-crash.html + invalidation/nth-of-namespace-class-invalidation-crash.html + + The :nth-child(An+B [of S]? ) pseudo-class notation represents elements that are among An+Bth elements @@ -3255,8 +4153,13 @@ Child-indexed Pseudo-classes

    '':first-child'' pseudo-class

    + + first-child.html + invalidation/first-child-last-child.html + + The :first-child pseudo-class - represents an element that if first among its inclusive siblings. + represents an element that is first among its inclusive siblings. Same as '':nth-child(1)''.
    @@ -3297,6 +4200,10 @@ Child-indexed Pseudo-classes

    '':last-child'' pseudo-class

    + + last-child.html + + The :last-child pseudo-class represents an element that is last among its inclusive siblings. Same as '':nth-last-child(1)''. @@ -3312,6 +4219,10 @@ Child-indexed Pseudo-classes

    '':only-child'' pseudo-class

    + + only-child.html + + The :only-child pseudo-class represents an element that has no siblings. Same as '':first-child:last-child'' @@ -3322,6 +4233,10 @@ Child-indexed Pseudo-classes

    Typed Child-indexed Pseudo-classes

    + + nth-of-type-namespace.html + + The pseudo-classes in this section are similar to the Child Index Pseudo-classes, but they resolve based on an element's index among elements of the same type (tag name) in their sibling list. @@ -3351,10 +4266,13 @@ Typed Child-indexed Pseudo-classes That is, ''img:nth-of-type(2)'' is equivalent to ''*:nth-child(2 of img)''. -

    '':nth-last-of-type()'' pseudo-class

    + + last-of-type.html + + The :nth-last-of-type(An+B) pseudo-class notation represents the same elements that would be matched by '':nth-last-child(|An+B| of |S|)'', where |S| is a [=type selector=] and namespace prefix matching the element in question. @@ -3380,6 +4298,17 @@ Typed Child-indexed Pseudo-classes

    '':first-of-type'' pseudo-class

    + + first-of-type.html + invalidation/negated-always-matches-negated-first-of-type-when-ancestor-changes.html + invalidation/negated-first-of-type-in-nonsubject-position.html + invalidation/negated-is-always-matches-negated-first-of-type-when-ancestor-changes.html + invalidation/negated-is-never-matches-negated-first-of-type-when-ancestor-changes.html + invalidation/negated-negated-first-of-type-when-ancestor-changes.html + invalidation/negated-never-matches-negated-first-of-type-when-ancestor-changes.html + of-type-selectors.xhtml + + The :first-of-type pseudo-class represents the same element as '':nth-of-type(1)''. @@ -3413,6 +4342,15 @@ Typed Child-indexed Pseudo-classes

    '':last-of-type'' pseudo-class

    + + invalidation/negated-always-matches-negated-last-of-type-when-ancestor-changes.html + invalidation/negated-is-always-matches-negated-last-of-type-when-ancestor-changes.html + invalidation/negated-is-never-matches-negated-last-of-type-when-ancestor-changes.html + invalidation/negated-last-of-type-invalidation.html + invalidation/negated-negated-last-of-type-when-ancestor-changes.html + invalidation/negated-never-matches-negated-last-of-type-when-ancestor-changes.html + + The :last-of-type pseudo-class represents the same element as '':nth-last-of-type(1)''. @@ -3427,6 +4365,10 @@ Typed Child-indexed Pseudo-classes

    '':only-of-type'' pseudo-class

    + + only-of-type.html + + The :only-of-type pseudo-class represents the same element as '':first-of-type:last-of-type''. @@ -3437,6 +4379,10 @@ Combinators

    Descendant combinator ( )

    + + parsing/parse-descendant.html + + At times, authors may want selectors to describe an element that is the descendant of another element in the document tree (e.g., "an em element that is contained within an H1 element"). @@ -3480,9 +4426,14 @@ Descendant combinator ( )
    div p *[href]
    +

    Child combinator (>)

    + + parsing/parse-child.html + + A child combinator describes a childhood relationship between two elements. A child combinator is made of the "greater-than sign" (U+003E, >) code point and @@ -3511,9 +4462,19 @@ Child combinator (>) For information on selecting the first child of an element, please see the section on the '':first-child'' pseudo-class above. +

    Next-sibling combinator (+)

    + + invalidation/insert-sibling-001.html + invalidation/insert-sibling-002.html + invalidation/insert-sibling-003.html + invalidation/insert-sibling-004.html + invalidation/sibling.html + parsing/parse-sibling.html + + The next-sibling combinator is made of the “plus sign” (U+002B, +) code point that separates two compound selectors. @@ -3580,6 +4541,7 @@ Grid-Structural Selectors are defined. In a column-primary format, these pseudo-classes match against row associations instead. +

    Column combinator (||)

    @@ -3613,6 +4575,7 @@ Column combinator (||) +

    '':nth-col()'' pseudo-class

    @@ -3629,7 +4592,6 @@ Column combinator (||) The CSS Syntax Module [[!CSS3SYN]] defines the An+B notation. -

    '':nth-last-col()'' pseudo-class

    @@ -3645,6 +4607,7 @@ Column combinator (||) The CSS Syntax Module [[!CSS3SYN]] defines the An+B notation. +

    Calculating a selector's specificity

    @@ -3747,9 +4710,14 @@ Calculating a selector's specificity specified in an HTML style attribute is described in CSS Style Attributes. [[CSSSTYLEATTR]] +

    Grammar

    + + selectors-attr-white-space-001.html + + Selectors are [=CSS/parsed=] according to the following grammar:
    @@ -3863,6 +4831,7 @@ Grammar
     		be written with only a single ":" character at their front,
     		making them resemble a <>.
     
    +
     

    <> and <>

    @@ -3929,6 +4898,7 @@ API Hooks and details like the exact order of elements returned from querySelector seem to make more sense being defined in the DOM specification than in Selectors. +

    Parse A Selector

    @@ -3953,6 +4923,7 @@ Parse A Selector return selector. +

    Parse A Relative Selector

    @@ -3977,6 +4948,7 @@ Parse A Relative Selector return selector. +

    Match a Selector Against an Element

    @@ -4021,6 +4993,7 @@ Match a Selector Against an Element Otherwise, return failure. +

    Match a Selector Against a Pseudo-element

    @@ -4052,6 +5025,7 @@ Match a Selector Against a Pseudo-element (that is, if this doesn't happen for any of the complex selectors in selector), return failure. +

    Match a Selector Against a Tree

    @@ -4123,6 +5097,7 @@ Match a Selector Against a Tree +

    Appendix A: Guidance on Mapping Source Documents & Data to an Element Tree

    @@ -4230,6 +5205,10 @@ Appendix A: Guidance on Mapping Source Documents & Data to an Element Tree Appendix B: Obsolete but Required -webkit- Parsing Quirks for Web Compat + + webkit-pseudo-element.html + + This appendix is normative. Due to legacy Web-compat constraints, @@ -4303,6 +5282,7 @@ Appendix B: Obsolete but Required -webkit- Parsing Quirks for Web C and all right-thinking web developers. +

    Appendix C: Example Privacy-Preserving '':visited'' Restrictions

    @@ -4404,29 +5384,36 @@ while still preserving as much of the usefulness of '':visited'' as pos -

    Changes

    +

    +Changes since the 11 November 2022 Working Draft

    + + Significant changes since the 11 November 2022 Working Draft: + + * Marked '':blank'' as at-risk and removed the at-risk status from '':read-write'' and '':has()'' + * Added '':popover-open'' pseudo-class. + (Issue 8637) + * Made '':has()'' and the selector argument of '':nth-child()''/'':nth-last-child()'' + no longer forgiving. + (Issue 7676) + * Moved the legacy single-colon pseudo-element syntax into the grammar itself. + (Issue 8122) +

    Changes since the 7 May 2022 Working Draft

    Significant changes since the 7 May 2022 Working Draft: - * Marked '':blank'' as at-risk and removed the at-risk status from '':read-write'' and '':has()'' * Added '':open'' pseudo-class. (Issue 7319, Issue 11039) - * Added '':popover-open'' pseudo-class. - (Issue 8637) * Disallowed [=pseudo-elements=] from '':has()'' unless explicitly allowed by the pseudo-element’s definition. (Issue 7463) * Disallowed nesting of '':has()''. (Issue 7344) - * Made '':has()'' and the selector argument of '':nth-child()''/'':nth-last-child()'' - no longer forgiving. - (Issue 7676) * Defined matching of ''::lang("")'' and of elements not tagged with a language. (Issue 6915) * Untangled the concepts of "scoped" and "relative" selectors completely. @@ -4438,8 +5425,7 @@ Changes since the 7 May 2022 Working Draft (Issue 3760) * Defined '':-webkit-autofill'' [=legacy selector alias=]. (Issue 7474) - * Moved the legacy single-colon pseudo-element syntax into the grammar itself. - (Issue 8122) +

    Changes since the 21 November 2018 Working Draft

    @@ -4477,6 +5463,7 @@ Changes since the 21 November 2018 Working Draft when a <> token is missing. +

    Changes since the 2 February 2018 Working Draft

    @@ -4505,6 +5492,7 @@ Changes since the 2 February 2018 Working Draft (See [[#grammar]].) +

    Changes since the 2 May 2013 Working Draft

    @@ -4556,6 +5544,7 @@ Changes since the 2 May 2013 Working Draft Note: The 1 February 2018 draft included an inadvertent commit of unfinished work; 2 February 2018 has reverted this commit (and fixed some links because why not). +

    Changes since the 23 August 2012 Working Draft

    @@ -4572,6 +5561,7 @@ Changes since the 23 August 2012 Working Draft
  • The '':local-link()'' pseudo-class now ignores trailing slashes. +

    Changes since the 29 September 2011 Working Draft

    @@ -4585,6 +5575,7 @@ Changes since the 29 September 2011 Working Draft
  • Changed column combinator from double slash to double pipe. +

    Changes Since Level 3

    @@ -4606,6 +5597,7 @@ Changes Since Level 3
  • Added case-insensitive / case-sensitive attribute-value matching flags. +

    Acknowledgements

    @@ -4625,7 +5617,7 @@ Acknowledgements Lea Verou -

    Privacy Considerations

    +

    Privacy Considerations

    • @@ -4642,5 +5634,26 @@ Acknowledgements The Privacy Considerations could also be considered to affect Security. - - + + + \ No newline at end of file diff --git a/selectors-5/Overview.bs b/selectors-5/Overview.bs index 117df878b07a..036ed686b075 100644 --- a/selectors-5/Overview.bs +++ b/selectors-5/Overview.bs @@ -4,6 +4,7 @@ Group: CSSWG Shortname: selectors Level: 5 Status: ED +!Delta Spec: yes Work Status: Exploring ED: https://drafts.csswg.org/selectors-5/ TR: https://www.w3.org/TR/selectors-5/ @@ -11,6 +12,8 @@ Editor: Elika J. Etemad / fantasai, Apple, http://fantasai.inkedblade.net/contac Editor: Tab Atkins Jr., Google, http://xanthir.com/contact/, w3cid 42199 Abstract: Selectors are patterns that match against elements in a tree, and as such form one of several technologies that can be used to select nodes in a document. Selectors have been optimized for use with HTML and XML, and are designed to be usable in performance-critical code. They are a core component of CSS (Cascading Style Sheets), which uses Selectors to bind style properties to elements in the document. Abstract: Selectors Level 5 describes the selectors that already exist in [[!selectors-4]], and further introduces new selectors for CSS and other languages that may need them. +WPT Path Prefix: css/selectors/ +WPT Display: closed