Skip to content

Commit

Permalink
[Amsterdam] Fixed EuiButtonGroup's border-radius and font-weight, and…
Browse files Browse the repository at this point in the history
… Fixed EuiButton's text color for text colors (#5177)

* [EuiButtonGroup] Fixed border-radius and font-weight for Amsterdam theme
* [EuiButton] Use text color for text colored buttons
  • Loading branch information
cchaos authored Sep 20, 2021
1 parent 17e44b6 commit 75b18e3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
- Fixed `EuiDataGrid` focus ring to be contained in the cell ([#5194](https://github.com/elastic/eui/pull/5194))
- Fixed `EuiDataGrid` cells when focused getting a higher `z-index` which was causing long content to overlap surrounding cells ([#5194](https://github.com/elastic/eui/pull/5194))

**Theme: Amsterdam**

- Fixed `border-radius` and increased `font-weight` for `EuiButtonGroup` ([#4993](https://github.com/elastic/eui/pull/4993))
- Increased contrast of text `color` for `text` colored `EuiButton` and `EuiButtonIcon` ([#5177](https://github.com/elastic/eui/pull/5177))

## [`38.0.0`](https://github.com/elastic/eui/tree/v38.0.0)

- Added optional line numbers to `EuiCodeBlock` ([#4993](https://github.com/elastic/eui/pull/4993))
Expand Down Expand Up @@ -37,7 +42,7 @@
- Removed Sass variables for `EuiTabs` font size (`$euiTabFontSize, $euiTabFontSizeS, $euiTabFontSizeL`) ([#5135](https://github.com/elastic/eui/pull/5135))
- Extended all `EuiTabProps` for each `EuiTabbedContentTab` ([#5135](https://github.com/elastic/eui/pull/5135))
- Changed `EuiPopover`'s `repositionOnScroll` function to prevent popover and input elements from separating on scroll when nested in `EuiFlyout` ([#5155](https://github.com/elastic/eui/pull/5155))
- Added the `repositionOnScroll` prop to `EuiSuperSelect` ([#5155](https://github.com/elastic/eui/pull/5155))
- Added the `repositionOnScroll` prop to `EuiSuperSelect` ([#5155](https://github.com/elastic/eui/pull/5155))
- Added `useGeneratedHtmlId` utility, which memoizes the randomly generated ID on mount and prevents regenerated IDs on component rerender ([#5133](https://github.com/elastic/eui/pull/5133))
- Fixed `z-index` styles that were causing parts of `EuiResizableContainer` to overlap `EuiHeader` ([#5164](https://github.com/elastic/eui/pull/5164))

Expand Down
6 changes: 6 additions & 0 deletions src/themes/eui-amsterdam/overrides/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
// Ghost is unique and ALWAYS sits against a dark background.
$backgroundColorSimulated: mix($euiColorInk, $color, 70%);
color: makeHighContrastColor($color, $backgroundColorSimulated);
} @else if ($name == 'text') {
// The default color is lighter than the normal text color, make it the text color
color: $euiTextColor;
} @else {
&.euiButton--fill:focus {
outline-color: lightOrDarkTheme($euiColorInk, $euiColorGhost);
Expand Down Expand Up @@ -83,6 +86,9 @@
// Ghost is unique and ALWAYS sits against a dark background.
$backgroundColorSimulated: mix($euiColorInk, $color, 70%);
color: makeHighContrastColor($color, $backgroundColorSimulated);
} @else if ($name == 'text') {
// The default color is lighter than the normal text color, make it the text color
color: $euiTextColor;
} @else {
&.euiButtonIcon--fill:focus {
outline-color: lightOrDarkTheme($euiColorInk, $euiColorGhost);
Expand Down
2 changes: 2 additions & 0 deletions src/themes/eui-amsterdam/overrides/_button_group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
.euiButtonGroup--small {
.euiButtonGroupButton {
border: none !important; // sass-lint:disable-line no-important
border-radius: 0 !important; // sass-lint:disable-line no-important
font-weight: $euiButtonFontWeight;

// Complicated set of focus states depending on whether it's a button and can receive :focus,
// or an input and uses focus-within, and browser support for :focus-visible
Expand Down

0 comments on commit 75b18e3

Please sign in to comment.