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

[core] Fix Toaster regression #2233

Merged
merged 2 commits into from
Mar 14, 2018
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
30 changes: 13 additions & 17 deletions packages/core/src/components/toast/_toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ $toast-margin: $pt-grid-size * 2 !default;
}

.pt-toast-container {
display: flex;
flex-direction: column;
align-items: center;

position: fixed;
right: 0;
left: 0;
Expand All @@ -155,40 +159,32 @@ $toast-margin: $pt-grid-size * 2 !default;
z-index: $pt-z-index-overlay * 2;
// toasts have margin-top so omit it on container

// prevent container from scrolling as new toasts enter (from bottom)
overflow: hidden;

// ensure there's enough space for full box-shadow
padding: 0 $toast-margin $toast-margin;

// container will not block clicks on elements behind it
pointer-events: none;

// TransitionGroup
> div {
display: flex;
flex-direction: column;
align-items: center;
// prevent container from scrolling as new toasts enter (from bottom)
overflow: hidden;
// ensure there's enough space for full box-shadow
padding: 0 $toast-margin $toast-margin;
}

&.pt-toast-container-top {
top: 0;
// clear opposite side cuz .pt-overlay has all sides 0'ed
bottom: auto;
}

&.pt-toast-container-bottom {
flex-direction: column-reverse;
top: auto;
bottom: 0;

> div {
flex-direction: column-reverse;
}
}

&.pt-toast-container-left > div {
&.pt-toast-container-left {
align-items: flex-start;
}

&.pt-toast-container-right > div {
&.pt-toast-container-right {
align-items: flex-end;
}
}
Expand Down