Skip to content

Instantly share code, notes, and snippets.

@alanbsmith
Last active May 30, 2025 17:47
Show Gist options
  • Save alanbsmith/364436f66eec9e2bb3632870f19adec7 to your computer and use it in GitHub Desktop.
Save alanbsmith/364436f66eec9e2bb3632870f19adec7 to your computer and use it in GitHub Desktop.
WIP style util migration guide

Canvas Kit Style Utility Migration

Overview

Style props are a convenient mechanism for modifying styles directly on components with CSS-in-JS. Unfortunately, they also come with a significant runtime cost which negatively impacts our user experience. Because of those concerns, we've introduced new styling utilities that allow you to get the convenience of CSS-in-JS, but has much better runtime performance.

To start, we'll work through the process of migrating a Box component.

Migrating Box Components

In the example below, we'll walk through the steps needed to migrate a simple Box component.

import { Box, BoxProps } from "@workday/canvas-kit-react/layout";

export const Container = ({ children, ...elemProps }: BoxProps) => {
  <Box
    as="section"
    padding="l"
    backgroundColor="frenchVanilla100"
    border="solid 1px"
    borderColor="soap500"
    borderRadius="m"
    color="blackPepper300"
    depth={1}
    {...elemProps}
  >
    {children}
  </Box>;
};
  1. Migrate style props to createStyles
  2. Update token values to use our new tokens
  3. Update Box component to a semantic HTML element

Migrate Style Props

First, we'll need to extract our style props to object styles and convert them to object styles using our createStyles function.

Before with Box

import { Box, BoxProps } from "@workday/canvas-kit-react/layout";

export const Container = ({ children, ...elemProps }: BoxProps) => {
  <Box
    as="section"
    padding="l"
    backgroundColor="frenchVanilla100"
    border="solid 1px"
    borderColor="soap500"
    borderRadius="m"
    color="blackPepper300"
    depth={1}
    {...elemProps}
  >
    {children}
  </Box>;
};

After with createStyles

import { Box, BoxProps } from "@workday/canvas-kit-react/layout";
import { createStyles } from "@workday/canvas-kit-styling";

const containerStyles = createStyles({
  padding: "l",
  backgroundColor: "frenchVanilla100",
  border: "solid 1px",
  borderColor: "soap500",
  borderRadius: "m",
  color: "blackPepper300",
  depth: 1,
});

export const Container = ({ children, ...elemProps }: BoxProps) => {
  return (
    // createStyles generates a string value, which we can pass to the className prop.
    <Box as="section" className={containerStyles} {...elemProps}>
      {children}
    </Box>
  );
};

Notice in the updated example our styles are defined outside the component. That's exactly what we want! If our styles were defined within the component they would be built at render time which is expensive for performance. Keeping styles outside the component allows them to be built at compile time instead.

Also notice we're passing containerStyles to the className prop. createStyles uses @emotion/css under the hood to generate a unique hashed CSS class name. We're off to a good start! Now it's time to move to step 2.

Update Token Values

Now that we've moved our styles into createStyles we need to move to step two: update the token values. Style props allowed you to use shorthand names for tokens, but those won't apply styles correctly when using createStyles. Also, those shorthand names reference our old tokens from @workday/canvas-kit-react/tokens. To do this, we'll need to import the new tokens package, @workday/canvas-tokens-web, and translate the old tokens to the new tokens based on their values.

We'll also make an important update by moving from base tokens to system tokens. System tokens are themeable, dynamic values with semantic names. This makes it easier to understand the token's purpose and adjust the value over time – less work for you down the road as styles evolve.

To update these values, we'll reference the tables in the Token Reference Tables doc. With those tables in mind, we can update our token values. Here's how we'll go about it:

  • Old space tokens will map to the new space tokens
  • Old border radius tokens will map to the new shape tokens
  • Old depth tokens will map to new depth tokens
  • Color tokens will need to be mapped contextually
    • find a new color token that matches the RGBA or hex value
    • if you can't find a system token that works, use a new base token instead.
  • Use px2rem to convert pixel values to rem values

Before with the old tokens:

import { createStyles } from "@workday/canvas-kit-styling";

const containerStyles = createStyles({
  padding: "l",
  backgroundColor: "frenchVanilla100",
  borderColor: "soap500",
  borderRadius: "m",
  color: "blackPepper300",
  depth: 1,
});

After with the new tokens:

import { createStyles, px2rem } from "@workday/canvas-kit-styling";
import { system } from "@workday/canvas-tokens-web";

const containerStyles = createStyles({
  padding: system.space.x8,
  // Because we are updating a background color, we're going to use our system `bg` color tokens.
  backgroundColor: system.color.bg.default,
  // We're using the `px2rem` function to convert our 1px value to a rem value.
  border: `solid ${px2rem(1)}`,
  // Because we are updating a border color, we're going to use our system `border` color tokens.
  borderColor: system.color.border.container,
  borderRadius: system.shape.x1,
  color: "blackPepper300",
  // Notice we updated `depth` to `boxShadow` below, as `depth` is not a valid CSS property.
  boxShadow: system.depth[1],
});

If you can't find a system token that's a good match, use a new base token instead. Here's an example:

Before with style props

import { Box } from "@workday/canvas-kit-react/layout";

const CustomComponent = (props) => {
  return <Box backgroundColor="berrySmoothie100" color="berrySmoothie600" {...props} />
}

After with createStyles

import { createStyles } from "@workday/canvas-kit-styling";
import { base } from "@workday/canvas-tokens-web";


const customStyles = createStyles({
  backgroundColor: base.berrySmoothie100,
  color: base.berrySmoothie600,
})

const CustomComponent = (props) => {
  return <div className={customStyles} {...props} />
}

Update To Semantic HTML Element

Now that we have our styles sorted, we're ready to remove Box entirely and replace it with a semantic HTML element. By default, Box renders a <div> element, but in this example, our as prop overrides that value and sets it to section.

Before with Box

import { Box, BoxProps } from "@workday/canvas-kit-react/layout";
import { createStyles } from "@workday/canvas-kit-styling";
import { system } from "@workday/canvas-tokens-web";

const containerStyles = createStyles({
  padding: system.space.x8,
  backgroundColor: system.color.bg.default,
  border: `solid ${px2rem(1)}`,
  borderColor: system.color.border.container,
  borderRadius: system.shape.x1,
  color: "blackPepper300",
  boxShadow: system.depth[1],
});

export const Container = ({ children, ...elemProps }: BoxProps) => {
  return (
    <Box as="section" className={containerStyles} {...elemProps}>
      {children}
    </Box>
  );
};

After with section

import { createStyles } from "@workday/canvas-kit-styling";
import { system } from "@workday/canvas-tokens-web";

const containerStyles = createStyles({
  padding: system.space.x8,
  backgroundColor: system.color.bg.default,
  border: `solid ${px2rem(1)}`,
  borderColor: system.color.border.container,
  borderRadius: system.shape.x1,
  color: "blackPepper300",
  boxShadow: system.depth[1],
});

export const Container = ({ children, ...elemProps }) => {
  return (
    <section className={containerStyles} {...elemProps}>
      {children}
    </section>
  );
};

Migrating Flex Components

Flex is very similar to Box, but it has special Flexbox props that make layout simple. We can refactor it with createStyles the samw way we refactored Box with minor alterations.

Before with Flex

import { Flex, FlexProps } from "@workday/canvas-kit-react/layout";

const ToastCard = ({ children, ...props }) => {
  return (
    <Flex
      position="absolute"
      flexDirection="column"
      top="30%"
      left="10%"
      padding="m"
    >
      <Flex.Item as="h2" flex={1}>
        Heading
      </Flex.Item>
      <Flex.Item as="p" flex={2}>
        {children}
      </Flex.Item>
    </Flex>
  );
};

After with createStyles

import { createStyles } from "@workday/canvas-kit-styling";
import { system } from "@workday/canvas-tokens-web";

const toastStyles = createStyles({
  // We always need to add `display: "flex"` or `display: "inline-flex" added to flex component styles to ensure they work correctly. By default, it uses `display: 'flex'.
  display: "flex",
  position: "absolute",
  flexDirection: "column",
  top: "30%",
  left: "10%",
  padding: system.space.x6,
});

// `Flex.Item` styles don't need `display: flex` added.
const headingStyles = createStyles({
  flex: 1,
});

const bodyStyles = createStyles({
  flex: 2,
});

const ToastCard = ({ children, ...props }) => {
  return (
    <div className={toastStyles} {...props}>
      <h2 className={headingStyles}>Heading</h2>
      <p className={bodyStyles}>{children}</p>
    </div>
  );
};

Follow-up Questions

Migrating from the style Prop

You can also migrate styles from the style prop to createStyles. Here's a good example:

Before with the style prop:

import {space, color} from '@workday/canvas-kit-react/common';

const CustomHeading = (props) => {
  return (
    <h2 style={{ color: color.blackPepper400, lineHeight: space.s, margin: 0 }} {...props} />
  )
}

After with createStyles:

import { createStyles } from "@workday/canvas-kit-styling";
import { system } from "@workday/canvas-tokens-web";

const headingStyles = createStyles({
  color: system.color.fg.strong,
  lineHeight: system.space.x4,
  margin: 0,
})

const CustomHeading = (props) => {
  return (
    <h2 className={headingStyles} {...props} />
  )
}

Merging Common Styles from Style Objects with createStyles

Sometimes you'll have common styles in an object that need to be shared across multiple elements or components. This can feel a bit unintuitive at first with createStyles, but here's a good example of how to solve it.

Before with Flex

import {Flex} from '@workday/canvas-kit-react/layout';

const commonStyles = {
  color: 'blackPepper500',
  minHeight: 'l',
  minWidth: '12px',
  padding: 'm',
}

const Section = () => {
  return (
    <Flex gap="s" flexDirection="column">
      <Flex.Item flex={1} backgroundColor="blueberry100" {...commonStyles}>Part One</Flex.Item>
      <Flex.Item flex={2} backgroundColor="sourLemon100"{...commonStyles}>Part Two</Flex.Item>
      <Flex.Item flex={1} backgroundColor="cinnamon100" {...commonStyles}>Part Three</Flex.Item>
      <Flex.Item flex={2} backgroundColor="greenApple100" {...commonStyles}>Part Four</Flex.Item>
    </Flex>
  )
}

After with createStyles:

import { createStyles } from "@workday/canvas-kit-styling";
import { base, system } from "@workday/canvas-tokens-web";

const sectionStyles = createStyles({
  display: 'flex',
  flexDirection: 'column',
  gap: system.space.x4,
});

const commonStyles = {
  color: system.color.fg.stronger,
  minHeight: system.space.x8,
  minWidth: system.space.x3,
  padding: system.space.x6,
}

const partOneStyles = createStyles({
  ...commonStyles,
  backgroundColor: base.blueberry100,
  flex: 1,
});

const partTwoStyles = createStyles({
  ...commonStyles,
  backgroundColor: base.sourLemon100,
  flex: 2,
});

const partThreeStyles = createStyles({
  ...commonStyles,
  backgroundColor: base.cinnamon100,
  flex: 1,
});

const partFourStyles = createStyles({
  ...commonStyles,
  backgroundColor: base.greenApple100,
  flex: 2,
});

const Section = () => {
  return (
    <div className={sectionStyles}>
      <div className={partOneStyles}>Part One</div>
      <div className={partTwoStyles}>Part Two</div>
      <div className={partThreeStyles}>Part Three</div>
      <div className={partFourStyles}>Part Four</div>
    </div>
  )
}

Migrating from the styled Function

Canvas Kit also provides a styled function in @workday/canvas-kit-react/common. It was effectively a wrapper around Emotion's styled function that also used rtl-css-js to support RTL (right-to-left) styles. But we no longer need this because modern browsers natively support CSS Logical Properties. Our styled function should be updated to use our new createStyles utility. Thankfully because both functions use object styles, the translation is fairly straightforward. The major difference is styled returns a styled React component, and createStyles returns a hashed CSS class name (a string) that can be applied to a component. Let's look at an example of how to update:

Note: Migrating to CSS Logical Properties

There are many CSS logical properties, but the most common ones you'll run into are listed below.

Property Name Logical Property Name
marginTop marginBlockStart
marginBottom marginBlockEnd
marginLeft marginInlineStart
marginRight marginInlineEnd
paddingTop paddingBlockStart
paddingBottom paddingBlockEnd
paddingLeft paddingInlineStart
paddingRight paddingInlineEnd
top insetBlockStart
bottom insetBlockEnd
left marginInlineStart
right marginInlineEnd

Before with Canvas Kit's styled function:

import {color, space, styled} from '@workday/canvas-kit-react/common';

const HeadingContainer = styled('div')({
  backgroundColor: color.frenchVanilla100,
  marginLeft: space.s,
  padding: space.m,
  border: `solid 1px ${color.soap500}`,
});

export const ProfileSection = ({ heading, children, ...props }) => {
  return (
    <section {...props}>
      <HeadingContainer>
        <h2>Profile Heading</h2>
      </HeadingContainer>
      {children}
    </section>
  )
}

After with Canvas Kit's createStyles function:

import { createStyles } from "@workday/canvas-kit-styling";
import { system } from "@workday/canvas-tokens-web";

const headingContainerStyles = createStyles({
  backgroundColor: system.color.bg.default,
  // Rememeber you'll need to convert `marginLeft` to `marginInlineBlock` for RTL support
  marginInlineBlock: system.space.x4,
  padding: system.space.x6,
  border: `solid 1px ${system.color.border.container}`,
});

export const ProfileSection = ({ heading, children, ...props }) => {
  return (
    <section {...props}>
      <div className={headingContainerStyles}>
        <h2>{heading}</h2>
      </div>
      {children}
    </section>
  )
}

Using the cs Prop

If you're styling a Canvas Kit component, you can use the cs prop instead of passing styles to className. Here's an example:

Before with Canvas Kit components using style props:

import { Text } from '@workday/canvas-kit-react/text';
import { Card } from '@workday/canvas-kit-react/card';

const CustomCard = (props) => {
  return (
    <Card backgroundColor="blackPepper400">
      <Text
        typeLevel="title.medium"
        color="frenchVanilla100"
        lineHeight="2rem"
        marginBottom="s"
      >
        Card Text
      </Text>
    </Card>
  )
}

After with the cs prop on Canvas Kit components.

import { Text } from '@workday/canvas-kit-react/text';
import { Card } from '@workday/canvas-kit-react/card';
import { createStyles } from "@workday/canvas-kit-styling";
import { system } from "@workday/canvas-tokens-web";

const cardContainerStyles = createStyles({
  backgroundColor: system.color.bg.contrast.default,
})

const cardTextStyles = createStyles({
  ...system.type.title.medium,
  color: system.color.fg.inverse,
  lineHeight: '2rem',
  marginBottom: system.space.x4,
})

const CustomCard = (props) => {
  return (
    <Card cs={cardContainerStyles}>
      <Text cs={cardTextStyles}>
        Card Text
      </Text>
    </Card>
  )
}

Other Questions

  • What if I need dynamic styles?
  • What if I want my components styles to be extensible or composable?

Token Reference Tables

Overview

The following tables are a helpful reference for mapping our old tokens and values to our new system tokens.

Space Tokens

Our system space tokens map directly to our old base tokens. But instead of using t-shirt size names, we're now using a multiplier scale. We use a base-4 space scale meaning the default base value for our scale is 0.25rem (4px). So when you see system.space.x2, you can reason the value should be 0.5rem (8px). However, translating between t-shirt size names and multiplier names is not intuitive. To help with this translation, refer to the table below.

With this table you can see the old space.s (or s as a shorthand name) token maps to the new system.space.x4 token.

Old Name Old Shorthand Name New Name New CSS Variable New Value New Value (px) New Value (rem)
space.zero zero system.space.zero --cnvs-sys-space-zero 0 0px 0rem
space.xxxs xxxs system.space.x1 --cnvs-sys-space-x1 calc(0.25rem * 1) 4px 0.25rem
space.xxs xxs system.space.x2 --cnvs-sys-space-x2 calc(0.25rem * 2) 8px 0.5rem
space.xs xs system.space.x3 --cnvs-sys-space-x3 calc(0.25rem * 3) 12px 0.75rem
space.s s system.space.x4 --cnvs-sys-space-x4 calc(0.25rem * 4) 16px 1rem
space.m m system.space.x6 --cnvs-sys-space-x6 calc(0.25rem * 6) 24px 1.5rem
space.l l system.space.x8 --cnvs-sys-space-x8 calc(0.25rem * 8) 32px 2rem
space.xl xl system.space.x10 --cnvs-sys-space-x10 calc(0.25rem * 10) 40px 2.5rem
space.xxl xxl system.space.x16 --cnvs-sys-space-x16 calc(0.25rem * 16) 64px 4rem
space.xxxl xxxl system.space.x20 --cnvs-sys-space-x20 calc(0.25rem * 20) 80px 5rem

Depth Tokens

Our depth tokens map directly to our new system depth tokens. The only real change is we've added a net-new depth.none token which is useful for removing shadows.

Referencing the table below, you can see the old depth[2] (or 2) token maps to the new system.depth[2] token.

Old Name Old Shorthand Name New Name New CSS Variable
depth.none none n/a n/a
depth[1] 1 system.depth[1] --cnvs-system-depth-1
depth[2] 2 system.depth[2] --cnvs-system-depth-2
depth[3] 3 system.depth[3] --cnvs-system-depth-3
depth[4] 4 system.depth[4] --cnvs-system-depth-4
depth[5] 5 system.depth[5] --cnvs-system-depth-5
depth[6] 6 system.depth[6] --cnvs-system-depth-6

Border Radius Tokens

Our old border radius tokens map directly to our new shape tokens. However, again, we're mostly moving from t-shirt size scales to multiplier scales.

Old Name Old Shorthand Name New Name New CSS Variable New Value New Value (px) New Value (rem)
borderRadius.zero zero system.shape.zero --cnvs-sys-shape-zero 0rem 0px 0rem
borderRadius.s s system.shape.half --cnvs-sys-shape-half calc(0.25rem * 0.5) 2px 0.125rem
borderRadius.m m system.shape.x1 --cnvs-sys-shape-x1 0.25rem 4px 0.25rem
borderRadius.l l system.shape.x2 --cnvs-sys-shape-x2 calc(0.25rem * 2) 8px 0.5rem
borderRadius.circle circle system.shape.round --cnvs-sys-shape-round calc(0.25rem * 250) 1000px 62.5rem

Color Tokens

Mapping our old color tokens to our new system color tokens is bit more complex. You'll need to understand the context of where the color token is being used and then reference the value of the old color token to make sure it matches with the new color token. Here are some helpful tips to guide your mapping:

  • Use background color tokens for background colors
  • Use foreground color tokens for text, icons, and similar color properties
  • Use border color tokens for borders and outlines
    • Use border input color tokens for input borders
  • Use shadow color tokens for box shadows
  • Use static color tokens when you want the colors to always stay the same
    • This is particularly helpful for components such as status indicators
  • If you can't find a new system color token that matches the value of your old base token, you should use a new base token instead
    • berrySmoothie400 becomes base.berrySmoothie400.
    • Be sure to import the new base tokens as well if you aren't already e.g. import {base} from '@workday/canvas-tokens-web';
  • If you have any raw hex or rgba color values, you should update it to use a new system token if there's a match.
    • Any non-matching hex or rgba color values is likely a copy / paste error, and you should assess which new token is a closest match to that color.

Old Base Color Tokens

Below are our old base color tokens with their hex and rgba values. You can use these values to double-check old color tokens are correctly mapped to a new system token with the same value.

Token Name Value (hex) Value (rgba)
cinnamon100 #ffefee rgba(255, 239, 238, 1)
cinnamon200 #fcc9c5 rgba(252, 201, 197, 1)
cinnamon300 #ff867d rgba(255, 134, 125, 1)
cinnamon400 #ff5347 rgba(255, 83, 71, 1)
cinnamon500 #de2e21 rgba(222, 46, 33, 1)
cinnamon600 #a31b12 rgba(163, 27, 18, 1)
peach100 #fff3f0 rgba(255, 243, 240, 1)
peach200 #ffc2b3 rgba(255, 194, 179, 1)
peach300 #ff957a rgba(255, 149, 122, 1)
peach400 #ff643d rgba(255, 100, 61, 1)
peach500 #de4721 rgba(222, 71, 33, 1)
peach600 #b53413 rgba(181, 52, 19, 1)
chiliMango100 #ffe6d9 rgba(255, 230, 217, 1)
chiliMango200 #ffc7ab rgba(255, 199, 171, 1)
chiliMango300 #ff9b69 rgba(255, 155, 105, 1)
chiliMango400 #ff671b rgba(255, 103, 27, 1)
chiliMango500 #e04b00 rgba(224, 75, 0, 1)
chiliMango600 #a33600 rgba(163, 54, 0, 1)
cantaloupe100 #ffeed9 rgba(255, 238, 217, 1)
cantaloupe200 #fcd49f rgba(252, 212, 159, 1)
cantaloupe300 #ffbc63 rgba(255, 188, 99, 1)
cantaloupe400 #ffa126 rgba(255, 161, 38, 1)
cantaloupe500 #f38b00 rgba(243, 139, 0, 1)
cantaloupe600 #c06c00 rgba(192, 108, 0, 1)
sourLemon100 #fff9e6 rgba(255, 249, 230, 1)
sourLemon200 #ffecab rgba(255, 236, 171, 1)
sourLemon300 #ffda61 rgba(255, 218, 97, 1)
sourLemon400 #ffc629 rgba(255, 198, 41, 1)
sourLemon500 #ebb400 rgba(235, 180, 0, 1)
sourLemon600 #bd9100 rgba(189, 145, 0, 1)
juicyPear100 #f7fae6 rgba(247, 250, 230, 1)
juicyPear200 #e2f391 rgba(226, 243, 145, 1)
juicyPear300 #c4de40 rgba(196, 222, 64, 1)
juicyPear400 #a8c224 rgba(168, 194, 36, 1)
juicyPear500 #8ea618 rgba(142, 166, 24, 1)
juicyPear600 #687818 rgba(104, 120, 24, 1)
kiwi100 #ecfcd7 rgba(236, 252, 215, 1)
kiwi200 #caf593 rgba(202, 245, 147, 1)
kiwi300 #a7e05c rgba(167, 224, 92, 1)
kiwi400 #77bc1f rgba(119, 188, 31, 1)
kiwi500 #609915 rgba(96, 153, 21, 1)
kiwi600 #537824 rgba(83, 120, 36, 1)
greenApple100 #ebfff0 rgba(235, 255, 240, 1)
greenApple200 #acf5be rgba(172, 245, 190, 1)
greenApple300 #5fe380 rgba(95, 227, 128, 1)
greenApple400 #43c463 rgba(67, 196, 99, 1)
greenApple500 #319c4c rgba(49, 156, 76, 1)
greenApple600 #217a37 rgba(33, 122, 55, 1)
watermelon100 #ebfdf8 rgba(235, 253, 248, 1)
watermelon200 #b7edde rgba(183, 237, 222, 1)
watermelon300 #65ccaf rgba(101, 204, 175, 1)
watermelon400 #12a67c rgba(18, 166, 124, 1)
watermelon500 #0c7a5b rgba(12, 122, 91, 1)
watermelon600 #00573e rgba(0, 87, 62, 1)
jewel100 #ebfdff rgba(235, 253, 255, 1)
jewel200 #acecf3 rgba(172, 236, 243, 1)
jewel300 #44c8d7 rgba(68, 200, 215, 1)
jewel400 #1ea4b3 rgba(30, 164, 179, 1)
jewel500 #1a818c rgba(26, 129, 140, 1)
jewel600 #156973 rgba(21, 105, 115, 1)
toothpaste100 #d7f1fc rgba(215, 241, 252, 1)
toothpaste200 #99e0ff rgba(153, 224, 255, 1)
toothpaste300 #40b4e5 rgba(64, 180, 229, 1)
toothpaste400 #1894c9 rgba(24, 148, 201, 1)
toothpaste500 #0271a1 rgba(2, 113, 161, 1)
toothpaste600 #005b82 rgba(0, 91, 130, 1)
blueberry100 #d7eafc rgba(215, 234, 252, 1)
blueberry200 #a6d2ff rgba(166, 210, 255, 1)
blueberry300 #40a0ff rgba(64, 160, 255, 1)
blueberry400 #0875e1 rgba(8, 117, 225, 1)
blueberry500 #005cb9 rgba(0, 92, 185, 1)
blueberry600 #004387 rgba(0, 67, 135, 1)
plum100 #e6f1ff rgba(230, 241, 255, 1)
plum200 #a6cdff rgba(166, 205, 255, 1)
plum300 #529bfa rgba(82, 155, 250, 1)
plum400 #3881e1 rgba(56, 129, 225, 1)
plum500 #3166ab rgba(49, 102, 171, 1)
plum600 #264a7a rgba(38, 74, 122, 1)
berrySmoothie100 #e8edff rgba(232, 237, 255, 1)
berrySmoothie200 #c2cfff rgba(194, 207, 255, 1)
berrySmoothie300 #7891ff rgba(120, 145, 255, 1)
berrySmoothie400 #5e77e6 rgba(94, 119, 230, 1)
berrySmoothie500 #4b5eb3 rgba(75, 94, 179, 1)
berrySmoothie600 #3b4987 rgba(59, 73, 135, 1)
blackberry100 #f0f0ff rgba(240, 240, 255, 1)
blackberry200 #c3c2ff rgba(195, 194, 255, 1)
blackberry300 #8483e6 rgba(132, 131, 230, 1)
blackberry400 #5c59e6 rgba(92, 89, 230, 1)
blackberry500 #413fcc rgba(65, 63, 204, 1)
blackberry600 #2e2d91 rgba(46, 45, 145, 1)
islandPunch100 #f5f0ff rgba(245, 240, 255, 1)
islandPunch200 #d2befa rgba(210, 190, 250, 1)
islandPunch300 #a88ae6 rgba(168, 138, 230, 1)
islandPunch400 #8660d1 rgba(134, 96, 209, 1)
islandPunch500 #6345a1 rgba(99, 69, 161, 1)
islandPunch600 #503882 rgba(80, 56, 130, 1)
grapeSoda100 #feebff rgba(254, 235, 255, 1)
grapeSoda200 #fac0ff rgba(250, 192, 255, 1)
grapeSoda300 #de8ae6 rgba(222, 138, 230, 1)
grapeSoda400 #c860d1 rgba(200, 96, 209, 1)
grapeSoda500 #97499e rgba(151, 73, 158, 1)
grapeSoda600 #7c3882 rgba(124, 56, 130, 1)
pomegranate100 #ffebf3 rgba(255, 235, 243, 1)
pomegranate200 #ffbdd6 rgba(255, 189, 214, 1)
pomegranate300 #ff5c9a rgba(255, 92, 154, 1)
pomegranate400 #f31167 rgba(243, 17, 103, 1)
pomegranate500 #c70550 rgba(199, 5, 80, 1)
pomegranate600 #99003a rgba(153, 0, 58, 1)
fruitPunch100 #ffeeee rgba(255, 238, 238, 1)
fruitPunch200 #ffbdbd rgba(255, 189, 189, 1)
fruitPunch300 #ff7e7e rgba(255, 126, 126, 1)
fruitPunch400 #ff4c4c rgba(255, 76, 76, 1)
fruitPunch500 #e12f2f rgba(225, 47, 47, 1)
fruitPunch600 #b82828 rgba(184, 40, 40, 1)
rootBeer100 #faf3f0 rgba(250, 243, 240, 1)
rootBeer200 #ebd7cf rgba(235, 215, 207, 1)
rootBeer300 #dcbbad rgba(220, 187, 173, 1)
rootBeer400 #ba9a8c rgba(186, 154, 140, 1)
rootBeer500 #8c7266 rgba(140, 114, 102, 1)
rootBeer600 #664d42 rgba(102, 77, 66, 1)
toastedMarshmallow100 #fdf6e6 rgba(253, 246, 230, 1)
toastedMarshmallow200 #ebd6a9 rgba(235, 214, 169, 1)
toastedMarshmallow300 #e6bf6c rgba(230, 191, 108, 1)
toastedMarshmallow400 #cc9e3b rgba(204, 158, 59, 1)
toastedMarshmallow500 #b37f10 rgba(179, 127, 16, 1)
toastedMarshmallow600 #8c6000 rgba(140, 96, 0, 1)
coconut100 #f0eeee rgba(240, 238, 238, 1)
coconut200 #e3dfdf rgba(227, 223, 223, 1)
coconut300 #d1cbcc rgba(209, 203, 204, 1)
coconut400 #b3acac rgba(179, 172, 172, 1)
coconut500 #9e9595 rgba(158, 149, 149, 1)
coconut600 #8f8687 rgba(143, 134, 135, 1)
cappuccino100 #7a7374 rgba(122, 115, 116, 1)
cappuccino200 #706869 rgba(112, 104, 105, 1)
cappuccino300 #5e5757 rgba(94, 87, 87, 1)
cappuccino400 #4a4242 rgba(74, 66, 66, 1)
cappuccino500 #352f2f rgba(53, 47, 47, 1)
cappuccino600 #231f20 rgba(35, 31, 32, 1)
soap100 #f6f7f8 rgba(246, 247, 248, 1)
soap200 #f0f1f2 rgba(240, 241, 242, 1)
soap300 #e8ebed rgba(232, 235, 237, 1)
soap400 #dfe2e6 rgba(223, 226, 230, 1)
soap500 #ced3d9 rgba(206, 211, 217, 1)
soap600 #b9c0c7 rgba(185, 192, 199, 1)
licorice100 #a1aab3 rgba(161, 170, 179, 1)
licorice200 #7b858f rgba(123, 133, 143, 1)
licorice300 #5e6a75 rgba(94, 106, 117, 1)
licorice400 #4a5561 rgba(74, 85, 97, 1)
licorice500 #333d47 rgba(51, 61, 71, 1)
licorice600 #1f262e rgba(31, 38, 46, 1)
frenchVanilla100 #ffffff rgba(255, 255, 255, 1)
frenchVanilla200 #ebebeb rgba(235, 235, 235, 1)
frenchVanilla300 #d4d4d4 rgba(212, 212, 212, 1)
frenchVanilla400 #bdbdbd rgba(189, 189, 189, 1)
frenchVanilla500 #a6a6a6 rgba(166, 166, 166, 1)
frenchVanilla600 #8f8f8f rgba(143, 143, 143, 1)
blackPepper100 #787878 rgba(120, 120, 120, 1)
blackPepper200 #616161 rgba(97, 97, 97, 1)
blackPepper300 #494949 rgba(73, 73, 73, 1)
blackPepper400 #333333 rgba(51, 51, 51, 1)
blackPepper500 #1e1e1e rgba(30, 30, 30, 1)
blackPepper600 #000000 rgba(0, 0, 0, 1)

New Color Tokens

New Background Default Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.bg.default --cnvs-sys-color-bg-default rgba(255,255,255,1) #FFFFFF
system.color.bg.transparent --cnvs-sys-color-bg-transparent rgba(255,255,255,0) #FFFFFF00
system.color.bg.translucent --cnvs-sys-color-bg-translucent rgba(0,0,0,.84) #000000D6
system.color.bg.overlay --cnvs-sys-color-bg-overlay rgba(0,0,0,.64) #000000A3

New Background Alternate Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.bg.alt.softer --cnvs-sys-color-bg-alt-softer rgba(246,247,248,1) #F6F7F8
system.color.bg.alt.soft --cnvs-sys-color-bg-alt-soft rgba(240,241,242,1) #F0F1F2
system.color.bg.alt.default --cnvs-sys-color-bg-alt-default rgba(232,235,237,1) #E8EBED
system.color.bg.alt.strong --cnvs-sys-color-bg-alt-strong rgba(223,226,230,1) #DFE2E6
system.color.bg.alt.stronger --cnvs-sys-color-bg-alt-stronger rgba(206,211,217,1) #CED3D9

New Background Muted Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.bg.muted.softer --cnvs-sys-color-bg-muted-softer rgba(161,170,179,1) #A1AAB3
system.color.bg.muted.soft --cnvs-sys-color-bg-muted-soft rgba(123,133,143,1) #7B858F
system.color.bg.muted.default --cnvs-sys-color-bg-muted-default rgba(94,106,117,1) #5E6A75
system.color.bg.muted.strong --cnvs-sys-color-bg-muted-strong rgba(51,61,71,1) #333D47

New Background Contrast Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.bg.contrast.default --cnvs-sys-color-bg-contrast-default rgba(51,51,51,1) #333333
system.color.bg.contrast.strong --cnvs-sys-color-bg-contrast-strong rgba(30,30,30,1) #1E1E1E

New Background Status Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.bg.positive.softer --cnvs-sys-color-bg-positive-softer rgba(235,255,240,1) #EBFFF0
system.color.bg.positive.default --cnvs-sys-color-bg-positive-default rgba(67,196,99,1) #43C463
system.color.bg.positive.strong --cnvs-sys-color-bg-positive-strong rgba(49,156,76,1) #319C4C
system.color.bg.positive.stronger --cnvs-sys-color-bg-positive-stronger rgba(33,122,55,1) #217A37
system.color.bg.caution.softer --cnvs-sys-color-bg-caution-softer rgba(255,238,217,1) #FFEED9
system.color.bg.caution.default --cnvs-sys-color-bg-caution-default rgba(255,161,38,1) #FFA126
system.color.bg.caution.strong --cnvs-sys-color-bg-caution-strong rgba(243,139,0,1) #F38B00
system.color.bg.caution.stronger --cnvs-sys-color-bg-caution-stronger rgba(192,108,0,1) #C06C00
system.color.bg.critical.softer --cnvs-sys-color-bg-critical-softer rgba(255,239,238,1) #FFEFEE
system.color.bg.critical.default --cnvs-sys-color-bg-critical-default rgba(222,46,33,1) #DE2E21
system.color.bg.critical.strong --cnvs-sys-color-bg-critical-strong rgba(163,27,18,1) #A31B12
system.color.bg.critical.stronger --cnvs-sys-color-bg-critical-stronger rgba(128,22,14,1) #80160E

New Foreground Default Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.fg.default --cnvs-sys-color-fg-default rgba(73,73,73,1) #494949
system.color.fg.strong --cnvs-sys-color-fg-strong rgba(51,51,51,1) #333333
system.color.fg.stronger --cnvs-sys-color-fg-stronger rgba(30,30,30,1) #1E1E1E
system.color.fg.disabled --cnvs-sys-color-fg-disabled rgba(161,170,179,1) #A1AAB3
system.color.fg.inverse --cnvs-sys-color-fg-inverse rgba(255,255,255,1) #FFFFFF

New Foreground Status Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.fg.caution.default --cnvs-sys-color-fg-caution-default rgba(51,51,51,1) #333333
system.color.fg.caution.strong --cnvs-sys-color-fg-caution-strong rgba(30,30,30,1) #1E1E1E
system.color.fg.critical.default --cnvs-sys-color-fg-critical-default rgba(222,46,33,1) #DE2E21

New Border Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.border.primary --cnvs-sys-color-border-primary-default rgba(8,117,225,1) #0875E1
system.color.border.container --cnvs-sys-color-border-container rgba(206,211,217,1) #CED3D9
system.color.border.divider --cnvs-sys-color-border-divider rgba(223,226,230,1) #DFE2E6
system.color.border.inverse --cnvs-sys-color-border-inverse rgba(255,255,255,1) #FFFFFF
system.color.border.transparent --cnvs-sys-color-border-transparent rgba(255,255,255,0) #FFFFFF00

New Border Contrast Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.border.contrast.default --cnvs-sys-color-border-contrast-default rgba(51,51,51,1) #333333
system.color.border.contrast.strong --cnvs-sys-color-border-contrast-strong rgba(30,30,30,1) #1E1E1E

New Border Input Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.border.input.default --cnvs-sys-color-border-input-default rgba(123,133,143,1) #7B858F
system.color.border.input.strong --cnvs-sys-color-border-input-strong rgba(51,61,71,1) #333D47
system.color.border.input.disabled --cnvs-sys-color-border-input-disabled rgba(161,170,179,1) #A1AAB3
system.color.border.input.inverse --cnvs-sys-color-border-input-inverse rgba(232,235,237,1) #E8EBED

New Border Status Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.border.caution.default --cnvs-sys-color-border-caution-default rgba(255,161,38,1) #FFA126
system.color.border.caution.strong --cnvs-sys-color-border-caution-strong rgba(192,108,0,1) #C06C00
system.color.border.critical.default --cnvs-sys-color-border-critical-default rgba(222,46,33,1) #DE2E21

New Shadow Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.shadow.1 --cnvs-sys-color-shadow-1 rgba(31,38,46,0.12) #1f262e1f
system.color.shadow.2 --cnvs-sys-color-shadow-2 rgba(31,38,46,0.08) #1f262e14
system.color.shadow.default --cnvs-sys-color-shadow-default rgba(31,38,46,1) #1f262e

New Static Color Tokens

Token Name CSS Variable Value (rgba) Value (hex)
system.color.static.blue.soft --cnvs-sys-color-static-blue-soft rgba(215,234,252,1) #D7EAFC
system.color.static.blue.default --cnvs-sys-color-static-blue-default rgba(8,117,225,1) #0875E1
system.color.static.blue.strong --cnvs-sys-color-static-blue-strong rgba(0,92,185,1) #005CB9
system.color.static.gold.stronger --cnvs-sys-color-static-gold-stronger rgba(140,96,0,1) #8C6000
system.color.static.green.soft --cnvs-sys-color-static-green-soft rgba(235,255,240,1) #EBFFF0
system.color.static.green.default --cnvs-sys-color-static-green-default rgba(67,196,99,1) #43C463
system.color.static.green.strong --cnvs-sys-color-static-green-strong rgba(33,122,55,1) #217A37
system.color.static.red.soft --cnvs-sys-color-static-red-soft rgba(255,239,238,1) #FFEFEE
system.color.static.red.default --cnvs-sys-color-static-red-default rgba(222,46,33,1) #DE2E21
system.color.static.red.strong --cnvs-sys-color-static-red-strong rgba(163,27,18,1) #A31B12
system.color.static.orange.soft --cnvs-sys-color-static-orange-soft rgba(255,238,217,1) #FFEED9
system.color.static.orange.default --cnvs-sys-color-static-orange-default rgba(255,161,38,1) #FFA126
system.color.static.orange.strong --cnvs-sys-color-static-orange-strong rgba(192,108,0,1) #C06C00
system.color.static.gray.soft --cnvs-sys-color-static-gray-soft rgba(232,235,237,1) #E8EBED
system.color.static.gray.default --cnvs-sys-color-static-gray-default rgba(94,106,117,1) #5E6A75
system.color.static.gray.strong --cnvs-sys-color-static-gray-strong rgba(74,85,97,1) #4A5561
system.color.static.gray.stronger --cnvs-sys-color-static-gray-stronger rgba(51,61,71,1) #333D47
system.color.static.white --cnvs-sys-color-static-white rgba(255,255,255,1) #FFFFFF
system.color.static.black --cnvs-sys-color-static-black rgba(0,0,0,1) #000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment