diff --git a/selectors-4/Overview.bs b/selectors-4/Overview.bs index 49019d5c198..458be9f18f4 100644 --- a/selectors-4/Overview.bs +++ b/selectors-4/Overview.bs @@ -1415,6 +1415,35 @@ Namespaces in Elemental Selectors that has not been previously declared is an invalid selector. +

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

+ + In some host languages, + elements can have a distinction between being “defined”/“constructed” or not. + The :defined pseudo-class matches elements + that are fully defined, + as dictated by the host language. + + If the host language does not have this sort of distinction, + all elements in it match '':defined''. + +
+ In HTML, all built-in elements are always considered to be defined, + so the following example will always match: + +
p:defined { ... }
+ + [=Custom elements=], on the other hand, + start out undefined, + and only become defined when [=element definition|properly registered=]. + This means the '':defined'' pseudo-class + can be used to hide a custom element + until it has been registered: + +
custom-element { visibility: hidden }
+
custom-element:defined { visibility: visible }
+
+

Attribute selectors