Skip to content

Commit

Permalink
Restore removed comments/context
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Sep 14, 2022
1 parent 9253c8a commit a7bbed8
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/components/flyout/flyout.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ export const euiFlyoutCloseButtonStyles = (euiThemeContext: UseEuiTheme) => {
background-color: ${transparentize(euiTheme.colors.emptyShade, 0.9)};
`,
outside: css`
// match dropshadow
// Match dropshadow
${euiShadowXLarge(euiThemeContext)};
// Override the hover and focus transitions of buttons
animation: none !important;
`,
outsideSide: {
// `transforms` pull in close buttons a little
// `!important` is necessary here to override the hover/focus transitions of buttons
right: css`
${logicalCSS('left', 0)}
Expand Down Expand Up @@ -101,6 +103,7 @@ export const euiFlyoutStyles = (euiThemeContext: UseEuiTheme) => {
align-items: stretch;
&:focus {
// Remove focus ring because of tabindex=0
outline: none;
}
Expand All @@ -111,7 +114,7 @@ export const euiFlyoutStyles = (euiThemeContext: UseEuiTheme) => {
}
`,

// Flyout Sizes
// Flyout sizes
s: css`
${composeFlyoutSizing(euiThemeContext, 's')}
`,
Expand All @@ -135,6 +138,7 @@ export const euiFlyoutStyles = (euiThemeContext: UseEuiTheme) => {
${euiTheme.animation.resistance};
}
`,
// Left-side flyouts should only be used for navigation
left: css`
${logicalCSS('left', 0)}
clip-path: polygon(0 0, 150% 0, 150% 100%, 0 100%);
Expand All @@ -150,7 +154,8 @@ export const euiFlyoutStyles = (euiThemeContext: UseEuiTheme) => {
`,
push: css`
clip-path: none;
animation-duration: 0s !important; // Don't animate on loading a docked nav
// Don't animate on loading a docked nav
animation-duration: 0s !important;
// Make sure the header shadows are above
z-index: ${Number(euiTheme.levels.flyout) - 1};
`,
Expand Down Expand Up @@ -187,9 +192,10 @@ const composeFlyoutSizing = (
) => {
const euiTheme = euiThemeContext.euiTheme;

// 1. Calculating the minimum width based on the screen takeover breakpoint
const flyoutSizes = {
s: {
min: `${Math.round(euiTheme.breakpoint.m * 0.5)}px`,
min: `${Math.round(euiTheme.breakpoint.m * 0.5)}px`, // 1.
width: '25vw',
max: `${Math.round(euiTheme.breakpoint.s * 0.7)}px`,
},
Expand All @@ -202,7 +208,7 @@ const composeFlyoutSizing = (
},

l: {
min: `${Math.round(euiTheme.breakpoint.m * 0.9)}px`,
min: `${Math.round(euiTheme.breakpoint.m * 0.9)}px`, // 1.
width: '75vw',
max: `${euiTheme.breakpoint.l}px`,
},
Expand Down

0 comments on commit a7bbed8

Please sign in to comment.