# Position

Set the positioning of an element.

**Widely available.** This feature is well established and works across many devices and browser versions.

Chrome 1 · Edge 12 · Firefox 1 · Safari 1

| Class | Properties | Value |
|-------|------------|-------|
| `p:a` | position | `absolute` |
| `p:f` | position | `fixed` |
| `p:r` | position | `relative` |
| `p:s` | position | `static` |
| `p:st` | position | `sticky` |

## Variants

Prefix any class with a variant to apply it only under that condition. Variants stack, as in `@md:h:p:r`.

### Breakpoints

Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.

| Class | Applies |
|-------|---------|
| `@xs:p:r` | From 32rem up. |
| `@sm:p:r` | From 40rem up. |
| `@md:p:r` | From 48rem up. |
| `@lg:p:r` | From 64rem up. |
| `@xl:p:r` | From 80rem up. |
| `@xxl:p:r` | From 96rem up. |

### Containers

Apply a class from a container's width up, not the viewport's. Mark the parent with `ct:is` first.

| Class | Applies |
|-------|---------|
| `@c:xs:p:r` | Container from 32rem up. |
| `@c:sm:p:r` | Container from 40rem up. |
| `@c:md:p:r` | Container from 48rem up. |
| `@c:lg:p:r` | Container from 64rem up. |
| `@c:xl:p:r` | Container from 80rem up. |
| `@c:xxl:p:r` | 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.

| Class | Applies |
|-------|---------|
| `@pc:p:r` | On a touch screen. |
| `@prm:p:r` | With reduced motion on. |
| `@st:p:r` | On the first frame. |

### States

Apply a class only while the element is in a state, such as hovered, focused or checked.

| Class | Applies |
|-------|---------|
| `h:p:r` | On :hover. |
| `f:p:r` | On :focus. |
| `fv:p:r` | On :focus-visible. |
| `a:p:r` | On :active. |
| `d:p:r` | On :disabled. |
| `fc:p:r` | On :first-child. |
| `c:p:r` | On :checked. |
| `e:p:r` | On :empty. |
| `fw:p:r` | On :focus-within. |
| `i:p:r` | On :invalid. |
| `in:p:r` | On :indeterminate. |
| `lc:p:r` | On :last-child. |
| `nc:p:r` | On :nth-child. |
| `r:p:r` | On :required. |
| `ro:p:r` | On :read-only. |
| `v:p:r` | On :valid. |

### Pseudo Elements

Style a part of the element rather than the element itself, such as its placeholder or the selected text.

| Class | Applies |
|-------|---------|
| `a::p:r` | On ::after. |
| `b::p:r` | On ::before. |
| `p::p:r` | On ::placeholder. |
| `s::p:r` | On ::selection. |