File tree Expand file tree Collapse file tree 4 files changed +39
-39
lines changed
Expand file tree Collapse file tree 4 files changed +39
-39
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,11 @@ const run = async () => {
2020 theme: {
2121 screens: tokens.screens,
2222 spacing: tokens.spacing,
23- fontFamily: tokens.font.family,
24- fontSize: tokens.fontSize,
25- colors: tokens.colors,
2623 gap: ({ theme }) => ({
27- ...theme('spacing'),
28- ...tokens.gap
24+ ...theme('spacing')
2925 }),
3026 space: ({ theme }) => ({
31- ...theme('spacing'),
32- ...tokens.space
27+ ...theme('spacing')
3328 })
3429 }
3530 };
Original file line number Diff line number Diff line change @@ -11,12 +11,24 @@ const generateClasses = require('./scripts/scss-typography-generator');
1111const generateScaling = require ( './scripts/scss-scaling-generator' ) ;
1212
1313const modifyTailwind = ( dictionary ) => {
14- const colors = JSON . stringify ( dictionary . colors ) . replace (
15- / e n a b l e d / g,
16- 'DEFAULT'
17- ) ;
18- dictionary . colors = JSON . parse ( colors ) ;
19- delete dictionary . typography ;
14+ for ( const token of [
15+ 'colors' ,
16+ 'elevation' ,
17+ 'font' ,
18+ 'transition' ,
19+ 'sizing' ,
20+ 'typography'
21+ ] ) {
22+ if ( dictionary [ token ] ) {
23+ delete dictionary [ token ] ;
24+ }
25+ }
26+
27+ for ( const spacing of [ 'responsive' , 'fixed' ] ) {
28+ if ( dictionary . spacing ?. [ spacing ] ) {
29+ delete dictionary . spacing [ spacing ] ;
30+ }
31+ }
2032} ;
2133
2234StyleDictionary . registerFormat ( {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
2- "gap" : {
3- "xs" : " 8px" ,
4- "sm" : " 12px" ,
5- "md" : " 12px" ,
6- "lg" : " 20px" ,
7- "xl" : " 20px"
8- },
9- "space" : {
10- "xs" : " 8px" ,
11- "sm" : " 12px" ,
12- "md" : " 12px" ,
13- "lg" : " 20px" ,
14- "xl" : " 20px"
2+ "spacing" : {
3+ "fix-3xs" : " var(--db-spacing-fixed-3xs)" ,
4+ "fix-2xs" : " var(--db-spacing-fixed-2xs)" ,
5+ "fix-xs" : " var(--db-spacing-fixed-xs)" ,
6+ "fix-sm" : " var(--db-spacing-fixed-sm)" ,
7+ "fix-md" : " var(--db-spacing-fixed-md)" ,
8+ "fix-lg" : " var(--db-spacing-fixed-lg)" ,
9+ "fix-xl" : " var(--db-spacing-fixed-xl)" ,
10+
11+ "res-xs" : " var(--db-spacing-responsive-xs)" ,
12+ "res-sm" : " var(--db-spacing-responsive-sm)" ,
13+ "res-md" : " var(--db-spacing-responsive-md)" ,
14+ "res-lg" : " var(--db-spacing-responsive-lg)" ,
15+ "res-xl" : " var(--db-spacing-responsive-xl)" ,
16+
17+ "siz-xs" : " var(--db-sizing-xs)" ,
18+ "siz-sm" : " var(--db-sizing-sm)" ,
19+ "siz-md" : " var(--db-sizing-md)" ,
20+ "siz-lg" : " var(---db-sizing-lg)"
1521 }
1622}
You can’t perform that action at this time.
0 commit comments