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] Separate Foundation Palette #9683
Closed
Closed
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9448cb8
Separate the Foundation palette into a map of colors, and a map to as…
natewiebe13 a02118a
Show missing key in error message
natewiebe13 f7287fe
Correct color name typo
natewiebe13 2f0649a
Update error message wording to be consistent
natewiebe13 085311c
Revert settings file as this is automatically generated
natewiebe13 cfecb79
Move color map to the color utility file
natewiebe13 610d044
Use the safe method of getting a map value
natewiebe13 2a95a9a
Revert unrelated CSS changesg
natewiebe13 5132096
Remove unneeded checks
natewiebe13 ca7ba75
Update message about avoiding direct color usage in components
natewiebe13 7ffb49e
Import needed files for color unit test
natewiebe13 84f61b0
Update comment for how the color map should be used
natewiebe13 2fec363
Add unit tests for get-color and get-state
natewiebe13 b83f720
Modify the unit tests to be more flexible
natewiebe13 cf22604
Change unit test to not rely on other functions
natewiebe13 91e547c
Rename `get-state()` to `get-state-color()` for clarity
natewiebe13 018e1ab
Require declaring the color in the colors map when using states
natewiebe13 7d72d2e
Make `get-color()` backwards compatible and add a deprecation warning
natewiebe13 e3cd682
Add component variables for states
natewiebe13 970b67d
Merge branch 'v6.4' into color-palette-changes
natewiebe13 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,16 +47,19 @@ | |
} | ||
|
||
@include test('Get Color (Blue) [function]') { | ||
$test: get-color('blue'); | ||
$expect: #1779ba; | ||
$foundation-colors: ('blue': $expect); | ||
$test: get-color('blue'); | ||
|
||
@include assert-equal($test, $expect, | ||
'Returns the color for blue from the color map'); | ||
} | ||
|
||
@include test('Get State (Primary) [function]') { | ||
$test: get-state(primary); | ||
$expect: #1779ba; | ||
$foundation-colors: ('blue': $expect); | ||
$foundation-states: (primary: get-color('blue')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not rely on other functions within tests. You can simply use Also, I think you must set |
||
$test: get-state(primary); | ||
|
||
@include assert-equal($test, $expect, | ||
'Returns the color for the primary state from the states map'); | ||
|
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.
We do not expect always
#1779ba
, but only the color for blue from the color map. So please set$foundation-color: (blue: #1779ba);
. Same forget-state
.