@@ -696,36 +696,56 @@ Name-Defining Constructs and Inheritance</h3>
696696
697697 If an at-rule or property defines a name that other CSS constructs can refer to it by,
698698 such as a ''@font-face'' '@font-face/font-family!!descriptor' name
699- or an ''@keyframes' ' name,
699+ or an 'anchor-scope ' name,
700700 it must be defined as a <dfn export for=CSS>tree-scoped name</dfn> .
701- [=Tree-scoped names=] are "global" within a particular [=node tree=] ;
702- unless otherwise specified,
703- they're associated with the [=root=] of the [=element=] hosting the stylesheet that the at-rule or property is defined in.
704-
705- Properties or descriptors that reference a "global" name,
701+ [=Tree-scoped names=] are associated with
702+ the [=root=] of the [=element=] hosting the stylesheet
703+ that the at-rule or property is declared in.
704+
705+ Additionally, [=tree-scoped names=] can be <dfn export for="tree-scoped name">loosely matched</dfn> or <dfn export for="tree-scoped name">strictly matched</dfn> ,
706+ defaulting to [=loosely matched=] unless otherwise specified.
707+ A [=loosely matched=] [=tree-scoped name=]
708+ can be matched by [=tree-scoped references=]
709+ (see below)
710+ in the same tree or descendant trees,
711+ while a [=strictly matched=] [=tree-scoped name=]
712+ can only be matched by [=tree-scoped references=]
713+ in the exact same tree.
714+
715+ Properties or descriptors that reference a [=tree-scoped name=] ,
706716 such as the 'font-family!!property'
707717 or 'animation-name' properties,
708718 must define their value as a <dfn export for=CSS>tree-scoped reference</dfn> .
709- [=Tree-scoped references=] implicitly capture
719+ These references implicitly capture
710720 a [=node tree=] [=root=]
711721 along with their specified value:
712722 unless otherwise specified,
713- the [=root=] of the [=element=] hosting the stylesheet that the property or descriptor is defined in.
723+ the [=root=] of the [=element=] hosting the stylesheet that the property or descriptor is declared in.
714724 This [=root=] reference stays with the [=tree-scoped reference=]
715725 as it is inherited.
716726
717- Whenever a [=tree-scoped reference=] is dereferenced
718- to find the CSS construct it is referencing,
727+ If a [=tree-scoped name=] is <dfn export for="tree-scoped name">global</dfn>
728+ (such as ''@font-face'' names),
729+ then when a [=tree-scoped reference=] is dereferenced to find it,
719730 first search only the [=tree-scoped names=] associated with the same [=root=]
720- as the [=tree-scoped reference=] must be searched .
731+ as the [=tree-scoped reference=] .
721732 If no relevant [=tree-scoped name=] is found,
722733 and the [=root=] is a [=shadow root=] ,
723- then repeat this search in the [=root=] 's [=host=]' s [=node tree=] .
724- (In other words, [=tree-scoped names=] " inherit" into descendant shadow trees,
734+ then repeat this search in the [=root=] 's [=host=]' s [=node tree=] (recursively) .
735+ (In other words, global [=tree-scoped names=] “ inherit” into descendant shadow trees,
725736 so long as they don't define the same name themselves.)
726737
738+ If a [=tree-scoped name=] is <dfn export for="tree-scoped name">local</dfn> to an element
739+ (such as 'anchor-name' or 'anchor-scope' values),
740+ then whether a [=tree-scoped reference=] matches the [=tree-scoped name=] on a given element
741+ depends on whether the [=tree-scoped name=] is [=tree-scoped name/strictly matched|strictly=] or [=tree-scoped name/loosely matched|loosely=] matched.
742+ A [=tree-scoped name/strictly matched=] [=tree-scoped name=] only matches if
743+ both names are associated with the same tree.
744+ A [=tree-scoped name/loosely matched=] [=tree-scoped name=] also matches if
745+ the [=tree-scoped name=] is associated with an ancestor tree.
746+
727747 If two [=tree-scoped names=] are directly compared
728- (for example, comparing an [=anchor name=] with an 'anchor-scope' ident ),
748+ (for example, when comparing [=computed values=] ),
729749 they are considered to match only if their identifiers match,
730750 <em> and</em> their [=root=] s match exactly.
731751 (If one has a [=root=] that's an ancestor of the other, for example,
@@ -736,6 +756,8 @@ Name-Defining Constructs and Inheritance</h3>
736756 and the properties that reference them,
737757 to use these concepts.
738758
759+ Global names include:
760+
739761 * ''@font-face'' , referenced by 'font-family!!property'
740762 * ''@font-feature-values'' , referenced by 'font-family!!property'
741763 * ''@keyframes'' , referenced by 'animation-name'
0 commit comments