Merge pull request #80 from ascribe/align-global-notification-left

Use left alignment for global notification messages
This commit is contained in:
Brett Sun 2016-01-26 13:51:30 +01:00
commit 5a5e597ca4
1 changed files with 34 additions and 22 deletions

View File

@ -9,23 +9,23 @@
width: 100%; width: 100%;
z-index: 9999; z-index: 9999;
}
.ascribe-global-notification-off { > div {
bottom: -3.5em; padding: .5em 1em;
} text-align: center;
}
.ascribe-global-notification-on { &.ascribe-global-notification-off {
bottom: 0; bottom: -5em;
} }
.ascribe-global-notification > div, &.ascribe-global-notification-on {
.ascribe-global-notification-bubble > div { bottom: 0;
display: table-cell;
font-size: 1.25em; // React can sometimes take some time to load the notification message,
padding-right: 3em; // so add a small delay before showing the notification
text-align: right; transition-delay: 0.2s;
vertical-align: middle; }
} }
.ascribe-global-notification-bubble { .ascribe-global-notification-bubble {
@ -35,23 +35,35 @@
color: white; color: white;
display: table; display: table;
height: 3.5em; height: 3.5em;
max-width: 75%;
position: fixed; position: fixed;
right: -50em; transition: 0.5s right ease;
transition: 1s right ease;
z-index: 9999; z-index: 9999;
> div { > div {
padding: .75em 1.5em; padding: .75em 1.5em;
text-align: left;
}
&.ascribe-global-notification-bubble-off {
right: -100em;
}
&.ascribe-global-notification-bubble-on {
right: 3.5em;
// React can sometimes take some time to load the notification message,
// so add a small delay before showing the notification
transition-delay: 0.5s;
} }
} }
.ascribe-global-notification-bubble-off { .ascribe-global-notification > div,
right: -100em; .ascribe-global-notification-bubble > div {
} display: table-cell;
font-size: 1.25em;
.ascribe-global-notification-bubble-on { vertical-align: middle;
right: 3.5em;
} }
.ascribe-global-notification-danger { .ascribe-global-notification-danger {