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

x/aleph/lib/@unocss/core.ts>RuleContext

The Full-stack Framework in Deno.
Go to Latest
interface RuleContext
import { type RuleContext } from "https://deno.land/x/aleph@1.0.0-alpha.70/lib/@unocss/core.ts";

Type Parameters

optional
Theme extends { } = { }

Properties

rawSelector: string

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

currentSelector: string

Current selector for rule matching

generator: UnoGenerator

UnoCSS generator instance

theme: Theme

The theme object

variantHandlers: VariantHandler[]

Matched variants handlers for this rule.

variantMatch: VariantMatchedResult

The result of variant matching.

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

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

optional
rules: Rule[]

Available only when details option is enabled.

optional
shortcuts: Shortcut[]

Available only when details option is enabled.

optional
variants: Variant[]

Available only when details option is enabled.