Package Exports
- @terrazzo/plugin-css
- @terrazzo/plugin-css/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@terrazzo/plugin-css) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
⛋ @terrazzo/plugin-css
Convert DTCG tokens into CSS variables for use in any web application or native app with webview. Convert your modes into CSS media queries for complete flexibility.
Setup
Requires Node.js 18 or later and the CLI installed. With both installed, run:
npm i -D @terrazzo/plugin-cssAdd a terrazzo.config.js to the root of your project:
import { defineConfig } from "@terrazzo/cli";
import css from "@terrazzo/plugin-css";
export default defineConfig({
outDir: "./tokens/",
plugins: [
css({
fileName: "tokens.css",
}),
],
});Lastly, run:
npx tz buildAnd you’ll see a ./tokens/tokens.css file generated in your project.