CSS Selectors

Meeseeks.CSS supports a subset of CSS3 selectors.

Supported Syntax

PatternExampleNotes
Basic Selectors------
**Matches any for ns or tag
tagdiv
ns\|tagfoo\|div
#iddiv#bar, #bar
.classdiv.baz, .baz
[attr]a[href], [lang]
[^attrPrefix]div[^data-]
[attr=val]a[rel="nofollow"]
[attr~=valIncludes]div[things~=thing1]
[attr\|=valDash]p[lang\|=en]
[attr^=valPrefix]a[href^=https:]
[attr$=valSuffix]img[src$=".png"]
[attr*=valContaining]a[href*=admin]
​
Pseudo Classes------
:first-childli:first-child
:first-of-typeli:first-of-type
:last-childtr:last-child
:last-of-typetr:last-of-type
:notnot(p:nth-child(even))Selectors cannot contain combinators or the not pseudo class
:nth-child(n)p:nth-child(even)Supports even, odd, 1.., or an+b formulas
:nth-last-child(n)p:nth-last-child(2)Supports even, odd, 1.., or an+b formulas
:nth-last-of-type(n)p:nth-last-of-type(2n+1)Supports even, odd, 1.., or an+b formulas
:nth-of-type(n)p:nth-of-type(1)Supports even, odd, 1.., or an+b formulas
​
Combinators------
X Ydiv.header .logoY descendant of X
X > Yol > liY child of X
X + Ydiv + pY is sibling directly after X
X ~ Ydiv ~ pY is any sibling after X
X, Y, Zbutton.standard, button.alertMatches X, Y, or Z