Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@terrazzo/plugin-css

terrazzoapp612.8kMIT0.10.4TypeScript support: included

Convert DTCG design tokens JSON into CSS variables for use in any web application or native app with webview.

design tokens, design system, dtcg, w3c, css

readme

⛋ Terrazzo Monorepo

This repo serves as the home for:

  • Terrazzo CLI: generate code from DTCG tokens (formerly known as “Cobalt UI”)
  • Terrazzo Color Picker, a futuristic colorpicker that can handle wide gamut and high bit-depth colors in stunning color reproduction
  • Token Lab (coming soon): generate design systems from scratch, or start from an existing OSS design system

🔹 Cobalt UI

Cobalt UI 2.0 was renamed to Terrazzo (same project, same people). To see the code for Cobalt 1.0, see the 1.x branch.

changelog

@terrazzo/plugin-css

0.10.4

Patch Changes

0.10.3

Patch Changes

0.10.2

Patch Changes

0.10.1

Patch Changes

0.10.0

Minor Changes

  • #507 0060100 Thanks @drwpow! - ⚠️ Breaking change: remove HSV as a supported colorSpace, because it’s absent from CSS Color Module 4

  • #507 0060100 Thanks @drwpow! - ⚠️ Breaking change: align color token ranges to CSS Color Module 4. This results in breaking changes to HSL and HWB, which normalize to 0 - 100, rather than 0 - 1:

      {
        "colorSpace": "hsl",
    -   "components": [270, 0.5, 0.4]
    +   "components": [270, 50, 40]
      }

    All other color spaces should be unaffected, as they were already matching CSS Color Module 4.

Patch Changes

0.9.1

Patch Changes

0.9.0

Minor Changes

  • #497 9b80fd4 Thanks @bschlenk! - - potential 5x speedup for @terrazzo/plugin-css
    • removed isTokenMatch from @terrazzo/token-tools

Patch Changes

0.8.1

Patch Changes

0.8.0

Minor Changes

Patch Changes

0.7.4

Patch Changes

0.7.3

Patch Changes

0.7.2

Patch Changes

  • #477 0e24810 Thanks @dzonatan! - add baseSelector option to css plugin to allow changing the root selector

0.7.1

Patch Changes

0.7.0

Minor Changes

  • #454 44ff082 Thanks @drwpow! - ⚠️ Breaking change: the new color token object format uses "components" instead of "channels". Please update your tokens accordingly.

Patch Changes

0.6.0

Minor Changes

  • #425 9a98ab0 Thanks @drwpow! - feat: ⚠️ Breaking change: aliasing to specific modes (# character) is deprecated. It was an experimental feature in Cobalt 1.0 with unpredictable behavior. In some upcoming spec changes it will be incompatible with advanced usecases.

  • #425 9a98ab0 Thanks @drwpow! - fix: Improvements to mode aliasing and mode overrides. typography tokens only have to partially-declare overrides for modes, while keeping their core set. While this has been supported, behavior was buggy and sometimes was inconsistent.

  • #425 9a98ab0 Thanks @drwpow! - ⚠️ Breaking change: cubicBezier tokens no longer support aliases as values, in line with the spec.

Patch Changes

  • #425 9a98ab0 Thanks @drwpow! - fix: [plugin-css] Font Family names without spaces no longer get quotes.

    fix: Font Family tokens are always normalized to an array internally for easier parsing.

  • #425 9a98ab0 Thanks @drwpow! - feat: @terrazzo/plugin-css now returns entire token for variableName. This is a minor breaking change from variableName(name: string)variableName(token: Token), but current users can just use token.id to get the same value as before.

    ⚠️ Minor internal breaking change as a result: transformCSSValue() in @terrazzo/token-tools now requires entire token️ to make this possible.

  • #425 9a98ab0 Thanks @drwpow! - fix: ⚠️ [plugin-css] Minor breaking change: transition tokens no longer generate variables for sub-parts. This is a change done in service to better protect “allowed” token usage. If you want consumers to be able to “break apart” tokens, then they must also exist as individual tokens that get aliased.

  • Updated dependencies [9a98ab0, 9a98ab0, 9a98ab0, 9a98ab0, 9a98ab0, 9a98ab0, 9a98ab0, 9a98ab0, 9a98ab0]:

0.5.0

Minor Changes

  • #420 ff3d9d1 Thanks @drwpow! - fix: ⚠️ Breaking change: CSS aliases will revert to original 1.0 behavior and be “shallow,” meaning they’ll be preserved as-written. Terrazzo 2.0 (beta) attempted to simplify aliases to only be single-depth, but that results in unintentional behavior.

Patch Changes

0.4.0

Minor Changes

  • #416 822c956 Thanks @drwpow! - fix: ⚠️ Breaking change: CSS variables updated to closer match Cobalt 1.0 behavior

Patch Changes

0.3.2

Patch Changes

0.3.1

Patch Changes

0.3.0

Minor Changes

  • #391 8e6810c Thanks @drwpow! - fix: ⚠️ Breaking change: Remove dash around numbers in CSS var names

Patch Changes

0.2.0

Minor Changes

  • Reconcile types with latest changes from @terrazzo/cli and @terrazzo/parser

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

Patch Changes

0.0.11

Patch Changes

0.0.10

Patch Changes