-
Notifications
You must be signed in to change notification settings - Fork 843
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
[Amsterdam] Saturating colors and providing contrast mixin for text. #2873
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
39f850e
Saturating colors and providing contrast mixin for text.
daveyholler 3752715
Adding text-specific color variables and updating components to use t…
daveyholler c500652
Adding a danger text color as well.
daveyholler a5b5ec7
Update some more downstream components
e91899e
Added toggle to color guidelines to show text variant in amsterdam-li…
74573a1
Showing callout and switich for all themes
5f081c3
Adding SASS example
ef4dea7
cl
e3b0f6b
Merge branch 'master' into am/updating-colors
cchaos 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ | |
} | ||
|
||
.guideRule__caption { | ||
color: $euiColorSuccess; | ||
color: $euiColorSuccessText; | ||
} | ||
} | ||
|
||
|
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
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,9 +1,9 @@ | ||
// Modifier naming and colors. | ||
$euiExpressionColors: ( | ||
subdued: $euiColorMediumShade, | ||
primary: $euiColorPrimary, | ||
secondary: $euiColorSecondary, | ||
warning: $euiColorWarning, | ||
danger: $euiColorDanger, | ||
accent: $euiColorAccent, | ||
subdued: $euiColorDarkShade, | ||
primary: $euiColorPrimaryText, | ||
secondary: $euiColorSecondaryText, | ||
warning: $euiColorWarningText, | ||
danger: $euiColorDangerText, | ||
accent: $euiColorAccentText, | ||
); |
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
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
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
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 |
---|---|---|
@@ -1 +1,11 @@ | ||
$euiColorPrimary: #006DE4; | ||
// This extra import allows any variables that are created via functions to work when loaded into JS | ||
@import '../../global_styling/variables/colors'; | ||
|
||
$euiColorPrimary: #006DE4; | ||
$euiColorSecondary: #00BFB3; | ||
$euiColorAccent: #FC358E; | ||
|
||
// Constrasty text variants | ||
$euiColorPrimaryText: makeHighContrastColor($euiColorPrimary); | ||
$euiColorSecondaryText: makeHighContrastColor($euiColorSecondary); | ||
$euiColorAccentText: makeHighContrastColor($euiColorAccent); |
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.
Even if we aren't adding this to the guidelines, I'd add some more explanation to why this is used. Assumption is someone will see this in use in the existing code, grep for the function and see that it calculates lower, but when is it a good time to use this over
makeHighContrastColor
. I know it sounds silly, but just say something like... "This is useful for icons so they don't get desaturated colors, but are still readable"...etc.I'd also consider renaming it to
makeGraphicContrastColor
to better signal this is a contrast calculating function similar tomakrHighContrastColor
.