Last active
January 15, 2022 21:17
-
-
Save natemoo-re/95fba60a7f01907a655bfa32bd4cfe73 to your computer and use it in GitHub Desktop.
Token Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$id": "https://tokencss.com/schema.json", | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "Token Config", | |
"type": "object", | |
"properties": { | |
"color": {} | |
}, | |
"$defs": { | |
"values": { | |
"color": { | |
"$id": "#/$defs/values/color", | |
"description": "The value must be a string containing a hex triplet/quartet including the preceding # character", | |
"examples": ["#FFF"], | |
"title": "The color value", | |
"pattern": "^#[0-9a-fA-F]{3,4,6,8}", | |
"type": "string" | |
} | |
}, | |
"tokens": { | |
"color": { | |
"$id": "#/$defs/tokens/color", | |
"type": "object", | |
"required": ["value"], | |
"properties": { | |
"type": { "enum": "color", "default": "color" }, | |
"value": { "$ref": "#/$defs/values/color" } | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment