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

§Type Parameters

§
Theme extends {} = {}
[src]

§Properties

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

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

§
currentSelector: string
[src]

Current selector for rule matching

§

UnoCSS generator instance

§
rawSelector: string
[src]

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

§
rules?: Rule[]
[src]

Available only when details option is enabled.

§
shortcuts?: Shortcut[]
[src]

Available only when details option is enabled.

§
theme: Theme
[src]

The theme object

§
variantHandlers: VariantHandler[]
[src]

Matched variants handlers for this rule.

§

The result of variant matching.

§
variants?: Variant[]
[src]

Available only when details option is enabled.