Core Tokens uses Style Dictionary as the build system that allows us to define styles once, in a way for any platform or language to consume.
CSS, SCSS, Javascript, typescript.
npm install @anthane/core-tokens
Accessing all of the available token groups
import { colors } from '@anthane/core-tokens';
console.log(colors.light.ActionErrorDefault);
Importing all of the css variables. CSS variables are prefixed with --core
to signal that these variables are core variables.
@use '@anthane/core-tokens/scss/index' as *;
div {
background: var(--core-color-background);
}