Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

Revert "css: Fix webapp alert styling incorrectly applying to portico."

Anders Kaseorg6a877890b8e4
diff --git a/static/styles/alerts.css b/static/styles/alerts.css
index 96475845268..9131a5b26ef 100644
--- a/static/styles/alerts.css
+++ b/static/styles/alerts.css
@@ -1,3 +1,6 @@
+$alert-red: hsl(16, 60%, 45%);
+$alert-error-red: hsl(0, 80%, 40%);
+
.alert-display {
display: none;
@@ -41,6 +44,174 @@
}
}
+/* alert box component changes */
+.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";
+ }
+ }
+ }
+}
+
/* animation section */
@keyframes fadeIn {
0% {
diff --git a/static/styles/components.css b/static/styles/components.css
index a66a9c9dc5a..e3b55a43801 100644
--- a/static/styles/components.css
+++ b/static/styles/components.css
@@ -111,174 +111,3 @@ i.zulip-icon.bot {
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";
- }
- }
- }
-}
diff --git a/static/styles/portico/portico_styles.css b/static/styles/portico/portico_styles.css
index da462ba06f3..27763bcb598 100644
--- a/static/styles/portico/portico_styles.css
+++ b/static/styles/portico/portico_styles.css
@@ -2,3 +2,4 @@
@import "portico.css";
@import "portico_signin.css";
@import "markdown.css";
+@import "../alerts.css";