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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/eui/changelogs/upcoming/8070.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Updated `EuiHeader`s in dark mode to have a visible border-bottom color
24 changes: 4 additions & 20 deletions packages/eui/src/components/header/header.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,16 @@ export const euiHeaderVariables = (euiThemeContext: UseEuiTheme) => {
};

export const euiHeaderStyles = (euiThemeContext: UseEuiTheme) => {
const { euiTheme, colorMode } = euiThemeContext;
const { euiTheme } = euiThemeContext;
const { height, padding } = euiHeaderVariables(euiThemeContext);

// Curated border color to fade into the shadow without looking too much like a border
// It adds separation between the header and flyout
const borderColor =
colorMode === 'DARK'
? shade(euiTheme.colors.emptyShade, 0.35)
: shade(euiTheme.border.color, 0.03);

return {
euiHeader: css`
display: flex;
justify-content: space-between;
${logicalCSS('height', height)}
${logicalCSS('padding-horizontal', padding)}
${logicalCSS('border-bottom', euiTheme.border.thin)}
${euiShadowSmall(euiThemeContext)}
`,
// Position
Expand All @@ -61,12 +55,8 @@ export const euiHeaderStyles = (euiThemeContext: UseEuiTheme) => {
// Theme
default: css`
background-color: ${euiTheme.colors.emptyShade};
${logicalCSS(
'border-bottom',
`${euiTheme.border.width.thin} solid ${borderColor}`
)}
`,
dark: css(euiHeaderDarkStyles(euiThemeContext, borderColor)),
dark: css(euiHeaderDarkStyles(euiThemeContext)),
};
};

Expand All @@ -81,23 +71,17 @@ export const euiHeaderStyles = (euiThemeContext: UseEuiTheme) => {
*/
import { euiFormVariables } from '../form/form.styles';

const euiHeaderDarkStyles = (
euiThemeContext: UseEuiTheme,
defaultBorderColor: string
) => {
const euiHeaderDarkStyles = (euiThemeContext: UseEuiTheme) => {
const { euiTheme, colorMode } = euiThemeContext;
const { controlPlaceholderText } = euiFormVariables(euiThemeContext);

const backgroundColor =
colorMode === 'DARK'
? shade(euiTheme.colors.lightestShade, 0.5)
: shade(euiTheme.colors.darkestShade, 0.28);
const borderColor =
colorMode === 'DARK' ? defaultBorderColor : backgroundColor;

return `
background-color: ${backgroundColor};
${logicalCSS('border-bottom-color', borderColor)}

.euiHeaderLogo__text,
.euiHeaderLink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
import { css } from '@emotion/react';
import { euiShadow } from '../../../themes/amsterdam/global_styling/mixins';
import { euiBackgroundColor, logicalCSS } from '../../../global_styling';
import { transparentize, UseEuiTheme } from '../../../services';
import { UseEuiTheme } from '../../../services';

export const euiPageInnerStyles = (euiThemeContext: UseEuiTheme) => {
const borderColor = transparentize(
euiThemeContext.euiTheme.colors.lightShade,
0.7
);
const { euiTheme } = euiThemeContext;

return {
euiPageInner: css`
Expand All @@ -35,17 +32,11 @@ export const euiPageInnerStyles = (euiThemeContext: UseEuiTheme) => {

border: {
top: css`
${logicalCSS(
'border-top',
`${euiThemeContext.euiTheme.border.width.thin} solid ${borderColor}`
)}
${logicalCSS('border-top', euiTheme.border.thin)}
`,

left: css`
${logicalCSS(
'border-left',
`${euiThemeContext.euiTheme.border.width.thin} solid ${borderColor}`
)}
${logicalCSS('border-left', euiTheme.border.thin)}
`,
},
};
Expand Down