Module

x/fresh/plugins/twindv1_deps.ts>Context

The next-gen web framework.
Extremely Popular
Latest
interface Context
import { type Context } from "https://dotland.deno.dev/x/fresh@1.7.3/plugins/twindv1_deps.ts";

Type Parameters

optional
Theme extends BaseTheme = BaseTheme

Properties

Allows to resolve theme values.

e: (value: string) => string

escapes given string for use in a CSS selector or variable

h: (value: string) => string

create hash of given string — may be no-op eg returning the same input

d: (
section: string,
key: string,
color: ColorValue,
) => ColorValue | Falsey

returns the dark color

v: (value: string) => MaybeArray<string>

resolves a variant

r: (value: string, isDark?: boolean) => RuleResult

resolves a rule

s: (property: string, value: string) => string

stringifies a CSS property and value to a declaration

f: (rule: TwindRule) => TwindRule

called right before the rule is stringified and inserted into the sheet