# Text Orientation

Set the orientation of text characters.

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

Chrome 48 · Edge 79 · Firefox 41 · Safari 14

| Class | Properties | Value |
|-------|------------|-------|
| `to:m` | text-orientation | `mixed` |
| `to:u` | text-orientation | `upright` |
| `to:sr` | text-orientation | `sideways-right` |
| `to:v` | text-orientation | `sideways` |

## Variants

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

### Breakpoints

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

| Class | Applies |
|-------|---------|
| `@xs:to:sr` | From 32rem up. |
| `@sm:to:sr` | From 40rem up. |
| `@md:to:sr` | From 48rem up. |
| `@lg:to:sr` | From 64rem up. |
| `@xl:to:sr` | From 80rem up. |
| `@xxl:to:sr` | 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:to:sr` | Container from 32rem up. |
| `@c:sm:to:sr` | Container from 40rem up. |
| `@c:md:to:sr` | Container from 48rem up. |
| `@c:lg:to:sr` | Container from 64rem up. |
| `@c:xl:to:sr` | Container from 80rem up. |
| `@c:xxl:to:sr` | 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:to:sr` | On a touch screen. |
| `@prm:to:sr` | With reduced motion on. |
| `@st:to:sr` | 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:to:sr` | On :hover. |
| `f:to:sr` | On :focus. |
| `fv:to:sr` | On :focus-visible. |
| `a:to:sr` | On :active. |
| `d:to:sr` | On :disabled. |
| `fc:to:sr` | On :first-child. |
| `c:to:sr` | On :checked. |
| `e:to:sr` | On :empty. |
| `fw:to:sr` | On :focus-within. |
| `i:to:sr` | On :invalid. |
| `in:to:sr` | On :indeterminate. |
| `lc:to:sr` | On :last-child. |
| `nc:to:sr` | On :nth-child. |
| `r:to:sr` | On :required. |
| `ro:to:sr` | On :read-only. |
| `v:to:sr` | 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::to:sr` | On ::after. |
| `b::to:sr` | On ::before. |
| `p::to:sr` | On ::placeholder. |
| `s::to:sr` | On ::selection. |