RuleContext
interface RuleContext <Theme extends {} = {}> {
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>[];
}§Properties
§
constructCSS: (body: CSSEntries | CSSObject, overrideSelector?: string) => string
[src]Construct a custom CSS rule. Variants and selector escaping will be handled automatically.
§
generator: UnoGenerator<Theme>
[src]UnoCSS generator instance
§
variantHandlers: VariantHandler[]
[src]Matched variants handlers for this rule.
§
variantMatch: VariantMatchedResult<Theme>
[src]The result of variant matching.