Skip to content

pantoken / formats/scss/src / toScss

Feidhm: toScss()

toScss(tokens, options?): string

Turgnamhach

Eisigh athróga SCSS don token IR.

Paraiméadair

tokens

neamh-inathraitheach Token[]

An IR (m.sh. ó @pantoken/tokens).

options?

ToScssOptions = {}

ToScssOptions.

Tuairisceáin

string

An sreang fhoinse SCSS.

Samplaí

Scaoil na hathróga réamhshocraithe (éadrom)

ts
import { toScss } from "@pantoken/scss";
import { tokens } from "@pantoken/tokens";

toScss(tokens); // "$instui-color-brand: #0374b5;\n…"

Réitigh mód dorcha téama eile

ts
import { toScss } from "@pantoken/scss";
import { byTheme } from "@pantoken/tokens";

toScss(byTheme("canvas"), { mode: "dark" });