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
3 changes: 3 additions & 0 deletions packages/eui/changelogs/upcoming/8100.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Bug fixes**

- Fixed `EuiSelectableTemplateSitewide`s within dark-themed `EuiHeader`s missing input borders
29 changes: 23 additions & 6 deletions packages/eui/src/components/header/header.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ const euiHeaderDarkStyles = (euiThemeContext: UseEuiTheme) => {
? shade(euiTheme.colors.lightestShade, 0.5)
: shade(euiTheme.colors.darkestShade, 0.28);

// Specific color overrides for EuiSelectableTemplateSitewide
const selectableSitewide = {
color: euiTheme.colors.ghost,
borderColor: transparentize(euiTheme.colors.ghost, 0.3),
placeholderColor: makeHighContrastColor(
controlPlaceholderText,
8
)(backgroundColor),
};

return `
background-color: ${backgroundColor};

Expand Down Expand Up @@ -112,21 +122,28 @@ const euiHeaderDarkStyles = (euiThemeContext: UseEuiTheme) => {
.euiSelectableTemplateSitewide .euiFormControlLayout {
background-color: transparent;

input {
box-shadow: inset 0 0 0 ${euiTheme.border.width.thin} ${
selectableSitewide.borderColor
};
}

&--group {
border-color: ${transparentize(euiTheme.colors.ghost, 0.3)};
border-color: ${selectableSitewide.borderColor};

input {
box-shadow: none;
}
}

&:not(:focus-within) {
/* Increase contrast of filled text to be more than placeholder text */
color: ${euiTheme.colors.ghost};
color: ${selectableSitewide.color};

input {
/* Increase contrast of placeholder text */
&::placeholder {
color: ${makeHighContrastColor(
controlPlaceholderText,
8
)(backgroundColor)};
color: ${selectableSitewide.placeholderColor};
}

/* Inherit color from form control layout */
Expand Down