Skip to content

pantoken / formats/less/src / toLess

Fonksyon: toLess()

toLess(tokens, options?): string

Eksperimantal

Emèt varyab Less pou yon IR token.

Paramèt

tokens

sèlman lekti Token[]

IR la (pa egzanp soti nan @pantoken/tokens).

options?

ToLessOptions = {}

ToLessOptions.

Retounen

string

Chèn sous Less la.

Egzanp

Emèt varyab pa defo (limyè)

ts
import { toLess } from "@pantoken/less";
import { tokens } from "@pantoken/tokens";

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

Rezoud mòd fè nwa yon lòt tèm

ts
import { toLess } from "@pantoken/less";
import { byTheme } from "@pantoken/tokens";

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