Skip to content

Commit

Permalink
feat: add new font scale tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon committed Dec 3, 2019
1 parent aecbce7 commit 549297a
Show file tree
Hide file tree
Showing 7 changed files with 468 additions and 77 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"scripts": {
"buildTokens": "node scripts/styleDictionary.js",
"ciBuild": "npm-run-all sweep test buildTokens copyJson",
"ciBuild": "npm-run-all sweep test copyJson buildTokens",
"copyJson": "copyfiles -u 1 -V './src/**/*.json' ./dist",
"test": "node scripts/jsonTest.js",
"sweep": "rm -rf dist/"
Expand Down
31 changes: 10 additions & 21 deletions src/asset/font.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,35 @@
"asset": {
"font": {
"circular": {
"family-name": {
"familyName": {
"value": "AS Circular",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"current": true
},
"dir": {
"value": "../fonts/",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"deprecated": true
},
"filename": {
"value": "ASCircularWeb",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"current": true
},
"weight": {
"light": {
"value": "-Light",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"current": true
},
"medium": {
"value": "-Medium",
"current": true
},
"book": {
"value": "-Book",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"current": true
}
}
}
Expand Down
35 changes: 6 additions & 29 deletions src/font-legacy.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,32 @@
{
"font": {
"family": {
"base": {
"value": "'{asset.font.circular.family-name.value}', Helvetica Neue, Arial, sans-serif",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
},
"mono": {
"value": "Menlo, Monaco, Consolas, 'Courier New', monospace",
"legacy": true,
"current": true
}
}
},
"weight": {
"book": {
"value": "400",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "font-weight-500",
"comment": "{comments.reference.comment} font-weight-500"
},
"light": {
"value": "200",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "font-weight-100",
"comment": "{comments.reference.comment} font-weight-100"
}
},
"verticalAlignment": {
"heading": {
"value": 1.2,
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"deprecated": true
},
"body": {
"value": 1.45,
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"deprecated": true
}
}
}
48 changes: 22 additions & 26 deletions src/size/font.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
"size": {
"font": {
"root": {
"value": 1,
"value": "{text.body.size.default.value}",
"legacyComment": "style guide value 16px",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-body-size-default",
"comment": "{comments.reference.comment} ods-text-body-size-default"
},
"breakpoint": {
"all": {
"med": {
"value": "{size.scale.med.value}",
"value": "{text.body.size.default.value}",
"legacyComment": "style guide value 16px, not to be used with light font weight",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-body-size-default",
"comment": "{comments.reference.comment} ods-text-body-size-default"
},
"small": {
"value": 0.75,
"legacyComment": "style guide value 12px, not to be used with light font weight",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-body-size-xs",
"comment": "{comments.reference.comment} ods-text-body-size-xs"
}
},
"desktop": {
Expand All @@ -38,35 +38,35 @@
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-heading-display-size-breakpoint-med",
"comment": "{comments.reference.comment} ods-text-heading-display-size-breakpoint-med"
},
"xxl": {
"value": 2.25,
"legacyComment": "style guide value 36px",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-heading-800-size-breakpoint-lg",
"comment": "{comments.reference.comment} ods-text-heading-800-breakpoint-lg-size"
},
"xl": {
"value": 1.75,
"legacyComment": "style guide value 28px",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-heading-700-size-breakpoint-sml",
"comment": "{comments.reference.comment} ods-text-heading-700-breakpoint-sml-size"
},
"lg": {
"value": 1.25,
"legacyComment": "style guide value 20px",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-heading-400-size",
"comment": "{comments.reference.comment} ods-text-heading-400-size"
}
},
"mobile": {
Expand All @@ -75,36 +75,32 @@
"legacyComment": "style guide value 35px",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"comment": "{comments.deprecated.comment} -- no new reference"
},
"xxl": {
"value": 1.625,
"legacyComment": "style guide value 26px",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-heading-600-size-breakpoint-sml",
"comment": "{comments.reference.comment} ods-text-heading-600-breakpoint-sml-size"
},
"xl": {
"value": 1.44,
"legacyComment": "style guide value 23px",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"comment": "{comments.deprecated.comment} -- no new reference"
},
"lg": {
"value": 1.25,
"legacyComment": "style guide value 20px",
"legacy": true,
"deprecated": true,
"redirect": true,
"reference": "TBD",
"comment": "{comments.reference.comment} TBD"
"reference": "ods-text-heading-400-size",
"comment": "{comments.reference.comment} ods-text-heading-400-size"
}
}
}
Expand Down
79 changes: 79 additions & 0 deletions src/size/scale.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
{
"size": {
"font": {
"scale": {
"base": {
"70": {
"value": 0.75,
"core": true
},
"80": {
"value": 0.875,
"core": true
},
"100": {
"value": 1,
"core": true
},
"110": {
"value": 1.125,
"core": true
},
"120": {
"value": 1.25,
"core": true
}
,
"130": {
"value": 1.375,
"core": true
},
"150": {
"value": 1.5,
"core": true
}
},
"responsive": {
"160": {
"value": 1.625,
"core": true
},
"170": {
"value": 1.75,
"core": true
},
"200": {
"value": 2,
"core": true
},
"220": {
"value": 2.25,
"core": true
},
"250": {
"value": 2.5,
"core": true
},
"270": {
"value": 2.75,
"core": true
},
"300": {
"value": 3.0,
"core": true
},
"350": {
"value": 3.5,
"core": true
}
}
}
},
"eighth": {
"value": 0.125,
"comment": "style guide value 2px",
Expand Down Expand Up @@ -30,6 +99,11 @@
"comment": "style guide value 16px",
"current": true
},
"baseEighth": {
"value": 1.125,
"comment": "style guide value 18px",
"current": true
},
"baseHalf": {
"value": 1.5,
"comment": "style guide value 24px",
Expand All @@ -40,6 +114,11 @@
"comment": "style guide value 32px",
"current": true
},
"baseDosQuarter": {
"value": 2.25,
"comment": "style guide value 36px",
"current": true
},
"baseTriple": {
"value": 3,
"comment": "style guide value 48px",
Expand Down
Loading

0 comments on commit 549297a

Please sign in to comment.