Skip to main content
Module

x/fresh/plugins/twindv1_deps.ts>Context

The next-gen web framework.
Extremely Popular
Latest
interface Context
import { type Context } from "https://deno.land/x/fresh@1.6.8/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