Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Visual Refresh] Update floating border on EuiPanel #8270

Merged
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
21 changes: 19 additions & 2 deletions packages/eui/src/components/panel/panel.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ import {
export const euiPanelStyles = (euiThemeContext: UseEuiTheme) => {
const { euiTheme } = euiThemeContext;

const borderStyle = `
position: relative;

/* Using a pseudo element for the border instead of floating border only
because the transparent border might otherwise be visible with arbitrary
full-width/height content in light mode. */
::before {
content: '';
position: absolute;
inset: 0;
border: ${euiTheme.border.width.thin} solid
${euiTheme.colors.borderBaseFloating};
border-radius: inherit;
pointer-events: none;
}
`;

return {
// Base
euiPanel: css`
Expand All @@ -30,8 +47,8 @@ export const euiPanelStyles = (euiThemeContext: UseEuiTheme) => {

hasShadow: css`
${euiShadow(euiThemeContext, 'm')}
border: ${euiTheme.border.width.thin} solid ${euiTheme.colors
.borderBaseFloating};

${borderStyle}
`,

hasBorder: css`
Expand Down