Make #p-search's start margin dependent on .vector-search-box-show-thumbnail

Before this commit, the following config would result in the search box
not lining up vertically with the tabs:

$wgVectorWvuiSearchOptions = [
  "showThumbnail" => false,
];
```

This commit fixes that by making the start margin dependent on the
`showThumbnail` option.

Bug: T284242
Change-Id: I0132ef8afb3206836d9f16771cbefda5b8bfa3ec
This commit is contained in:
Nicholas Ray 2021-07-14 13:24:50 -06:00
parent 7d917c8dbb
commit ca22b84df4
1 changed files with 7 additions and 1 deletions

View File

@ -485,10 +485,16 @@ body {
}
#p-search {
margin-left: @size-search-expand + @padding-horizontal-tabs;
// T284242#7206507: Widen the suggestion results to the edge of the search
// button at small resolutions.
position: relative;
margin-left: @padding-horizontal-tabs;
}
// Increase the start margin of the search box to account for the input
// expanding on focus.
#p-search.vector-search-box-show-thumbnail {
margin-left: @size-search-expand + @padding-horizontal-tabs;
}
.wvui-typeahead-search__wrapper {