zulip/static/styles/alerts.scss

248 lines
4.9 KiB
SCSS

$alert-red: hsl(16, 60%, 45%);
$alert-error-red: hsl(0, 80%, 40%);
.alert-display {
display: none;
&.show {
display: block;
}
}
.alert-animations {
&.show {
animation-name: fadeIn;
animation-duration: 0.3s;
animation-fill-mode: forwards;
}
&.fade-out {
animation-name: fadeOut;
animation-duration: 0.3s;
animation-fill-mode: forwards;
}
.faded {
opacity: 0.7;
}
}
/* general alert styling changes */
.alert {
@extend .alert-display;
&#organization-status {
margin: 20px;
}
&.stream_create_info {
margin: 10px 10px 0px 10px;
}
.bankruptcy_unread_count {
font-weight: 600;
}
}
/* alert box component changes */
.alert-box {
position: absolute;
top: 0px;
left: 0px;
width: 900px;
margin-left: calc(50% - 450px);
z-index: 220;
max-height: 100%;
overflow-y: auto;
overscroll-behavior: contain;
.stacktrace {
@extend .alert-display;
}
.stacktrace {
@extend .alert-animations;
font-size: 1rem;
color: hsl(0, 80%, 40%);
margin-top: 5px;
padding: 1rem 0;
background-color: hsl(0, 100%, 98%);
border-radius: 4px;
border: 1px solid hsl(0, 80%, 40%);
box-shadow: 0 0 2px hsl(0, 80%, 40%);
.stacktrace-header {
display: flex;
justify-content: space-between;
.message {
flex: 1 1 auto;
}
.warning-symbol,
.exit {
flex: 0 0 auto;
font-size: 1.3rem;
padding: 0 1rem;
}
.exit::after {
cursor: pointer;
font-size: 2.3rem;
content: "\d7";
}
}
.stacktrace-content {
font-family: monospace;
font-size: 0.85rem;
margin-top: 1rem;
.stackframe {
padding-left: calc(3.3rem - 14px);
padding-right: 1rem;
}
}
.expand {
cursor: pointer;
color: hsl(0, 32%, 83%);
&:hover {
color: hsl(0, 0%, 20%);
}
}
.subtle {
color: hsl(0, 7%, 45%);
}
.code-context {
color: hsl(0, 7%, 15%);
background-color: hsl(0, 7%, 98%);
background-color: hsl(0, 7%, 98%);
box-shadow: inset 0px 11px 10px -10px hsl(0, 7%, 70%),
inset 0px -11px 10px -10px hsl(0, 7%, 70%);
margin-top: 1em;
margin-bottom: 1em;
.code-context-content {
padding: 1rem 0;
white-space: pre;
overflow-x: auto;
}
.line-number {
width: 3rem;
display: inline-block;
text-align: right;
color: hsl(0, 7%, 35%);
}
.focus-line {
background-color: hsl(0, 7%, 90%);
width: 100%;
}
}
}
.alert {
@extend .alert-animations;
font-size: 1rem;
border-radius: 4px;
background-color: hsl(0, 0%, 100%);
position: relative;
/* gives room for the error icon. */
padding-left: 50px;
padding-top: 10px;
padding-bottom: 10px;
text-shadow: none;
color: $alert-red;
border: 1px solid $alert-red;
box-shadow: 0 0 2px $alert-red;
&::before {
position: absolute;
top: 10px;
left: 12px;
font-family: "FontAwesome";
font-size: 1.3em;
content: "\f071";
color: hsl(16, 60%, 55%);
}
&.alert-error {
color: $alert-error-red;
border: 1px solid $alert-error-red;
box-shadow: 0 0 2px $alert-error-red;
&::before {
color: $alert-error-red;
}
}
.exit {
position: absolute;
top: 10px;
right: 0px;
font-size: 2.5em;
font-weight: 300;
cursor: pointer;
&::after {
padding: 10px;
content: "\d7";
}
}
}
}
/* animation section */
@keyframes fadeIn {
0% {
display: block;
opacity: 0;
transform: translateY(-100px);
}
100% {
opacity: 1;
transform: translateY(0px);
}
}
@keyframes fadeOut {
0% {
opacity: 1;
transform: translateY(0px);
}
100% {
display: none;
opacity: 0;
transform: translateY(-100px);
}
}
/* @media queries */
@media (max-width: 900px) {
.alert-box {
width: 80%;
left: 10%;
margin-left: 0px;
}
}