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.

search css refactor: Move relevant css from zulip.css.

evykassirerf1e6f4b5dd1d
diff --git a/web/src/bundles/app.ts b/web/src/bundles/app.ts
index b44b742717a..c4dd1262ed6 100644
--- a/web/src/bundles/app.ts
+++ b/web/src/bundles/app.ts
@@ -44,6 +44,7 @@ import "../../styles/informational_overlays.css";
import "../../styles/compose.css";
import "../../styles/message_edit_history.css";
import "../../styles/reactions.css";
+import "../../styles/search.css";
import "../../styles/user_circles.css";
import "../../styles/left_sidebar.css";
import "../../styles/right_sidebar.css";
diff --git a/web/styles/search.css b/web/styles/search.css
new file mode 100644
index 00000000000..bcf78874944
--- /dev/null
+++ b/web/styles/search.css
@@ -0,0 +1,166 @@
+#searchbox,
+#searchbox_legacy {
+ width: 100%;
+ height: var(--header-height);
+
+ .navbar-search:not(.expanded) {
+ display: none;
+ }
+
+ .navbar-search.expanded {
+ float: left;
+ overflow: hidden;
+ margin-top: 0;
+ margin-bottom: 0;
+ width: calc(100% - 2px);
+ position: absolute;
+
+ .search_button {
+ display: inline;
+ margin-right: 15px;
+ }
+ }
+
+ .input-append {
+ position: relative;
+ width: 100%;
+ width: max-content;
+ min-width: 100%;
+
+ .fa-search {
+ padding: 0;
+ font-size: 20px;
+ position: absolute;
+ left: 10px;
+ top: 10px;
+ z-index: 5;
+ }
+
+ .fa-search:not(.deactivated) {
+ cursor: pointer;
+ }
+ }
+
+ #search_query {
+ width: 100%;
+ font-size: 16px;
+ height: var(--header-height);
+ padding: 0;
+ padding-left: 5px;
+ padding-right: 40px;
+ border: none;
+ border-radius: 0;
+ font-family: "Source Sans 3", sans-serif;
+ font-weight: 300;
+ line-height: var(--header-height);
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+
+ #search_arrows:focus {
+ box-shadow: inset 0 0 0 2px hsl(204, 20%, 74%);
+ }
+
+ .search_button,
+ .search_button:disabled:hover {
+ position: absolute;
+ right: 35px;
+ top: 6px;
+ background: none;
+ border-radius: 0;
+ border: none;
+ height: 30px;
+ text-align: center;
+ padding: 4px;
+ color: inherit;
+ opacity: 0.5;
+ font-size: 18px;
+ box-shadow: none;
+ text-shadow: none;
+ z-index: 5;
+ }
+
+ .search_button:hover {
+ opacity: 1;
+ }
+
+ .search_button:disabled {
+ visibility: hidden;
+ }
+
+ .search_icon {
+ position: absolute;
+ height: 100%;
+ text-decoration: none;
+ padding: 0 10px;
+ font-size: 20px;
+ z-index: 5;
+ left: 0;
+ }
+
+ #search_arrows {
+ padding-left: 35px;
+ font-size: 90%;
+ letter-spacing: normal;
+ }
+
+ .pill-container {
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ border: none;
+ padding: 0;
+ }
+
+ @media (width >= $sm_min) {
+ .pill {
+ padding: 2px 0 !important;
+ font-size: 14px;
+ }
+ }
+ @media (width < $sm_min) {
+ #search_arrows .pill {
+ line-height: 20px;
+
+ .exit {
+ top: 0;
+ }
+ }
+ }
+}
+
+#searchbox_legacy {
+ #search_arrows {
+ padding-left: 0;
+ }
+
+ #search_query {
+ padding-left: 35px;
+ }
+
+ .search_button {
+ right: 0;
+ }
+
+ .navbar-search.expanded {
+ .search_button {
+ margin-right: 14px;
+ }
+ }
+}
+
+@media (width < $sm_min) {
+ #searchbox,
+ #searchbox_legacy {
+ .input-append .fa-search {
+ top: 5px;
+ }
+
+ .search_button,
+ .search_button:disabled:hover {
+ top: 0;
+ }
+ }
+
+}
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index 65a3b708a2e..04d01cac5ec 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -1906,158 +1906,6 @@ div.focused_table {
}
}
-#searchbox,
-#searchbox_legacy {
- width: 100%;
- height: var(--header-height);
-
- .navbar-search:not(.expanded) {
- display: none;
- }
-
- .navbar-search.expanded {
- float: left;
- overflow: hidden;
- margin-top: 0;
- margin-bottom: 0;
- width: calc(100% - 2px);
- position: absolute;
-
- .search_button {
- display: inline;
- margin-right: 15px;
- }
- }
-
- .input-append {
- position: relative;
- width: 100%;
- width: max-content;
- min-width: 100%;
-
- .fa-search {
- padding: 0;
- font-size: 20px;
- position: absolute;
- left: 10px;
- top: 10px;
- z-index: 5;
- }
-
- .fa-search:not(.deactivated) {
- cursor: pointer;
- }
- }
-
- #search_query {
- width: 100%;
- font-size: 16px;
- height: var(--header-height);
- padding: 0;
- padding-left: 5px;
- padding-right: 40px;
- border: none;
- border-radius: 0;
- font-family: "Source Sans 3", sans-serif;
- font-weight: 300;
- line-height: var(--header-height);
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- }
-
- #search_arrows:focus {
- box-shadow: inset 0 0 0 2px hsl(204, 20%, 74%);
- }
-
- .search_button,
- .search_button:disabled:hover {
- position: absolute;
- right: 35px;
- top: 6px;
- background: none;
- border-radius: 0;
- border: none;
- height: 30px;
- text-align: center;
- padding: 4px;
- color: inherit;
- opacity: 0.5;
- font-size: 18px;
- box-shadow: none;
- text-shadow: none;
- z-index: 5;
- }
-
- .search_button:hover {
- opacity: 1;
- }
-
- .search_button:disabled {
- visibility: hidden;
- }
-
- .search_icon {
- position: absolute;
- height: 100%;
- text-decoration: none;
- padding: 0 10px;
- font-size: 20px;
- z-index: 5;
- left: 0;
- }
-
- #search_arrows {
- padding-left: 35px;
- font-size: 90%;
- letter-spacing: normal;
- }
-
- .pill-container {
- display: flex;
- flex-wrap: nowrap;
- align-items: center;
- border: none;
- padding: 0;
- }
-
- @media (width >= $sm_min) {
- .pill {
- padding: 2px 0 !important;
- font-size: 14px;
- }
- }
- @media (width < $sm_min) {
- #search_arrows .pill {
- line-height: 20px;
-
- .exit {
- top: 0;
- }
- }
- }
-}
-
-#searchbox_legacy {
- #search_arrows {
- padding-left: 0;
- }
-
- #search_query {
- padding-left: 35px;
- }
-
- .search_button {
- right: 0;
- }
-
- .navbar-search.expanded {
- .search_button {
- margin-right: 14px;
- }
- }
-}
-
#navbar-buttons {
white-space: nowrap;
margin-left: 15px;
@@ -2954,18 +2802,6 @@ select.invite-as {
top: -8px;
}
- #searchbox,
- #searchbox_legacy {
- .input-append .fa-search {
- top: 5px;
- }
-
- .search_button,
- .search_button:disabled:hover {
- top: 0;
- }
- }
-
.messagebox-content {
padding-right: 15px;
}