user_profile: Align privacy icons with stream names in popover.

This commit resolves the misalignment issue for the privacy icons and
stream names along with their horizontal alignment with the subscription
button. The icons were previously not properly placed with the text,
causing a visual discrepancy.

While we're at it, we replace the first-of-type/last-of-type styles
with normal classes elements, which is more performant and readable.

Fixed #31521.

Co-authored-by: Aditya Kumar Kasaudhan <74228301+Aditya8840@users.noreply.github.com>
This commit is contained in:
userAdityaa
2025-02-17 22:23:21 +05:30
committed by Tim Abbott
parent aee8449d64
commit 15516e6a6d
2 changed files with 20 additions and 13 deletions

View File

@@ -542,7 +542,8 @@ ul.popover-group-menu-member-list {
}
.stream-privacy {
display: inline-block;
display: flex;
align-items: center;
}
.filter-icon i {
@@ -635,17 +636,21 @@ ul.popover-group-menu-member-list {
& td {
padding: 4px 0;
&:first-of-type {
padding-left: 10px;
}
&:last-of-type {
padding-right: 10px;
}
&.remove_subscription,
&.remove_member {
text-align: right;
padding-right: 10px;
}
&.user-profile-channel-row,
&.user-profile-group-row {
text-align: left;
padding-left: 10px;
& .user-profile-channel-container {
display: flex;
gap: 3px;
}
}
}
}

View File

@@ -1,9 +1,11 @@
<tr data-stream-id="{{stream_id}}">
<td class="user-profile-channel-row">
<div class="user-profile-channel-container">
<span class="stream-privacy-original-color-{{stream_id}} stream-privacy filter-icon" style="color: {{stream_color}}">
{{> stream_privacy . }}
</span>
<a class="user-profile-channel-list-item" href="{{stream_edit_url}}">{{name}}</a>
</div>
</td>
{{#if show_unsubscribe_button}}
<td class="remove_subscription">