You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We discussed in the F2F that a few things being worked on need to be able to distinguish whether a pseudo-element is "singular" or "plural" - that is, if you target the pseudo-element (via a selector, a getComputedStyle() argument, etc) from a particular originating element, will you necessarily get 0/1 pseudo-element, or is it possible get N>1 pseudo-elements?
For example:
::before is singular - only one exists on an element.
::view-transition-group() is singular if a VT name is used (because names have to be document-unique), but plural otherwise (multiple VTs can have the same VT class, or the * argument matches all VTs).
::part() is always plural - the part name has the semantics of a class, and can refer to any number of elements.
We should reify this concept in Pseudo, and specify that APIs like getComputedStyle() can only refer to singular pseudos, or conditionally-singular pseudos if certain conditions are met.
The text was updated successfully, but these errors were encountered:
I would phrase it as "... supported when the style can be uniquely defined, either because there is only one (such as ::before) or because you must have a name that identifies the pseudo (such as ::highlight). Cases where there may be multiple do not get reported in getComputedStyle, even if there is only one that applies to the element."
That is basically a "yes/no" to whether support exists, with a way of explaining what the answer should be.
The alternative in my mind would be returning a list, but that's overkill to me.
We discussed in the F2F that a few things being worked on need to be able to distinguish whether a pseudo-element is "singular" or "plural" - that is, if you target the pseudo-element (via a selector, a getComputedStyle() argument, etc) from a particular originating element, will you necessarily get 0/1 pseudo-element, or is it possible get N>1 pseudo-elements?
For example:
::before
is singular - only one exists on an element.::view-transition-group()
is singular if a VT name is used (because names have to be document-unique), but plural otherwise (multiple VTs can have the same VT class, or the*
argument matches all VTs).::part()
is always plural - the part name has the semantics of a class, and can refer to any number of elements.We should reify this concept in Pseudo, and specify that APIs like getComputedStyle() can only refer to singular pseudos, or conditionally-singular pseudos if certain conditions are met.
The text was updated successfully, but these errors were encountered: