Skip to content

Commit

Permalink
[PR feedback] height: inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Sep 5, 2023
1 parent 4f08b9a commit d2e834c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ export const euiCollapsibleNavBetaStyles = (euiThemeContext: UseEuiTheme) => {
// page load by setting the CSS var fallback to the height of a single header
const defaultHeaderHeight = euiHeaderVariables(euiThemeContext).height;
const fixedHeaderOffset = `var(--euiFixedHeadersOffset, ${defaultHeaderHeight})`;
const height = `calc(100% - ${fixedHeaderOffset})`;

return {
euiCollapsibleNavBeta: css`
/* Fixed header affordance */
${logicalCSS('top', fixedHeaderOffset)}
/* Set the height & allow the nav to scroll, in case consumers don't use EuiFlyoutBody/EuiFyoutFooter */
${euiYScroll(euiThemeContext, { height })}
/* Allow the nav to scroll, in case consumers don't use EuiFlyoutBody/EuiFyoutFooter */
${euiYScroll(euiThemeContext, { height: 'inherit' })}
/* This extra padding is needed for EuiPopovers to have enough
space to render with the right anchorPosition */
Expand Down
2 changes: 1 addition & 1 deletion src/components/flyout/flyout.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const euiFlyoutStyles = (euiThemeContext: UseEuiTheme) => {
position: fixed;
${logicalCSS('bottom', 0)}
${logicalCSS('top', 'var(--euiFixedHeadersOffset, 0)')}
${logicalCSS('height', 'calc(100% - var(--euiFixedHeadersOffset, 0))')}
${logicalCSS('height', 'inherit')}
z-index: ${euiTheme.levels.flyout};
background: ${euiTheme.colors.emptyShade};
display: flex;
Expand Down

0 comments on commit d2e834c

Please sign in to comment.