-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] JSON theme #4443
Draft
origami-z
wants to merge
34
commits into
main
Choose a base branch
from
4041-json-theme
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[WIP] JSON theme #4443
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
8298cb9
Some basic stuff
origami-z 46f839e
Split palette to multiple files
origami-z b30b23b
Multi modes? not working
origami-z 6684f2c
kebab case tokens.json
origami-z 769fe79
Update with $modes working version for palette.accent.stronger.$modes
origami-z b721215
Add script to combine multiple tokens files into a single $modes file
origami-z ccf36f5
Add accent + mode. How to remove accent from uncessary css?
origami-z a0cf477
Add todo
origami-z f193634
refactor kebab, remove -default suffix
origami-z 5142f76
Refactor transform to standalone file
origami-z 486531a
Update readme instructions
origami-z efc85c0
Reduce number of css when blue/teal mode doesn't matter for palette
origami-z 5222d7c
Fix characteristics palette token
origami-z f059c70
Exclude figma only token in platform filtes filter
origami-z 608ae23
Add readme
origami-z 9691e5b
Refactor files to standalone file
origami-z b313f5e
Fix build after refactor
origami-z b047854
Adds characteristics files
origami-z fbe14eb
Move palette tokens into src folder
origami-z 3fe6718
Fix script
origami-z b1924d0
Add curve-next tokens
origami-z 31b0eec
Biome fix
origami-z 4a58aa6
Build into existing css palette/-next.css
origami-z 63ff787
Reorder color.tokens, add background prefix to some colors
origami-z 7d1b115
add alph.background prefix to some colors
origami-z 808c9c9
Add foundation color/alpha next to prod css
origami-z ed06aea
Add slash to tooling/ts package.json
origami-z 3670ac1
Use out of box `css/variables` format
origami-z d28b2c6
Add formatting to cssMultiModes
origami-z 00f9dd2
Add remaining header formatting
origami-z 72340fc
Adds more palette next css
origami-z 6c9845e
Rename script name
origami-z 711b569
Fix salt-ds/value/px
origami-z 0e8752e
Update file header comment
origami-z File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
This is a regular package | ||
|
||
--- | ||
|
||
## Tokens | ||
|
||
1. Run "Export Color Styles" -> "Export Variables" -> "Json (Experimental)" from [PR#51](https://github.com/jpmorganchase/Figma-Plugins-and-Widgets/pull/51) | ||
1. Select Collection and Mode on plugin UI | ||
1. Add "Additional Root Key (Optional)" | ||
- Colors library: 'color' | ||
- Palette library: 'palette' | ||
1. Copy output to corresponding `*.tokens.json` file | ||
1. Modify color tokens | ||
1. remove `categorical.` from , e.g. replace `"{color.categorical` to `"{color` | ||
1. added `background.` to a few background color raw tokens | ||
|
||
TODOs | ||
|
||
- [ ] Custom value tranformer for `foundation/alpha-next.css` tokens, to achieve `rgba` syntax from `packages/theme/css/foundations/alpha-next.css`? Or this may not be needed given we generate these values | ||
- [ ] Better `alpha` foundation color generation, maybe use custom opacity modifier instead |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,80 @@ | ||
/* | ||
TODO: discuss whether this should be an actual file, or should inline these values. | ||
con: If we offer these values, then it could misleading that we're offering all these values | ||
/** | ||
* Do not edit directly, this file was auto-generated. | ||
*/ | ||
|
||
.salt-theme.salt-theme-next { | ||
--salt-color-white-10a: rgba(var(--salt-color-white-rgb), 0.1); | ||
--salt-color-white-15a: rgba(var(--salt-color-white-rgb), 0.15); | ||
--salt-color-white-20a: rgba(var(--salt-color-white-rgb), 0.2); | ||
--salt-color-white-30a: rgba(var(--salt-color-white-rgb), 0.3); | ||
--salt-color-white-40a: rgba(var(--salt-color-white-rgb), 0.4); | ||
--salt-color-white-45a: rgba(var(--salt-color-white-rgb), 0.45); | ||
--salt-color-white-70a: rgba(var(--salt-color-white-rgb), 0.7); | ||
--salt-color-black-10a: rgba(var(--salt-color-black-rgb), 0.1); | ||
--salt-color-black-15a: rgba(var(--salt-color-black-rgb), 0.15); | ||
--salt-color-black-20a: rgba(var(--salt-color-black-rgb), 0.2); | ||
--salt-color-black-30a: rgba(var(--salt-color-black-rgb), 0.3); | ||
--salt-color-black-40a: rgba(var(--salt-color-black-rgb), 0.4); | ||
--salt-color-black-45a: rgba(var(--salt-color-black-rgb), 0.45); | ||
--salt-color-black-70a: rgba(var(--salt-color-black-rgb), 0.7); | ||
--salt-color-blue-200-40a: rgba(var(--salt-color-blue-200-rgb), 0.4); | ||
--salt-color-blue-300-40a: rgba(var(--salt-color-blue-300-rgb), 0.4); | ||
--salt-color-blue-400-40a: rgba(var(--salt-color-blue-400-rgb), 0.4); | ||
--salt-color-blue-500-40a: rgba(var(--salt-color-blue-500-rgb), 0.4); | ||
--salt-color-blue-600-40a: rgba(var(--salt-color-blue-600-rgb), 0.4); | ||
--salt-color-blue-700-40a: rgba(var(--salt-color-blue-700-rgb), 0.4); | ||
--salt-color-blue-800-40a: rgba(var(--salt-color-blue-800-rgb), 0.4); | ||
--salt-color-gray-300-10a: rgba(var(--salt-color-gray-300-rgb), 0.1); | ||
--salt-color-gray-300-40a: rgba(var(--salt-color-gray-300-rgb), 0.4); | ||
--salt-color-gray-400-40a: rgba(var(--salt-color-gray-400-rgb), 0.4); | ||
--salt-color-gray-500-10a: rgba(var(--salt-color-gray-500-rgb), 0.1); | ||
--salt-color-gray-500-40a: rgba(var(--salt-color-gray-500-rgb), 0.4); | ||
--salt-color-gray-600-40a: rgba(var(--salt-color-gray-600-rgb), 0.4); | ||
--salt-color-gray-700-10a: rgba(var(--salt-color-gray-700-rgb), 0.1); | ||
--salt-color-gray-700-40a: rgba(var(--salt-color-gray-700-rgb), 0.4); | ||
--salt-color-green-400-40a: rgba(var(--salt-color-green-400-rgb), 0.4); | ||
--salt-color-green-500-40a: rgba(var(--salt-color-green-500-rgb), 0.4); | ||
--salt-color-green-600-40a: rgba(var(--salt-color-green-600-rgb), 0.4); | ||
--salt-color-orange-400-40a: rgba(var(--salt-color-orange-400-rgb), 0.4); | ||
--salt-color-orange-500-40a: rgba(var(--salt-color-orange-500-rgb), 0.4); | ||
--salt-color-orange-600-40a: rgba(var(--salt-color-orange-600-rgb), 0.4); | ||
--salt-color-red-400-40a: rgba(var(--salt-color-red-400-rgb), 0.4); | ||
--salt-color-red-500-40a: rgba(var(--salt-color-red-500-rgb), 0.4); | ||
--salt-color-red-600-40a: rgba(var(--salt-color-red-600-rgb), 0.4); | ||
--salt-color-teal-200-40a: rgba(var(--salt-color-teal-200-rgb), 0.4); | ||
--salt-color-teal-300-40a: rgba(var(--salt-color-teal-300-rgb), 0.4); | ||
--salt-color-teal-400-40a: rgba(var(--salt-color-teal-400-rgb), 0.4); | ||
--salt-color-teal-500-40a: rgba(var(--salt-color-teal-500-rgb), 0.4); | ||
--salt-color-teal-600-40a: rgba(var(--salt-color-teal-600-rgb), 0.4); | ||
--salt-color-teal-700-40a: rgba(var(--salt-color-teal-700-rgb), 0.4); | ||
--salt-color-teal-800-40a: rgba(var(--salt-color-teal-800-rgb), 0.4); | ||
--salt-color-background-snow-40a: rgba(var(--salt-color-background-snow-rgb), 0.4); | ||
--salt-color-background-marble-40a: rgba(var(--salt-color-background-marble-rgb), 0.4); | ||
--salt-color-background-limestone-40a: rgba(var(--salt-color-background-limestone-rgb), 0.4); | ||
--salt-color-background-granite-40a: rgba(var(--salt-color-background-granite-rgb), 0.4); | ||
--salt-color-background-jet-40a: rgba(var(--salt-color-background-jet-rgb), 0.4); | ||
--salt-color-background-leather-40a: rgba(var(--salt-color-background-leather-rgb), 0.4); | ||
--salt-color-white-0a: rgba(255, 255, 255, 0); | ||
--salt-color-white-5a: rgba(255, 255, 255, 0.05); | ||
--salt-color-white-10a: rgba(255, 255, 255, 0.1); | ||
--salt-color-white-15a: rgba(255, 255, 255, 0.15); | ||
--salt-color-white-20a: rgba(255, 255, 255, 0.2); | ||
--salt-color-white-25a: rgba(255, 255, 255, 0.25); | ||
--salt-color-white-30a: rgba(255, 255, 255, 0.3); | ||
--salt-color-white-35a: rgba(255, 255, 255, 0.35); | ||
--salt-color-white-40a: rgba(255, 255, 255, 0.4); | ||
--salt-color-white-45a: rgba(255, 255, 255, 0.45); | ||
--salt-color-white-50a: rgba(255, 255, 255, 0.5); | ||
--salt-color-white-55a: rgba(255, 255, 255, 0.55); | ||
--salt-color-white-60a: rgba(255, 255, 255, 0.6); | ||
--salt-color-white-65a: rgba(255, 255, 255, 0.65); | ||
--salt-color-white-70a: rgba(255, 255, 255, 0.7); | ||
--salt-color-white-75a: rgba(255, 255, 255, 0.75); | ||
--salt-color-white-80a: rgba(255, 255, 255, 0.8); | ||
--salt-color-black-0a: rgba(0, 0, 0, 0); | ||
--salt-color-black-5a: rgba(0, 0, 0, 0.05); | ||
--salt-color-black-10a: rgba(0, 0, 0, 0.1); | ||
--salt-color-black-15a: rgba(0, 0, 0, 0.15); | ||
--salt-color-black-20a: rgba(0, 0, 0, 0.2); | ||
--salt-color-black-25a: rgba(0, 0, 0, 0.25); | ||
--salt-color-black-30a: rgba(0, 0, 0, 0.3); | ||
--salt-color-black-35a: rgba(0, 0, 0, 0.35); | ||
--salt-color-black-40a: rgba(0, 0, 0, 0.4); | ||
--salt-color-black-45a: rgba(0, 0, 0, 0.45); | ||
--salt-color-black-50a: rgba(0, 0, 0, 0.5); | ||
--salt-color-black-55a: rgba(0, 0, 0, 0.55); | ||
--salt-color-black-60a: rgba(0, 0, 0, 0.6); | ||
--salt-color-black-65a: rgba(0, 0, 0, 0.65); | ||
--salt-color-black-70a: rgba(0, 0, 0, 0.7); | ||
--salt-color-black-75a: rgba(0, 0, 0, 0.75); | ||
--salt-color-black-80a: rgba(0, 0, 0, 0.8); | ||
--salt-color-blue-200-40a: rgba(199, 222, 255, 0.4); | ||
--salt-color-blue-300-40a: rgba(154, 189, 245, 0.4); | ||
--salt-color-blue-400-40a: rgba(102, 156, 232, 0.4); | ||
--salt-color-blue-500-40a: rgba(0, 120, 207, 0.4); | ||
--salt-color-blue-500-0a: rgba(0, 120, 207, 0); | ||
--salt-color-blue-600-40a: rgba(0, 94, 166, 0.4); | ||
--salt-color-blue-700-40a: rgba(0, 69, 126, 0.4); | ||
--salt-color-blue-800-40a: rgba(0, 45, 89, 0.4); | ||
--salt-color-gray-300-40a: rgba(177, 181, 185, 0.4); | ||
--salt-color-gray-400-10a: rgba(145, 149, 154, 0.1); | ||
--salt-color-gray-400-40a: rgba(145, 149, 154, 0.4); | ||
--salt-color-gray-500-0a: rgba(114, 119, 125, 0); | ||
--salt-color-gray-500-10a: rgba(114, 119, 125, 0.1); | ||
--salt-color-gray-500-40a: rgba(114, 119, 125, 0.4); | ||
--salt-color-gray-600-10a: rgba(95, 100, 106, 0.1); | ||
--salt-color-gray-600-40a: rgba(97, 102, 108, 0.4); | ||
--salt-color-gray-700-40a: rgba(76, 81, 87, 0.4); | ||
--salt-color-orange-400-40a: rgba(232, 122, 56, 0.4); | ||
--salt-color-orange-500-40a: rgba(199, 83, 0, 0.4); | ||
--salt-color-orange-600-40a: rgba(163, 68, 0, 0.4); | ||
--salt-color-red-400-40a: rgba(255, 93, 87, 0.4); | ||
--salt-color-red-500-40a: rgba(229, 33, 53, 0.4); | ||
--salt-color-red-600-40a: rgba(186, 23, 41, 0.4); | ||
--salt-color-teal-200-40a: rgba(175, 224, 237, 0.4); | ||
--salt-color-teal-300-40a: rgba(131, 192, 214, 0.4); | ||
--salt-color-teal-400-40a: rgba(76, 161, 194, 0.4); | ||
--salt-color-teal-500-40a: rgba(27, 127, 158, 0.4); | ||
--salt-color-teal-500-0a: rgba(27, 127, 158, 0); | ||
--salt-color-teal-600-40a: rgba(18, 100, 126, 0.4); | ||
--salt-color-teal-700-40a: rgba(9, 74, 96, 0.4); | ||
--salt-color-teal-800-40a: rgba(3, 49, 66, 0.4); | ||
--salt-color-green-400-40a: rgba(83, 176, 135, 0.4); | ||
--salt-color-green-500-40a: rgba(0, 135, 93, 0.4); | ||
--salt-color-green-600-40a: rgba(0, 107, 72, 0.4); | ||
--salt-color-background-snow-40a: rgba(255, 255, 255, 0.4); | ||
--salt-color-background-marble-40a: rgba(242, 244, 246, 0.4); | ||
--salt-color-background-limestone-40a: rgba(250, 248, 242, 0.4); | ||
--salt-color-background-charcoal-40a: rgba(71, 76, 80, 0.4); | ||
--salt-color-background-leather-40a: rgba(38, 41, 43, 0.4); | ||
--salt-color-background-jet-40a: rgba(16, 24, 32, 0.4); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??? Why gray 600 10a/40a not same RGB