Skip to content

pantoken-root / packages/utils/src / tokenUtilitiesCss

Συνάρτηση: tokenUtilitiesCss() ​

tokenUtilitiesCss(groups, options?): string

Βήτα

Build token-driven utility classes: one class per token, applying it to its natural CSS property. The token's --instui- tail is the class name, so --instui-font-weight-body-strong under property font-weight yields .<prefix>-font-weight-body-strong { font-weight: var(--instui-font-weight-body-strong); }. Use it for every "one token → one property" family (font-family/weight, line-height, border-radius, border-width, opacity, box-shadow). Colour and spacing keep their own builders — one token maps to several properties there. Pass the token names per property (e.g. filtered from @pantoken/tokens).

Παράμετροι ​

groups ​

μόνο για ανάγνωση TokenUtilityGroup[]

ένα TokenUtilityGroup για κάθε ιδιότητα CSS.

options? ​

UtilityOptions = {}

UtilityOptions.

Επιστρέφει ​

string

Η συμβολοσειρά CSS.