baselinewidelyThe same values work with my, mbe, mbs, mb, mx, mie, mis, ml, mr & mt, as in mt:4.
Variants
Prefix any class with a variant to apply it only under that condition. Variants stack, as in @md:h:m:4.
Breakpoints
Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.
| @xs:m:4 | From 32rem up. |
| @sm:m:4 | From 40rem up. |
| @md:m:4 | From 48rem up. |
| @lg:m:4 | From 64rem up. |
| @xl:m:4 | From 80rem up. |
| @xxl:m:4 | 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:m:4 | Container from 32rem up. |
| @c:sm:m:4 | Container from 40rem up. |
| @c:md:m:4 | Container from 48rem up. |
| @c:lg:m:4 | Container from 64rem up. |
| @c:xl:m:4 | Container from 80rem up. |
| @c:xxl:m:4 | 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:m:4 | On a touch screen. |
| @prm:m:4 | With reduced motion on. |
| @st:m:4 | On the first frame. |
States
Apply a class only while the element is in a state, such as hovered, focused or checked.
| h:m:4 | On :hover. |
| f:m:4 | On :focus. |
| fv:m:4 | On :focus-visible. |
| a:m:4 | On :active. |
| d:m:4 | On :disabled. |
| fc:m:4 | On :first-child. |
| c:m:4 | On :checked. |
| e:m:4 | On :empty. |
| fw:m:4 | On :focus-within. |
| i:m:4 | On :invalid. |
| in:m:4 | On :indeterminate. |
| lc:m:4 | On :last-child. |
| nc:m:4 | On :nth-child. |
| r:m:4 | On :required. |
| ro:m:4 | On :read-only. |
| v:m:4 | On :valid. |
Pseudo Elements
Style a part of the element rather than the element itself, such as its placeholder or the selected text.
| a::m:4 | On ::after. |
| b::m:4 | On ::before. |
| p::m:4 | On ::placeholder. |
| s::m:4 | On ::selection. |
Negative
Put a minus after the colon to negate a value.
| m:-4 | A minus after the colon. |