From ea60fee0ac29945dbb2bd1633209f7a26478e0be Mon Sep 17 00:00:00 2001 From: Shubham Padia Date: Mon, 2 Sep 2024 17:29:49 +0000 Subject: [PATCH] css: Use classname for subscribe-to-more-streams icon styles. Having the selector there affects the performance. See https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719 for more details. --- web/styles/left_sidebar.css | 2 +- web/templates/subscribe_to_more_streams.hbs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css index 6a1f1b30c4..73afeeebcf 100644 --- a/web/styles/left_sidebar.css +++ b/web/styles/left_sidebar.css @@ -343,7 +343,7 @@ li.show-more-topics { margin: 5px auto var(--left-sidebar-bottom-scrolling-buffer) var(--left-sidebar-toggle-width-offset); - & i { + .subscribe-more-icon { min-width: 19px; text-align: center; diff --git a/web/templates/subscribe_to_more_streams.hbs b/web/templates/subscribe_to_more_streams.hbs index e7fffba4bd..677158d2ba 100644 --- a/web/templates/subscribe_to_more_streams.hbs +++ b/web/templates/subscribe_to_more_streams.hbs @@ -1,16 +1,16 @@ {{#if exactly_one_unsubscribed_stream}} - + {{~t "Browse 1 more channel" ~}} {{else if can_subscribe_stream_count}} - + {{~t "Browse {can_subscribe_stream_count} more channels" ~}} {{else if can_create_streams}} - + {{~t "Create a channel" ~}} {{/if}}