CSS Hooks
Documentation
Source on GitHub

Home > @css-hooks/core > HookImpl

HookImpl type

Represents a basic hook implementation, using CSS syntax to define a selector or at-rule.

Signature:

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

Remarks

Two types are supported: 1. A 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.

These can be combined using the Condition structure to form complex logic.