baselinewidely| Class | CSS |
|---|---|
| cs:d | color-scheme: dark; |
| cs:l | color-scheme: light; |
| cs:ld | color-scheme: light dark; |
Variants
Prefix any class with a variant to apply it only under that condition. Variants stack, as in @md:h:cs:l.
Breakpoints
Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.
| @xs:cs:l | From 32rem up. |
| @sm:cs:l | From 40rem up. |
| @md:cs:l | From 48rem up. |
| @lg:cs:l | From 64rem up. |
| @xl:cs:l | From 80rem up. |
| @xxl:cs:l | From 96rem up. |
Containers
Apply a class from a container's width up, not the viewport's. Mark the parent with ct:is first.
| @c:xs:cs:l | Container from 32rem up. |
| @c:sm:cs:l | Container from 40rem up. |
| @c:md:cs:l | Container from 48rem up. |
| @c:lg:cs:l | Container from 64rem up. |
| @c:xl:cs:l | Container from 80rem up. |
| @c:xxl:cs:l | Container from 96rem up. |
Media
Apply a class when the device or the page matches a condition, or on the first frame an element renders.
| @pc:cs:l | On a touch screen. |
| @prm:cs:l | With reduced motion on. |
| @st:cs:l | On the first frame. |
States
Apply a class only while the element is in a state, such as hovered, focused or checked.
| h:cs:l | On :hover. |
| f:cs:l | On :focus. |
| fv:cs:l | On :focus-visible. |
| a:cs:l | On :active. |
| d:cs:l | On :disabled. |
| fc:cs:l | On :first-child. |
| c:cs:l | On :checked. |
| e:cs:l | On :empty. |
| fw:cs:l | On :focus-within. |
| i:cs:l | On :invalid. |
| in:cs:l | On :indeterminate. |
| lc:cs:l | On :last-child. |
| nc:cs:l | On :nth-child. |
| r:cs:l | On :required. |
| ro:cs:l | On :read-only. |
| v:cs:l | On :valid. |
Pseudo Elements
Style a part of the element rather than the element itself, such as its placeholder or the selected text.
| a::cs:l | On ::after. |
| b::cs:l | On ::before. |
| p::cs:l | On ::placeholder. |
| s::cs:l | On ::selection. |