This table lists all CSS selectors and whether or not they are supported.
Selector | Example | Supported |
---|---|---|
Simple Selectors | ||
Type | input | YES |
Class | .classname | YES |
ID | #id | YES |
Universal | * | YES |
Attribute | a[attr~=value] | YES |
Combinators
| ||
Adjacent sibling | img + p | CONDITIONAL* |
General sibling | p ~ span | CONDITIONAL* |
Child | div > span | CONDITIONAL* |
Descendant | li li | CONDITIONAL* |
Pseudo classes
| ||
active | p:active | |
any | matches(header, main) | |
any - link | a:any-link | |
checked | input:checked | |
default | input:default | |
defined | simple-custom:defined | |
dir() | :dir(rtl) | |
disabled | input:disabled | |
empty | p:empty | |
enabled | input:enabled | |
first | @page :first | |
first - child | p:first-child | |
first - of - type | p:first-of-type | |
fullscreen | div:fullscreen | |
focus | input:focus | |
host | :host | |
host() | :host(.special-custom-element) | |
host - context() | :host-context(h1) | |
hover | p:hover | YES |
indeterminate | input:indeterminate | |
in - range | input:in-range | |
invalid | form:invalid | |
lang() | p:lang(en) | |
last - child | p:last-child | |
last - of - type | h2:last-of-type | |
left | @page :left | |
link | a:link | |
not() | :not(p,h1) | |
nth - child() | :nth-child(4n) | |
nth - last - child() | :nth-last-child(4n) | |
nth - last - of - type() | p:nth-last-of-type(4n) | |
nth - of - type() | p:nth-of-type(4n) | |
only - child | h2:only-child | |
only - of - type | p:only-of-type | |
optional | input:optional | |
out - of - range | input:out-of-range | |
read - only | input:read-only | |
read - write | input:read-write | |
required | input:required | |
right | @page :right | |
root | :root | |
scope | :scope | |
target | :target | |
valid | input:valid | |
visited | a:visited | |
Pseudo elements
| ||
after | a::after | |
before | q::before | |
cue | ::cue | |
first - letter | p::first-letter | |
first - line | p::first-line | |
selection | ::selection | |
slotted | ::slotted(span) |