Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/@unocss/core.ts>RuleContext

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
interface RuleContext
import { type RuleContext } from "https://deno.land/x/netzo@0.4.72/deps/@unocss/core.ts";

Type Parameters

optional
Theme extends object = object

Properties

rawSelector: string

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

currentSelector: string

Current selector for rule matching

generator: UnoGenerator<Theme>

UnoCSS generator instance

theme: Theme

The theme object

variantHandlers: VariantHandler[]

Matched variants handlers for this rule.

variantMatch: VariantMatchedResult<Theme>

The result of variant matching.

constructCSS: (body: CSSEntries | CSSObject, overrideSelector?: string) => string

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

optional
rules: Rule<Theme>[]

Available only when details option is enabled.

optional
shortcuts: Shortcut<Theme>[]

Available only when details option is enabled.

optional
variants: Variant<Theme>[]

Available only when details option is enabled.