message_row: Remove tag-level filtering in the bookends CSS.

This commit reduces the selector scope and improves the CSS matching
performance by avoiding tag-level filtering in the bookends CSS.

This also removes the `.sub-unsub-message` class from the bookend as it
served no additional support and the `.bookend`` class can be used
directly instead to maintain the styling of this element.
This commit is contained in:
Sayam Samal
2025-04-12 06:51:22 +05:30
committed by Tim Abbott
parent 94bbfaebe4
commit 93fb84bc98
3 changed files with 14 additions and 14 deletions

View File

@@ -424,8 +424,8 @@
background-color: hsl(51deg 100% 23%); background-color: hsl(51deg 100% 23%);
} }
.sub-unsub-message span::before, .bookend-label::before,
.sub-unsub-message span::after, .bookend-label::after,
.date_row span::before, .date_row span::before,
.date_row span::after { .date_row span::after {
opacity: 0.15; opacity: 0.15;

View File

@@ -1415,19 +1415,19 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
margin-bottom: 0; margin-bottom: 0;
} }
.sub-unsub-message { .bookend {
padding-bottom: 10px; padding-bottom: 10px;
text-align: center; text-align: center;
} }
.sub-unsub-message span { .bookend-label {
font-size: 1em; font-size: 1em;
display: block; display: block;
padding: 4px; padding: 4px;
overflow: hidden; overflow: hidden;
} }
.sub-unsub-message .stream-status { .bookend .stream-status {
opacity: 0.6; opacity: 0.6;
& i { & i {
@@ -1445,8 +1445,8 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
} }
} }
.sub-unsub-message span::before, .bookend-label::before,
.sub-unsub-message span::after, .bookend-label::after,
.date_row span::before, .date_row span::before,
.date_row span::after { .date_row span::after {
display: inline-block; display: inline-block;
@@ -1458,8 +1458,8 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
border-bottom: 1px solid hsl(0deg 0% 0%); border-bottom: 1px solid hsl(0deg 0% 0%);
} }
.sub-unsub-message span::before, .bookend-label::before,
.sub-unsub-message span::after { .bookend-label::after {
width: 50%; width: 50%;
} }
@@ -1474,13 +1474,13 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
margin-right: -1px; margin-right: -1px;
} }
.sub-unsub-message span::before, .bookend-label::before,
.date_row span::before { .date_row span::before {
right: 0.25em; right: 0.25em;
margin-left: -50%; margin-left: -50%;
} }
.sub-unsub-message span::after { .bookend-label::after {
left: 0.25em; left: 0.25em;
margin-right: -50%; margin-right: -50%;
} }

View File

@@ -1,11 +1,11 @@
{{! Client-side Handlebars template for rendering the trailing bookend. }} {{! Client-side Handlebars template for rendering the trailing bookend. }}
<div class="{{#if is_trailing_bookend}}trailing_bookend {{/if}}bookend sub-unsub-message"> <div class="{{#if is_trailing_bookend}}trailing_bookend {{/if}}bookend">
{{#if is_spectator}} {{#if is_spectator}}
<span class="recent-topics-link"> <span class="recent-topics-link bookend-label">
<a href="#recent">{{t "Browse recent conversations" }}</a> <a href="#recent">{{t "Browse recent conversations" }}</a>
</span> </span>
{{else}} {{else}}
<span class="stream-status"> <span class="stream-status bookend-label">
{{#if deactivated}} {{#if deactivated}}
{{t "This channel has been archived." }} {{t "This channel has been archived." }}
{{else if subscribed }} {{else if subscribed }}