mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
In a00f5dd90e, we needed to move the
`alert-box` styles from alerts.css to be visible in portico pages.
However, when doing so, we incorrectly moved all of alerts.css, which
also has styles for `alert` and` alert-error` designed to make it
convenient to include hidden elements for potential errors in the
webapp settings UIs directly in the HTML template (and then use
show/hide to manage them).
We fix this by moving just the alert-box scope to the common
components.css module, which is designed as the place for styles
shared between the webapp and portico pages.
This fixes an issue where the error messages for wrong password and
the like were invisible :(.
285 lines
6.2 KiB
CSS
285 lines
6.2 KiB
CSS
/* Reusable, object-oriented CSS base components for all Zulip pages
|
|
(both webapp and portico). */
|
|
|
|
.new-style {
|
|
label.checkbox {
|
|
padding: 0;
|
|
display: inline-block;
|
|
position: relative;
|
|
vertical-align: top;
|
|
|
|
input[type="checkbox"] {
|
|
position: absolute;
|
|
clip: rect(0, 0, 0, 0);
|
|
|
|
~ span {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
position: relative;
|
|
top: -2px;
|
|
|
|
padding: 2px;
|
|
margin: 0 5px 0 0;
|
|
height: 10px;
|
|
width: 10px;
|
|
|
|
font-weight: 300;
|
|
line-height: 0.8;
|
|
font-size: 1.3rem;
|
|
text-align: center;
|
|
border: 1px solid hsla(0, 0%, 0%, 0.6);
|
|
|
|
border-radius: 4px;
|
|
filter: brightness(0.8);
|
|
|
|
cursor: pointer;
|
|
}
|
|
|
|
&:checked ~ span {
|
|
background-image: url(../images/checkbox.svg);
|
|
background-size: 85%;
|
|
background-position: 50% 50%;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
&:focus ~ span {
|
|
outline: 1px dotted;
|
|
outline: -webkit-focus-ring-color auto 5px;
|
|
}
|
|
|
|
&:disabled ~ span {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
}
|
|
|
|
a.no-style {
|
|
color: inherit;
|
|
}
|
|
}
|
|
|
|
a.no-underline,
|
|
a.no-underline:hover {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.half-opacity {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.italic {
|
|
font-style: italic;
|
|
}
|
|
|
|
.simplebar-track {
|
|
.simplebar-scrollbar::before {
|
|
background-color: hsl(0, 0%, 0%);
|
|
box-shadow: 0 0 0 1px hsla(0, 0%, 100%, 0.33);
|
|
}
|
|
|
|
&.simplebar-vertical {
|
|
transition: width 0.2s ease 1s;
|
|
|
|
&.simplebar-hover {
|
|
width: 15px;
|
|
transition: width 0.2s ease;
|
|
}
|
|
}
|
|
|
|
&.simplebar-horizontal {
|
|
transition: height 0.2s ease 1s;
|
|
|
|
&.simplebar-hover {
|
|
height: 15px;
|
|
transition: height 0.2s ease;
|
|
}
|
|
|
|
.simplebar-scrollbar {
|
|
transition: height 0.2s ease 1s;
|
|
|
|
&.simplebar-hover {
|
|
height: 11px;
|
|
transition: height 0.2s ease;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
i.zulip-icon.bot {
|
|
color: hsl(180, 5%, 74%);
|
|
vertical-align: top;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
$alert-red: hsl(16, 60%, 45%);
|
|
$alert-error-red: hsl(0, 80%, 40%);
|
|
|
|
/* Widget used for showing blueslip stack traces */
|
|
.alert-box {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 900px;
|
|
margin-left: calc(50% - 450px);
|
|
z-index: 220;
|
|
max-height: 100%;
|
|
overflow-y: auto;
|
|
overscroll-behavior: contain;
|
|
|
|
.stacktrace {
|
|
@extend .alert-display, .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%);
|
|
box-shadow: inset 0 11px 10px -10px hsl(0, 7%, 70%),
|
|
inset 0 -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 and the exit button. */
|
|
padding: 10px 50px;
|
|
|
|
text-shadow: none;
|
|
|
|
color: $alert-red;
|
|
border: 1px solid $alert-red;
|
|
box-shadow: 0 0 2px $alert-red;
|
|
|
|
&::before {
|
|
float: left;
|
|
margin-left: -38px;
|
|
|
|
font-family: FontAwesome;
|
|
font-size: 1.3em;
|
|
line-height: 1;
|
|
overflow: hidden;
|
|
content: "\f071";
|
|
|
|
color: hsl(16, 60%, 55%);
|
|
}
|
|
|
|
&::after {
|
|
clear: both;
|
|
content: "";
|
|
display: table;
|
|
}
|
|
|
|
&.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 {
|
|
float: right;
|
|
margin: -10px -50px -10px 0;
|
|
padding: 10px;
|
|
|
|
font-size: 2.5em;
|
|
font-weight: 300;
|
|
line-height: 1ex;
|
|
overflow: hidden;
|
|
|
|
cursor: pointer;
|
|
|
|
&::after {
|
|
content: "\d7";
|
|
}
|
|
}
|
|
}
|
|
}
|