Skip to content

Commit

Permalink
[Tokens]: update existing tokens and add more layers (#543)
Browse files Browse the repository at this point in the history
Token parser updates:
- add more shadows to be grouped like 'focus state'
- add support for layer specific effect colors
- change how token name segments are removed
Prior to this commit, we removed token segments via string manipulation
with basic pattern find/replace manipulation. The problem with this
method is that we don't have a means of distinguishing between, say,
`--leo-font-browser-large-regular` (where we want to remove `-browser-`) and
`--leo-color-chrome-browser-stroke` (where we do not want to remove
`-browser-`). This commit fixes the problem by removing the key from the
object during parsing.

Tokens updates:
- add 'android' and 'ios' to be built for web platforms
- add 'browser' layer to android, ios, and skia builds
- update universal tokens/variables
- update browser tokens
- update android tokens
- add marketing tokens
- add search tokens
- add news tokens
- add newtab tokens
- add web3 tokens

---------

Co-authored-by: Jacob Lamont <[email protected]>
  • Loading branch information
aguscruiz and AlanBreck committed May 10, 2024
1 parent f7fc9da commit fa3f54d
Show file tree
Hide file tree
Showing 25 changed files with 4,527 additions and 150 deletions.
1 change: 0 additions & 1 deletion .storybook/global.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import Icon from '../src/components/icon/icon.svelte'
import SegmentedControl from '../src/components/segmentedControl/segmentedControl.svelte'
import '../tokens/css/variables.css'
import '../tokens/css/variables-browser.css'
// Note: We set the data-theme attribute on the body and on our layout element
// so that the theme is correctly set whether there are multiple stories on
Expand Down
56 changes: 28 additions & 28 deletions src/tokens/android.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"value": {
"fontSize": 45,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 500,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -29,7 +29,7 @@
"value": {
"fontSize": 36,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 500,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -51,7 +51,7 @@
"value": {
"fontSize": 32,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 500,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -73,7 +73,7 @@
"value": {
"fontSize": 28,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 500,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -95,7 +95,7 @@
"value": {
"fontSize": 22,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 500,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -117,7 +117,7 @@
"value": {
"fontSize": 16,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 600,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -142,7 +142,7 @@
"value": {
"fontSize": 16,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 400,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -165,7 +165,7 @@
"value": {
"fontSize": 16,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 600,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -190,7 +190,7 @@
"value": {
"fontSize": 14,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 400,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -213,7 +213,7 @@
"value": {
"fontSize": 14,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 600,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -237,7 +237,7 @@
"value": {
"fontSize": 12,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 400,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -259,7 +259,7 @@
"value": {
"fontSize": 12,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 600,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -283,7 +283,7 @@
"value": {
"fontSize": 11,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 400,
"fontStyle": "normal",
"fontStretch": "normal",
Expand All @@ -305,7 +305,7 @@
"value": {
"fontSize": 11,
"textDecoration": "none",
"fontFamily": "Roboto Flex",
"fontFamily": "Roboto",
"fontWeight": 600,
"fontStyle": "normal",
"fontStretch": "normal",
Expand Down Expand Up @@ -407,7 +407,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -453,7 +453,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -499,7 +499,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -545,7 +545,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -591,7 +591,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -637,7 +637,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -686,7 +686,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -733,7 +733,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -782,7 +782,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -829,7 +829,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -877,7 +877,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -923,7 +923,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -971,7 +971,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down Expand Up @@ -1017,7 +1017,7 @@
},
"fontFamily": {
"type": "string",
"value": "Roboto Flex"
"value": "Roboto"
},
"fontWeight": {
"type": "number",
Expand Down
Loading

0 comments on commit fa3f54d

Please sign in to comment.