Skip to content

Commit

Permalink
fix: Adds pages bg and removes the pseudo element shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
orangevolon committed Oct 18, 2024
1 parent 7693793 commit 20e60fe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
13 changes: 13 additions & 0 deletions pages/app/components/page-view.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
@use '~design-tokens' as tokens;

/*
This sets a background color to the page's container
to reveal the effects of negative z-index.
*/
.page-container {
background-color: tokens.$color-background-container-content;
}
6 changes: 5 additions & 1 deletion pages/app/components/page-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import React, { lazy, Suspense } from 'react';
import pagesContext from '../pages-context';
import ErrorBoundary from './error-boundary';

import styles from './page-view.scss';

const pagesComponents: Record<string, ReturnType<typeof lazy>> = {};

export default function PageView({ pageId }: { pageId: string }) {
Expand All @@ -15,7 +17,9 @@ export default function PageView({ pageId }: { pageId: string }) {
return (
<ErrorBoundary key={pageId}>
<Suspense fallback={<span>Loading...</span>}>
<Page />
<div className={styles['page-container']}>
<Page />
</div>
</Suspense>
</ErrorBoundary>
);
Expand Down
4 changes: 2 additions & 2 deletions src/flashbar/collapsible.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ the grid layout will be:
);
}

> .item:not(:last-child) > .flash::before,
> .item.flash::before {
> .item:not(:last-child) > .flash,
> .item.flash {
box-shadow: awsui.$shadow-flash-collapsed;
}
}
Expand Down
13 changes: 1 addition & 12 deletions src/flashbar/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,7 @@
color: awsui.$color-text-notification-default;
overflow-wrap: break-word;
word-wrap: break-word;

&::before {
@include styles.base-pseudo-element;
border-start-start-radius: awsui.$border-radius-flashbar;
border-start-end-radius: awsui.$border-radius-flashbar;
border-end-start-radius: awsui.$border-radius-flashbar;
border-end-end-radius: awsui.$border-radius-flashbar;
box-shadow: awsui.$shadow-flash-sticky;
}
&-refresh::before {
z-index: -1;
}
box-shadow: awsui.$shadow-flash-sticky;
}

.flash-list {
Expand Down

0 comments on commit 20e60fe

Please sign in to comment.