Skip to content
Discussion options

You must be logged in to vote

First of all: Style Dictionary doesn't yet have proper composite token support. That means that any subvalues in a token won't run through the transformator, however the setup you have above will work as each value is using an alias token on its own.

There's two ways how you can accomplish this:

A) Generate CSS classes for each typography style by using a custom format that only triggers on type: typography

function getTypographyConfig() {
  console.log("Building typography ");

  return {
    source: [
      "tokens/01_base/**/*.+(json)",
      "tokens/03_semantic/typography.json",
    ],
    platforms: {
      css: {
        transforms: [
          "resolveMath",
          "size/px",
  …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nareshbhatia
Comment options

Answer selected by nareshbhatia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants