-
Notifications
You must be signed in to change notification settings - Fork 844
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Amsterdam] Updating button styles (#2874)
* Saturating colors and providing contrast mixin for text. * Adding text-specific color variables and updating components to use them. * Adding a danger text color as well. * Update some more downstream components - Only showing the Amsterdam callout when they’ve switched to the Amsterdam theme - Added `makeGraphicColor()` SASS color function - Added defaults to `makeHighContrastColor()` SASS color function * Added toggle to color guidelines to show text variant in amsterdam-light theme only * Updating button styles. * Updating button styles. * Figuring out a better way to override - Broke `euiButton()` mixin down to smaller mixins for easier reuse of base styles - Moved `overrides/` folder out of `global_styling` and importing __after__ component imports - Only overriding what __needs__ to/what is __different__ * Fixing the ghost colored disabled buttons * Woking on getting the colors and states right. * Removing rogue mixin import. * Merge conflict in colors.js. * CL * Picking up requested changes. * moving the button icon color map into global variables. * Removing text button style from docs example and setting up deprecation * Added `$euiButtonColorDisabledText` and refactored for its usage * A little cleanup * cl * addressing button states in dark mode. * Changing transparency instead of shade * Fix contrast of filled ghost disabled button * Temporarily fix context menu * Revert "Temporarily fix context menu" This reverts commit 8575def. Co-authored-by: Caroline Horn <[email protected]>
- Loading branch information
1 parent
7a24b3f
commit 8c3ca5f
Showing
28 changed files
with
229 additions
and
51 deletions.
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
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,2 @@ | ||
@import 'variables'; | ||
@import 'button_icon'; |
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,11 @@ | ||
// Modifier naming and colors. | ||
$euiButtonIconTypes: ( | ||
danger: $euiColorDanger, | ||
disabled: $euiButtonColorDisabledText, | ||
ghost: $euiColorGhost, | ||
primary: $euiColorPrimary, | ||
subdued: $euiColorDarkShade, | ||
success: $euiColorSuccess, | ||
text: $euiTextColor, | ||
warning: $euiColorWarning, | ||
); |
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
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
18 changes: 18 additions & 0 deletions
18
src/themes/eui-amsterdam/global_styling/mixins/_button.scss
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,18 @@ | ||
@mixin euiButton { | ||
@include euiButtonBase; | ||
@include euiFont; | ||
@include euiFontSize; | ||
|
||
font-weight: $euiFontWeightMedium; | ||
text-decoration: none; | ||
transition: all $euiAnimSpeedNormal $euiAnimSlightBounce; | ||
|
||
// sass-lint:disable mixins-before-declarations | ||
// focus states should come after all default styles | ||
@include euiButtonFocus; | ||
|
||
&:hover:not(:disabled), | ||
&:focus { | ||
text-decoration: underline; | ||
} | ||
} |
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,2 @@ | ||
@import 'panel'; | ||
@import 'button'; |
1 change: 1 addition & 0 deletions
1
src/themes/eui-amsterdam/global_styling/variables/_borders.scss
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 @@ | ||
$euiBorderRadius: $euiSizeS * .75; |
1 change: 1 addition & 0 deletions
1
src/themes/eui-amsterdam/global_styling/variables/_buttons.scss
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 @@ | ||
$euiButtonColorDisabled: tintOrShade($euiTextColor, 75%, 70%); |
2 changes: 2 additions & 0 deletions
2
src/themes/eui-amsterdam/global_styling/variables/_index.scss
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,2 @@ | ||
@import 'buttons'; | ||
@import 'borders'; |
Oops, something went wrong.