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.

css: Extract modal related css rules.

m-e-l-u-h-a-na57aa07a6d2c
diff --git a/static/js/bundles/app.js b/static/js/bundles/app.js
index 8eb6e92de97..5ff26c94db8 100644
--- a/static/js/bundles/app.js
+++ b/static/js/bundles/app.js
@@ -33,6 +33,7 @@ import "../../styles/components.css";
import "../../styles/app_components.css";
import "../../styles/rendered_markdown.css";
import "../../styles/zulip.css";
+import "../../styles/modal.css";
import "../../styles/settings.css";
import "../../styles/image_upload_widget.css";
import "../../styles/subscriptions.css";
diff --git a/static/styles/modal.css b/static/styles/modal.css
new file mode 100644
index 00000000000..56fbf611239
--- /dev/null
+++ b/static/styles/modal.css
@@ -0,0 +1,37 @@
+.modal {
+ box-shadow: 0 0 75px hsla(0, 0%, 0%, 0.5);
+ border: none;
+ border-radius: 0;
+ overflow: hidden;
+ margin-top: 0;
+ top: 5%;
+ outline: 10000px solid hsla(0, 0%, 0%, 0.3);
+
+ &.fade {
+ /* Ensure the modal is entirely off-screen while we fade the background */
+ top: -50%;
+ transition: opacity 0.3s linear;
+ transform: translateY(-50%);
+
+ &.in {
+ top: 50%;
+ pointer-events: all;
+ }
+ }
+
+ form {
+ margin-bottom: 0;
+ }
+}
+
+.modal-body {
+ max-height: 60vh;
+}
+
+.modal-backdrop {
+ z-index: 102;
+}
+
+.modal-bg {
+ background-color: hsl(0, 0%, 98%);
+}
diff --git a/static/styles/settings.css b/static/styles/settings.css
index dcfcfd892cc..feea7005aae 100644
--- a/static/styles/settings.css
+++ b/static/styles/settings.css
@@ -1527,25 +1527,6 @@ input[type="checkbox"] {
}
}
-.modal {
- box-shadow: 0 0 75px hsla(0, 0%, 0%, 0.5);
- outline: 10000px solid hsla(0, 0%, 0%, 0.3);
- border: none;
- border-radius: 0;
-
- &.fade {
- /* Ensure the modal is entirely off-screen while we fade the background */
- top: -50%;
- transition: opacity 0.3s linear;
- transform: translateY(-50%);
-
- &.in {
- top: 50%;
- pointer-events: all;
- }
- }
-}
-
#account-settings,
#admin-human-form {
.user-role button {
diff --git a/static/styles/zulip.css b/static/styles/zulip.css
index 6dbe45e2bad..131de91df80 100644
--- a/static/styles/zulip.css
+++ b/static/styles/zulip.css
@@ -145,10 +145,6 @@ p.n-margin {
border-radius: 4px;
}
-.modal-backdrop {
- z-index: 102;
-}
-
.history-limited-box {
color: hsl(16, 60%, 45%);
border: 1px solid hsl(16, 60%, 45%);
@@ -2138,10 +2134,6 @@ nav {
}
}
-.modal-bg {
- background-color: hsl(0, 0%, 98%);
-}
-
div.floating_recipient {
border-collapse: separate;
width: 100%;
@@ -2310,23 +2302,6 @@ div.topic_edit_spinner .loading_indicator_spinner {
margin: 0 auto;
}
-.modal {
- overflow: hidden;
- margin-top: 0;
- top: 5%;
- /* Bootstrap uses tabindex=-1 on modals for focus and ESC handling,
- so avoid the outline it causes */
- outline: 0;
-
- form {
- margin-bottom: 0;
- }
-}
-
-.modal-body {
- max-height: 60vh;
-}
-
#invitee_emails {
min-height: 40px;
max-height: 300px;