Skip to content

Commit

Permalink
chore: Make flex properties more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuelz committed Nov 7, 2024
1 parent d6be802 commit 901f404
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app-layout/visual-refresh-toolbar/navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function AppLayoutNavigationImplementation({ appLayoutInternals }: AppLay
insetBlockStart: drawerTopOffset,
}}
>
<div className={styles['animated-content']}>
<div className={clsx(styles['content-container'], styles['animated-content'])}>
<div className={clsx(styles['hide-navigation'])}>
<InternalButton
ariaLabel={ariaLabels?.navigationClose ?? undefined}
Expand Down
5 changes: 5 additions & 0 deletions src/app-layout/visual-refresh-toolbar/navigation/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
word-wrap: break-word;
pointer-events: auto;
display: flex;
flex-direction: column;

// All content is hidden by the overflow-x property
&:not(.is-navigation-open) {
Expand All @@ -29,6 +30,10 @@
display: none;
}

& > .content-container {
flex-grow: 1;
}

/*
A non-semantic node is added with a fixed width equal to the final Navigation
width. This will create the visual appearance of horizontal movement and
Expand Down
5 changes: 5 additions & 0 deletions src/app-layout/visual-refresh/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ nav.navigation {
pointer-events: auto;
border-inline-end: solid awsui.$border-divider-section-width awsui.$color-border-divider-default;
display: flex;
flex-direction: column;

// Animation for the Navigation opacity and width when it is added to the DOM
@keyframes openNavigation {
Expand Down Expand Up @@ -133,6 +134,10 @@ nav.navigation {
inline-size: var(#{custom-props.$navigationWidth});
}

& > .content-container {
flex-grow: 1;
}

// The Navigation drawer will take up the entire viewport on mobile
@include styles.media-breakpoint-down(styles.$breakpoint-x-small) {
#{custom-props.$navigationWidth}: 100vw;
Expand Down
2 changes: 1 addition & 1 deletion src/app-layout/visual-refresh/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function Navigation() {
onNavigationClick && onNavigationClick(event);
}}
>
<div className={styles['animated-content']}>
<div className={clsx(styles['content-container'], styles['animated-content'])}>
<div className={styles['hide-navigation']}>
<InternalButton
ariaLabel={ariaLabels?.navigationClose ?? undefined}
Expand Down

0 comments on commit 901f404

Please sign in to comment.