From 1913092248520de1fd98de93efb15330a95a3fa3 Mon Sep 17 00:00:00 2001 From: Juan Fabrega Date: Tue, 30 Jun 2020 15:57:49 -0400 Subject: [PATCH 1/2] fix: ensure font sizes are using font attributes not spacing attributes --- build.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build.js b/build.js index 7cd849e..76a33ed 100644 --- a/build.js +++ b/build.js @@ -27,19 +27,22 @@ StyleDictionary.registerFilter({ var utilities = [ { "name": "font-color", - "tokenType": "color", + "tokenCategory": "color", + "tokenType": "font", "CSSprop": "color" }, { "name": "background-color", - "tokenType": "color", + "tokenCategory": "color", + "tokenType": "brand", "CSSprop": "background-color" }, { "name": "font-size", - "tokenType": "size", + "tokenCategory": "size", + "tokenType": "font", "CSSprop": "font-size" -} + }, ]; @@ -48,10 +51,10 @@ StyleDictionary.registerFormat({ formatter: function(dictionary, platform) { let output = ''; dictionary.allProperties.forEach(function(prop) { - const tokenType = prop.path.slice(0,1)[0]; - + const tokenCategory = prop.attributes.category; + const tokenType = prop.attributes.type; utilities.forEach(function(utility) { - if (tokenType === utility.tokenType) { + if (tokenCategory === utility.tokenCategory && tokenType === utility.tokenType) { let utilityClass = `${utility.name}-${prop.attributes.item}`; if (prop.attributes.subitem && prop.attributes.subitem !== 'base') { utilityClass += `-${prop.attributes.subitem}`; From 440f3cc6e0bca179624a00062333bebf638260ad Mon Sep 17 00:00:00 2001 From: Juan Fabrega Date: Tue, 30 Jun 2020 15:58:32 -0400 Subject: [PATCH 2/2] chore: bumping package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 096f084..7950158 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@palmetto/palmetto-design-tokens", - "version": "0.1.7", + "version": "0.1.8", "description": "Design tokens that power all Palmetto UIs.", "main": "build/index.js", "files": [