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.

settings: Move tab-switcher out of .new-style block.

Karl Stolley767431833204
diff --git a/web/styles/app_components.css b/web/styles/app_components.css
index d995f515d36..489bf16cdce 100644
--- a/web/styles/app_components.css
+++ b/web/styles/app_components.css
@@ -261,84 +261,86 @@ input::placeholder {
}
}
}
+}
- /* -- tab switcher -- */
-
- .tab-switcher {
- font-weight: initial;
- margin: 2px 4px;
- display: inline-block;
+/* -- tab switcher -- */
- .ind-tab {
- display: inline-block;
- width: 90px;
- margin: 0 -0.5px;
- text-align: center;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- vertical-align: bottom; /* See https://stackoverflow.com/a/43266155/ */
- padding: 3px 10px;
- background-color: hsl(0deg 0% 100%);
- cursor: pointer;
- justify-content: center;
- align-items: center;
+.tab-switcher {
+ font-weight: initial;
+ margin: 2px 4px;
+ display: inline-block;
- &:focus {
- outline: none;
- }
+ .ind-tab {
+ display: inline-block;
+ width: 90px;
+ margin: 0 -0.5px;
+ text-align: center;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ vertical-align: bottom; /* See https://stackoverflow.com/a/43266155/ */
+ padding: 3px 10px;
+ background-color: var(--color-background-tab-switcher-ind-tab);
+ cursor: pointer;
+ justify-content: center;
+ align-items: center;
- &:not(.selected) {
- border: 1px solid hsl(0deg 0% 80%);
- }
+ &:focus {
+ outline: none;
+ }
- &.first {
- border-radius: 5px 0 0 5px;
- border-right: 1px solid transparent;
- }
+ &:not(.selected) {
+ border: 1px solid var(--color-border-tab-switcher-ind-tab);
+ }
- &.middle {
- border-right: 1px solid transparent;
- }
+ &.first {
+ border-radius: 5px 0 0 5px;
+ border-right: 1px solid transparent;
+ }
- &.last {
- border-radius: 0 5px 5px 0;
- }
+ &.middle {
+ border-right: 1px solid transparent;
+ }
- &.selected {
- position: relative;
- background-color: hsl(0deg 0% 53%);
- color: hsl(0deg 0% 100%);
- border: 1px solid hsl(0deg 0% 47%);
- z-index: 2;
- }
+ &.last {
+ border-radius: 0 5px 5px 0;
+ }
- &.disabled {
- cursor: default;
- color: hsl(0deg 0% 80%);
- border-color: hsl(0deg 0% 87%);
- }
+ &.selected {
+ position: relative;
+ background-color: var(
+ --color-background-tab-switcher-ind-tab-selected
+ );
+ color: hsl(0deg 0% 100%);
+ border: 1px solid var(--color-border-tab-switcher-ind-tab-selected);
+ z-index: 2;
}
- &.large .ind-tab {
- width: 100%;
+ &.disabled {
+ cursor: default;
+ color: var(--color-text-tab-switcher-ind-tab-disabled);
+ border-color: var(--color-border-tab-switcher-ind-tab-disabled);
}
+ }
- &.allow-overflow {
- display: flex;
+ &.large .ind-tab {
+ width: 100%;
+ }
- .ind-tab {
- display: flex;
- text-overflow: initial;
- white-space: initial;
- vertical-align: middle;
- }
+ &.allow-overflow {
+ display: flex;
+
+ .ind-tab {
+ display: flex;
+ text-overflow: initial;
+ white-space: initial;
+ vertical-align: middle;
}
}
+}
- .stream_sorter_toggle {
- margin-left: auto;
- }
+.stream_sorter_toggle {
+ margin-left: auto;
}
/* -- unified overlay design component -- */
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index 434c6fc24d3..f64fc285d92 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -692,6 +692,14 @@
--color-background-rendered-markdown-thead: hsl(0deg 0% 93%);
--color-border-rendered-markdown-table: hsl(0deg 0% 80%);
+ /* Tab-switcher colors */
+ --color-background-tab-switcher-ind-tab: hsl(0deg 0% 100%);
+ --color-background-tab-switcher-ind-tab-selected: hsl(0deg 0% 53%);
+ --color-border-tab-switcher-ind-tab: hsl(0deg 0% 80%);
+ --color-border-tab-switcher-ind-tab-selected: hsl(0deg 0% 47%);
+ --color-text-tab-switcher-ind-tab-disabled: hsl(0deg 0% 80%);
+ --color-border-tab-switcher-ind-tab-disabled: hsl(0deg 0% 87%);
+
/* Settings table colors */
--color-border-table-striped: hsl(0deg 0% 87%);
--color-border-table-bordered: hsl(0deg 0% 87%);
@@ -1121,6 +1129,18 @@
--color-background-rendered-markdown-thead: hsl(0deg 0% 0% / 50%);
--color-border-rendered-markdown-table: hsl(0deg 0% 33%);
+ /* Tab-switcher colors */
+ /* The non-selected colors here are shared with numerous other
+ inputs and buttons in dark theme. A refactor here would make
+ more generic names for those colors, and help to clean out
+ the huge stack of selectors in the dark theme CSS file. */
+ --color-background-tab-switcher-ind-tab: hsl(0deg 0% 0% / 20%);
+ --color-background-tab-switcher-ind-tab-selected: hsl(0deg 0% 0% / 50%);
+ --color-border-tab-switcher-ind-tab: hsl(0deg 0% 0% / 60%);
+ --color-border-tab-switcher-ind-tab-selected: hsl(0deg 0% 0% / 90%);
+ --color-text-tab-switcher-ind-tab-disabled: hsl(0deg 0% 42% / 90%);
+ --color-border-tab-switcher-ind-tab-disabled: hsl(0deg 0% 0% / 60%);
+
/* Settings table colors */
--color-border-table-striped: hsl(0deg 0% 0% / 20%);
--color-border-table-bordered: hsl(0deg 0% 0% / 20%);
diff --git a/web/styles/dark_theme.css b/web/styles/dark_theme.css
index aa4d168f1dc..feec6f58478 100644
--- a/web/styles/dark_theme.css
+++ b/web/styles/dark_theme.css
@@ -410,7 +410,6 @@
input[type="url"],
input[type="date"],
textarea,
- .new-style .tab-switcher .ind-tab:not(.selected),
select,
.pill-container,
.user-status-content-wrapper,
@@ -475,16 +474,11 @@
border-color: hsl(0deg 0% 0% / 60%);
}
- .new-style .tab-switcher .ind-tab.selected,
.table-striped thead th {
background-color: hsl(0deg 0% 0% / 50%);
border-color: hsl(0deg 0% 0% / 90%);
}
- .ind-tab.disabled {
- color: hsl(0deg 0% 42% / 90%) !important;
- }
-
& input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,