Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

RuleContext

interface RuleContext <Theme extends object = object> {
constructCSS: (body: CSSEntries | CSSObject, overrideSelector?: string) => string;
currentSelector: string;
generator: UnoGenerator<Theme>;
rawSelector: string;
rules?: Rule<Theme>[];
shortcuts?: Shortcut<Theme>[];
theme: Theme;
variantHandlers: VariantHandler[];
variantMatch: VariantMatchedResult<Theme>;
variants?: Variant<Theme>[];
}

§Type Parameters

§
Theme extends object = object
[src]

§Properties

§
constructCSS: (body: CSSEntries | CSSObject, overrideSelector?: string) => string
[src]

Construct a custom CSS rule. Variants and selector escaping will be handled automatically.

§
currentSelector: string
[src]

Current selector for rule matching

§
generator: UnoGenerator<Theme>
[src]

UnoCSS generator instance

§
rawSelector: string
[src]

Unprocessed selector from user input. Useful for generating CSS rule.

§
rules?: Rule<Theme>[]
[src]

Available only when details option is enabled.

§
shortcuts?: Shortcut<Theme>[]
[src]

Available only when details option is enabled.

§
theme: Theme
[src]

The theme object

§
variantHandlers: VariantHandler[]
[src]

Matched variants handlers for this rule.

§
variantMatch: VariantMatchedResult<Theme>
[src]

The result of variant matching.

§
variants?: Variant<Theme>[]
[src]

Available only when details option is enabled.