# Grayscale

Set the grayscale filter for an element.

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

Chrome 53 · Edge 12 · Firefox 35 · Safari 9.1

| Class | Properties | Value |
|-------|------------|-------|
| `fgr:0` | filter | `grayscale(0%)` |
| `fgr:10` | filter | `grayscale(10%)` |
| `fgr:20` | filter | `grayscale(20%)` |
| `fgr:30` | filter | `grayscale(30%)` |
| `fgr:40` | filter | `grayscale(40%)` |
| `fgr:50` | filter | `grayscale(50%)` |
| `fgr:60` | filter | `grayscale(60%)` |
| `fgr:70` | filter | `grayscale(70%)` |
| `fgr:80` | filter | `grayscale(80%)` |
| `fgr:90` | filter | `grayscale(90%)` |
| `fgr:100` | filter | `grayscale()` |

## Variants

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

### Breakpoints

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

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