Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/components/selectable/selectable_templates/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
// The $euiFocusBackgroundColor without the alpha channel in light and dark mode
$euiSelectableTemplateFocusBackgroundLight: rgb(232, 241, 250);
$euiSelectableTemplateFocusBackgroundDark: rgb(35,56,77);

Comment on lines +1 to +4
Copy link
Contributor Author

@breehall breehall May 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added these instead of using $euiFocusBackgeoundColor is because the alpha channel in the color was causing makeHighContrastColor to calculate a very light (near white color).

I also specified light and dark colors because $euiFocusBackgeoundColor is being used in both light and dark mode.

$euiSelectableTemplateSitewideTypes: (
'application': (
'color': makeHighContrastColor($euiColorVis1),
'color': lightOrDarkTheme(makeHighContrastColor($euiColorVis1, $euiSelectableTemplateFocusBackgroundLight), makeHighContrastColor($euiColorVis1, $euiSelectableTemplateFocusBackgroundDark)),
'font-weight': $euiFontWeightMedium,
),
'deployment': (
'color': makeHighContrastColor($euiColorVis0),
'color': lightOrDarkTheme(makeHighContrastColor($euiColorVis0, $euiSelectableTemplateFocusBackgroundLight), makeHighContrastColor($euiColorVis0, $euiSelectableTemplateFocusBackgroundDark)),
'font-weight': $euiFontWeightMedium,
),
'article': (
'color': makeHighContrastColor($euiColorVis3),
'color': lightOrDarkTheme(makeHighContrastColor($euiColorVis3, $euiSelectableTemplateFocusBackgroundLight), makeHighContrastColor($euiColorVis3, $euiSelectableTemplateFocusBackgroundDark)),
'font-weight': $euiFontWeightMedium,
),
'case': (
'color': makeHighContrastColor($euiColorVis9),
'color': lightOrDarkTheme(makeHighContrastColor($euiColorVis9, $euiSelectableTemplateFocusBackgroundLight), makeHighContrastColor($euiColorVis9, $euiSelectableTemplateFocusBackgroundDark)),
'font-weight': $euiFontWeightMedium,
),
'platform': (
'color': makeHighContrastColor($euiColorVis5),
'color': lightOrDarkTheme(makeHighContrastColor($euiColorVis5, $euiSelectableTemplateFocusBackgroundLight), makeHighContrastColor($euiColorVis5, $euiSelectableTemplateFocusBackgroundDark)),
'font-weight': $euiFontWeightMedium,
),
);
1 change: 1 addition & 0 deletions upcoming_changelogs/6761.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Improved the contrast ratio of meta labels within `EuiSelectableTemplateSitewide` to meet WCAG AA guidelines.