@terrazzo/plugin-css
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

⛋ @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-css

Add 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 build

And you’ll see a ./tokens/tokens.css file generated in your project.

Full Documentation

Dependencies (3)

Dev Dependencies (1)

Package Sidebar

Install

npm i @terrazzo/plugin-css

Weekly Downloads

807

Version

0.0.11

License

MIT

Unpacked Size

44.5 kB

Total Files

16

Last publish

Collaborators

  • drewpowers