From 75b18e3d73ee3e8ff61258bdf7693c3c5992192b Mon Sep 17 00:00:00 2001 From: Caroline Horn <549577+cchaos@users.noreply.github.com> Date: Mon, 20 Sep 2021 15:32:58 -0400 Subject: [PATCH] [Amsterdam] Fixed EuiButtonGroup's border-radius and font-weight, and 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 --- CHANGELOG.md | 7 ++++++- src/themes/eui-amsterdam/overrides/_button.scss | 6 ++++++ src/themes/eui-amsterdam/overrides/_button_group.scss | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf25b13bac..a5f7f119a51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) @@ -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)) diff --git a/src/themes/eui-amsterdam/overrides/_button.scss b/src/themes/eui-amsterdam/overrides/_button.scss index ebf11423da4..6334c839c06 100644 --- a/src/themes/eui-amsterdam/overrides/_button.scss +++ b/src/themes/eui-amsterdam/overrides/_button.scss @@ -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); @@ -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); diff --git a/src/themes/eui-amsterdam/overrides/_button_group.scss b/src/themes/eui-amsterdam/overrides/_button_group.scss index 4a3804fd347..cb1d3856379 100644 --- a/src/themes/eui-amsterdam/overrides/_button_group.scss +++ b/src/themes/eui-amsterdam/overrides/_button_group.scss @@ -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