CSS Hooks
Documentation
Source on GitHub

Home > @css-hooks/core > Selector

Selector type

Represents the selector logic used to create a hook.

Signature:

export type Selector = `${string}&${string}` | `@${"media" | "container" | "supports"} ${string}`;

Remarks

Two types are supported: 1. A basic selector, where & is used as a placeholder for the element to which the condition applies. The & character must appear somewhere. 2. A @media, @container, or @supports at-rule. The value must begin with one of these keywords, followed by a space.