bitcrowd / bitstyles

A complete design system, with base styles and components, built in Sass using CSS variables
https://bitcrowd.github.io/bitstyles
ISC License
16 stars 0 forks source link

[#693] Export design tokens to JS #706

Closed planktonic closed 1 year ago

planktonic commented 2 years ago

Fixes #693

Changes

Example

import breakpoints from '../exports/_breakpoints.scss';

console.log(breakpoints['s']); // 'screen and (max-width:29.9375em)'
console.log(breakpoints['m']); // 'screen and (min-width:30em)'
console.log(breakpoints['l']); // 'screen and (min-width:55em)'
// …
import colorPalette from '../exports/_color-palette.scss';

console.log(colorPalette['brand-1.lighter']); // '#f4f2ff'
console.log(colorPalette['brand-1.light']); // '#c8bfff'
console.log(colorPalette['brand-1.base']); // '#644dff'
// …

Checks

Delete if not applicable: