From ad4097342b85e27cfd4128d0ef524e7fa91cfff8 Mon Sep 17 00:00:00 2001 From: YashRE42 <33805964+YashRE42@users.noreply.github.com> Date: Sat, 18 Apr 2020 16:11:08 +0530 Subject: [PATCH] navbar: Use flex-grow to align search_icon to right. This change allows us to align the search icon to the right end of the navbar, without having to rely on the `margin-left: auto` trick. This is better because it's more convenient to let flex handle the positioning and will, hopefully, be more resilient to breakages. --- static/styles/zulip.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/styles/zulip.scss b/static/styles/zulip.scss index ba6e972a39..7155f7e00e 100644 --- a/static/styles/zulip.scss +++ b/static/styles/zulip.scss @@ -1425,6 +1425,9 @@ div.focused_table { &:not(.stream) { text-overflow: ellipsis; } + &:nth-last-child(2) { + flex-grow: 1; + } i { margin-right: 3px; } @@ -1519,8 +1522,8 @@ div.focused_table { .search_closed { flex: 0; // makes sure search icon is always visible - margin-left: auto; // aligns search icon to right end of box margin-right: 15px; + cursor: pointer; font-size: 20px;