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
The :contains() selector came about a long time ago and was abandoned in the CSS spec. We currently mimic contains as it was described originally.
It is important to note if that since the original spec is dead, there will be no updates. I imagine, if :contains() did not die way back when, that it is not impossible to think it would have been expanded to allow a comma-separated list of content: p:contains("some text", "some other text").
As :contains() currently supports valid identifiers or quoted values, a comma-separated list would contains a list of valid identifiers or quoted values. :contains() would match if any of the the items in the list match.
With things like :not() and :lang() moving towards comma-separated lists, and new functional selectors supporting comma-separated lists out of the box (except for a things like :nth-child(), :dir(), etc.), I think this evolution for :contains() makes sense.
The text was updated successfully, but these errors were encountered:
As an aside, should we be specifying all of our custom selectors with :-? Should :contains() be moved over to :-contains() (with a deprecation path of course)?
Adding lists is one of the most sane proposals for :contains(). As stated before, this seems like a logical progression that it seems CSS would have naturally taken had :contains() been included in the official specification. So we will implement this and mention how our :contains() differs from the original implementation proposal.
The
:contains()
selector came about a long time ago and was abandoned in the CSS spec. We currently mimic contains as it was described originally.It is important to note if that since the original spec is dead, there will be no updates. I imagine, if
:contains()
did not die way back when, that it is not impossible to think it would have been expanded to allow a comma-separated list of content:p:contains("some text", "some other text"
).As
:contains()
currently supports valid identifiers or quoted values, a comma-separated list would contains a list of valid identifiers or quoted values.:contains()
would match if any of the the items in the list match.With things like
:not()
and:lang()
moving towards comma-separated lists, and new functional selectors supporting comma-separated lists out of the box (except for a things like:nth-child()
,:dir()
, etc.), I think this evolution for:contains()
makes sense.The text was updated successfully, but these errors were encountered: