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}` | "@starting-style";
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. 3. The @starting-style at-rule (exactly, with no additional parameters).