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.

modals: Move user profile modal related CSS to web/styles/modal.css.

Sayam Samale5191bcdaf51
diff --git a/web/styles/modal.css b/web/styles/modal.css
index 5e797a30ac2..0717852e9d4 100644
--- a/web/styles/modal.css
+++ b/web/styles/modal.css
@@ -252,6 +252,205 @@
/* Modal-specific CSS belongs below this point. */
+#user-profile-modal {
+ .modal__container {
+ height: var(--user-profile-modal-height);
+ }
+
+ #tab-toggle {
+ font-weight: initial;
+ padding: 0 16px 6px;
+ }
+
+ .name {
+ color: var(--color-user-profile-field-name);
+ font-weight: 600;
+ margin-right: 10px;
+ overflow-wrap: break-word;
+ }
+
+ .value {
+ vertical-align: top;
+ overflow-wrap: anywhere;
+ }
+
+ #exit-sign {
+ /* 24px at 14px/1em */
+ font-size: 1.7143em;
+ line-height: 1;
+ }
+
+ #profile-tab {
+ margin: 1px 5px 0;
+
+ & li.custom_user_field {
+ display: block;
+ }
+ }
+
+ .top {
+ display: flex;
+ justify-content: space-between;
+ }
+
+ @media (width < $ml_min) {
+ .top {
+ flex-direction: column-reverse;
+ }
+ }
+
+ #avatar {
+ display: inline-block;
+ height: 180px;
+ width: 180px;
+ background-size: cover;
+ background-position: center;
+ border-radius: 5px;
+ box-shadow: 0 0 0 1px hsl(0deg 0% 0% / 20%);
+
+ &.guest-avatar::after {
+ outline: 9px solid hsl(0deg 0% 100%);
+ }
+ }
+
+ .user-profile-header-actions {
+ display: flex;
+ gap: 5px;
+ }
+
+ .deactivated-user-icon {
+ vertical-align: middle;
+ font-size: 0.7em;
+ }
+
+ #default-section {
+ vertical-align: top;
+
+ .default-field {
+ margin-bottom: 10px;
+ }
+ }
+
+ & hr {
+ border: 1px solid hsl(0deg 0% 93%);
+ margin: 5px 0;
+ }
+
+ #content {
+ .field-section {
+ margin-bottom: 10px;
+
+ &[data-type="2"] .value {
+ overflow-wrap: break-word;
+ }
+ }
+
+ .rendered_markdown p {
+ margin: 0;
+ }
+ }
+
+ .col-left {
+ padding: 0 10px 0 0;
+ }
+
+ .col-right {
+ width: fit-content;
+ }
+
+ .tab-data {
+ .active {
+ display: block;
+ }
+
+ margin-bottom: var(--user-profile-modal-body-margin-bottom);
+ }
+
+ .group-tab-element-header,
+ .stream-tab-element-header {
+ margin: 0;
+ display: inline-block;
+ font-weight: 600;
+ /* 18px at 16px/1em */
+ font-size: 1.125em;
+ }
+
+ #user-profile-groups-tab,
+ #user-profile-streams-tab {
+ height: calc(
+ var(--user-profile-modal-body-height) -
+ var(--user-profile-modal-body-margin-bottom)
+ );
+ display: grid;
+ grid-template:
+ "alert" auto
+ "top" minmax(0, 1fr)
+ "bottom" auto
+ / minmax(0, 1fr);
+
+ .stream_list_info:has(.banner),
+ .user-profile-group-list-alert:has(.banner) {
+ grid-area: alert;
+ margin-bottom: 8px;
+ }
+
+ .stream-list-loader:not(:empty) {
+ margin: auto; /* center the spinner */
+
+ .loading_indicator_spinner {
+ margin-top: 10px;
+ }
+ }
+
+ .error-message:not(:empty) {
+ color: var(--color-alert-error-red);
+ text-align: center;
+ margin-top: 20px;
+ }
+
+ .stream-list-bottom-section,
+ .group-list-bottom-section {
+ grid-area: bottom;
+ }
+
+ .user_profile_subscribe_widget {
+ display: flex;
+ justify-content: space-between;
+ align-items: baseline;
+ padding-top: 2px;
+ gap: 10px;
+ }
+
+ .dropdown_widget_value {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+
+ .group-list-top-section,
+ .stream-list-top-section {
+ grid-area: top;
+ margin-top: 0.3125em;
+ margin-bottom: 0.75em;
+ }
+
+ @media (width < $md_min) {
+ .group-list-top-section,
+ .stream-list-top-section {
+ display: block;
+
+ .header-section {
+ width: 100%;
+ }
+ }
+ }
+
+ .manage-profile-tab-footer:not(.manage-profile-tab-active) {
+ display: none;
+ }
+}
+
.folder-channels-list-header {
margin: 0;
font-weight: 600;
diff --git a/web/styles/popovers.css b/web/styles/popovers.css
index 30a9712f5cb..03a41a0fc30 100644
--- a/web/styles/popovers.css
+++ b/web/styles/popovers.css
@@ -416,194 +416,6 @@ ul.popover-group-menu-member-list {
}
}
-#user-profile-modal {
- .modal__container {
- height: var(--user-profile-modal-height);
- }
-
- #tab-toggle {
- font-weight: initial;
- padding: 0 16px 6px;
- }
-
- .name {
- color: var(--color-user-profile-field-name);
- font-weight: 600;
- margin-right: 10px;
- overflow-wrap: break-word;
- }
-
- .value {
- vertical-align: top;
- overflow-wrap: anywhere;
- }
-
- #exit-sign {
- /* 24px at 14px/1em */
- font-size: 1.7143em;
- line-height: 1;
- }
-
- #profile-tab {
- margin: 1px 5px 0;
-
- & li.custom_user_field {
- display: block;
- }
- }
-
- .top {
- display: flex;
- justify-content: space-between;
- }
-
- @media (width < $ml_min) {
- .top {
- flex-direction: column-reverse;
- }
- }
-
- #avatar {
- display: inline-block;
- height: 180px;
- width: 180px;
- background-size: cover;
- background-position: center;
- border-radius: 5px;
- box-shadow: 0 0 0 1px hsl(0deg 0% 0% / 20%);
-
- &.guest-avatar::after {
- outline: 9px solid hsl(0deg 0% 100%);
- }
- }
-
- .user-profile-header-actions {
- display: flex;
- gap: 5px;
- }
-
- .deactivated-user-icon {
- vertical-align: middle;
- font-size: 0.7em;
- }
-
- #default-section {
- vertical-align: top;
-
- .default-field {
- margin-bottom: 10px;
- }
- }
-
- & hr {
- border: 1px solid hsl(0deg 0% 93%);
- margin: 5px 0;
- }
-
- #content {
- .field-section {
- margin-bottom: 10px;
-
- &[data-type="2"] .value {
- overflow-wrap: break-word;
- }
- }
-
- .rendered_markdown p {
- margin: 0;
- }
- }
-
- .col-left {
- padding: 0 10px 0 0;
- }
-
- .col-right {
- width: fit-content;
- }
-
- .tab-data {
- .active {
- display: block;
- }
-
- margin-bottom: var(--user-profile-modal-body-margin-bottom);
- }
-
- .group-tab-element-header,
- .stream-tab-element-header {
- margin: 0;
- display: inline-block;
- font-weight: 600;
- /* 18px at 16px/1em */
- font-size: 1.125em;
- }
-
- #user-profile-groups-tab,
- #user-profile-streams-tab {
- height: calc(
- var(--user-profile-modal-body-height) -
- var(--user-profile-modal-body-margin-bottom)
- );
- display: grid;
- grid-template:
- "alert" auto
- "top" minmax(0, 1fr)
- "bottom" auto
- / minmax(0, 1fr);
-
- .stream_list_info:has(.banner),
- .user-profile-group-list-alert:has(.banner) {
- grid-area: alert;
- margin-bottom: 8px;
- }
-
- .stream-list-loader:not(:empty) {
- margin: auto; /* center the spinner */
-
- .loading_indicator_spinner {
- margin-top: 10px;
- }
- }
-
- .error-message:not(:empty) {
- color: var(--color-alert-error-red);
- text-align: center;
- margin-top: 20px;
- }
-
- .stream-list-bottom-section,
- .group-list-bottom-section {
- grid-area: bottom;
- }
-
- .user_profile_subscribe_widget {
- display: flex;
- justify-content: space-between;
- align-items: baseline;
- padding-top: 2px;
- gap: 10px;
- }
-
- .dropdown_widget_value {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
-
- .group-list-top-section,
- .stream-list-top-section {
- grid-area: top;
- margin-top: 0.3125em;
- margin-bottom: 0.75em;
- }
-
- .manage-profile-tab-footer:not(.manage-profile-tab-active) {
- display: none;
- }
-}
-
@media (width < $md_min) {
.popover-flex {
position: absolute;
@@ -638,17 +450,6 @@ ul.popover-group-menu-member-list {
position: static;
margin-right: 0;
}
-
- #user-profile-modal {
- .group-list-top-section,
- .stream-list-top-section {
- display: block;
-
- .header-section {
- width: 100%;
- }
- }
- }
}
.popover.top .arrow::after {