From 589bb21d1c62b563aeb51f4ae33df861a632a151 Mon Sep 17 00:00:00 2001 From: bwang Date: Thu, 22 Jul 2021 12:46:21 -0500 Subject: [PATCH] Remove margin-left: auto on search box to prevent it from switching sides - Scopes margin-left: auto style to vector with user links off only Bug: T286733 Change-Id: If5dbdd89c2f773d6a98bf4ffa76f64409c11fd8d --- resources/skins.vector.styles/layouts/screen.less | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/resources/skins.vector.styles/layouts/screen.less b/resources/skins.vector.styles/layouts/screen.less index c9e6083..d72f279 100644 --- a/resources/skins.vector.styles/layouts/screen.less +++ b/resources/skins.vector.styles/layouts/screen.less @@ -421,16 +421,13 @@ body { // At low resolutions the search must be pushed to the right of the screen // We use @width-comfortable to determine this threshold as we know it's not possible for // personal tools to be on the same line at this resolution. +// FIXME: Remove these styles and the @width-comfortable breakpoint after user links has become the default @media ( max-width: @width-comfortable ) { - // #searchform is only a direct child of #p-search > div before wvui-loads. After - // wvui loads, `.wvui-typeahead-search` becomes the direct child and is the - // element where these styles should apply. - /// FIXME: The first selector (#p-search > #searchform) is for cached HTML. - // Should be removed when T276566 has been in production for a week. - #p-search > #searchform, - #p-search > div > #searchform, - #p-search .wvui-typeahead-search { - margin-left: auto; + body:not( .skin-vector-consolidated-user-links ) { + #p-search > div > #searchform, + #p-search .wvui-typeahead-search { + margin-left: auto; + } } }