Skip to content

Commit

Permalink
feat: CSS property definitions in Style Dictionary JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Jul 25, 2021
1 parent 48dcf1c commit 870bab2
Show file tree
Hide file tree
Showing 38 changed files with 2,114 additions and 232 deletions.
7 changes: 6 additions & 1 deletion components/article/block.style-dictionary.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"utrecht": {
"article": {
"max-inline-size": {}
"max-inline-size": {
"css": {
"syntax": "<length>",
"inherits": true
}
}
}
}
}
14 changes: 12 additions & 2 deletions components/badge-data/block.style-dictionary.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"utrecht": {
"badge-data": {
"letter-spacing": {},
"text-transform": {}
"letter-spacing": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"text-transform": {
"css": {
"syntax": "inherit | uppercase",
"inherits": true
}
}
}
}
}
14 changes: 12 additions & 2 deletions components/badge-status/block.style-dictionary.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"utrecht": {
"badge-status": {
"letter-spacing": {},
"text-transform": {}
"letter-spacing": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"text-transform": {
"css": {
"syntax": "inherit | uppercase",
"inherits": true
}
}
}
}
}
44 changes: 37 additions & 7 deletions components/badge/block.style-dictionary.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,52 @@
"utrecht": {
"badge": {
"background-color": {
"comment": "Default background color for badge components"
"comment": "Default background color for badge components",
"css": {
"syntax": "<color>",
"inherits": true
}
},
"border-radius": {
"comment": "Default corner radius for badge components"
"comment": "Default corner radius for badge components",
"css": {
"syntax": "<length-percentage>",
"inherits": true
}
},
"color": {
"comment": "Default text color for badge components"
"comment": "Default text color for badge components",
"css": {
"syntax": "<color>",
"inherits": true
}
},
"font-weight": {
"css": {
"syntax": "<number>",
"inherits": true
}
},
"font-weight": {},
"padding-block": {
"comment": "Default block padding for badge components"
"comment": "Default block padding for badge components",
"css": {
"syntax": "<length>",
"inherits": true
}
},
"padding-inline": {
"comment": "Default inline padding color for badge components"
"comment": "Default inline padding color for badge components",
"css": {
"syntax": "<length>",
"inherits": true
}
},
"text-transform": {}
"text-transform": {
"css": {
"syntax": "inherit | uppercase",
"inherits": true
}
}
}
}
}
42 changes: 36 additions & 6 deletions components/blockquote/block.style-dictionary.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,42 @@
{
"utrecht": {
"blockquote": {
"margin-inline-start": {},
"margin-inline-end": {},
"margin-inline-block-start": {},
"margin-inline-block-end": {},
"font-size": {},
"font-family": {}
"margin-inline-start": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"margin-inline-end": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"margin-inline-block-start": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"margin-inline-block-end": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"font-size": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"font-family": {
"css": {
"syntax": "*",
"inherits": true
}
}
}
}
}
28 changes: 24 additions & 4 deletions components/blockquote/element.style-dictionary.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,32 @@
"utrecht": {
"blockquote": {
"attribution": {
"color": {},
"font-size": {}
"color": {
"css": {
"syntax": "<color>",
"inherits": true
}
},
"font-size": {
"css": {
"syntax": "<length>",
"inherits": true
}
}
},
"content": {
"color": {},
"font-size": {}
"color": {
"css": {
"syntax": "<color>",
"inherits": true
}
},
"font-size": {
"css": {
"syntax": "<length>",
"inherits": true
}
}
}
}
}
Expand Down
77 changes: 66 additions & 11 deletions components/button/block.style-dictionary.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,72 @@
{
"utrecht": {
"button": {
"border-width": {},
"focus-transform-scale": {},
"font-size": {},
"margin-block-start": {},
"margin-block-end": {},
"margin-inline-start": {},
"margin-inline-end": {},
"padding-block-start": {},
"padding-block-end": {},
"padding-inline-start": {},
"padding-inline-end": {}
"border-width": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"focus-transform-scale": {
"css": {
"syntax": "<number>",
"inherits": true
}
},
"font-size": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"margin-block-start": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"margin-block-end": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"margin-inline-start": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"margin-inline-end": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"padding-block-start": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"padding-block-end": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"padding-inline-start": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"padding-inline-end": {
"css": {
"syntax": "<length>",
"inherits": true
}
}
}
}
}
35 changes: 30 additions & 5 deletions components/button/modifier.style-dictionary.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,38 @@
"utrecht": {
"button": {
"disabled": {
"color": {},
"hover-background-color": {}
"color": {
"css": {
"syntax": "<color>",
"inherits": true
}
},
"hover-background-color": {
"css": {
"syntax": "<color>",
"inherits": true
}
}
},
"primary-action": {
"background-color": {},
"color": {},
"hover-background-color": {}
"background-color": {
"css": {
"syntax": "<color>",
"inherits": true
}
},
"color": {
"css": {
"syntax": "<color>",
"inherits": true
}
},
"hover-background-color": {
"css": {
"syntax": "<color>",
"inherits": true
}
}
}
}
}
Expand Down
35 changes: 30 additions & 5 deletions components/document/block.style-dictionary.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
{
"utrecht": {
"document": {
"background-color": {},
"color": {},
"font-family": {},
"font-size": {},
"line-height": {}
"background-color": {
"css": {
"syntax": "<color>",
"inherits": true
}
},
"color": {
"css": {
"syntax": "<color>",
"inherits": true
}
},
"font-family": {
"css": {
"syntax": "*",
"inherits": true
}
},
"font-size": {
"css": {
"syntax": "<length>",
"inherits": true
}
},
"line-height": {
"css": {
"syntax": "<length>",
"inherits": true
}
}
}
}
}
14 changes: 12 additions & 2 deletions components/emphasis/modifier.style-dictionary.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@
"utrecht": {
"emphasis": {
"stressed": {
"font-style": {}
"font-style": {
"css": {
"syntax": "inherit | italic | normal",
"inherits": true
}
}
},
"strong": {
"font-weight": {}
"font-weight": {
"css": {
"syntax": "<number>",
"inherits": true
}
}
}
}
}
Expand Down
Loading

0 comments on commit 870bab2

Please sign in to comment.