From 4a4f8f279ea5e7e37dd4d7cb0e8389f4a0f3a090 Mon Sep 17 00:00:00 2001 From: Matthias Mullie Date: Wed, 14 Dec 2022 15:29:31 +0100 Subject: [PATCH] Always show search results at full width Ieebc40073eb3d0c8a56ebc8aec3f060199943ddc lowers the breakpoint at which search will break into 2 columns (search + interwiki), in large part because the 2nd column will also be occupied by Extension:SearchVue's side panel. On mobile, Extension:SearchVue presents differently (directly below a search result), so there's not as much need for a 2nd column this early - wider search results are prefered. Bug: T321377 Change-Id: I22c46cfad2e054be679d79cce9b8d1ae04e3c6f1 --- skin.json | 3 +++ .../minerva.less | 16 ++++++++++++++++ .../mediawiki.special.search.styles/minerva.less | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 skinStyles/mediawiki.special.search.interwikiwidget.styles/minerva.less diff --git a/skin.json b/skin.json index 92f2b0e1b..5cef59dd2 100644 --- a/skin.json +++ b/skin.json @@ -212,6 +212,9 @@ "mediawiki.special.search.styles": [ "skinStyles/mediawiki.special.search.styles/minerva.less" ], + "mediawiki.special.search.interwikiwidget.styles": [ + "skinStyles/mediawiki.special.search.interwikiwidget.styles/minerva.less" + ], "mediawiki.skinning.content.parsoid": [ "skinStyles/mediawiki.skinning.content.parsoid/minerva.less" ], diff --git a/skinStyles/mediawiki.special.search.interwikiwidget.styles/minerva.less b/skinStyles/mediawiki.special.search.interwikiwidget.styles/minerva.less new file mode 100644 index 000000000..e2dcef57c --- /dev/null +++ b/skinStyles/mediawiki.special.search.interwikiwidget.styles/minerva.less @@ -0,0 +1,16 @@ +@import '../../minerva.less/minerva.variables.less'; + +.mw-searchresults-has-iw { + // stylelint-disable-next-line selector-max-id + #mw-interwiki-results { + margin-left: 0; + width: 100%; + } + + .iw-resultset:nth-child( 1 ) { + .iw-result__header { + border-top: solid 1px #ccc; + padding-top: 12px; + } + } +} diff --git a/skinStyles/mediawiki.special.search.styles/minerva.less b/skinStyles/mediawiki.special.search.styles/minerva.less index fb4bcbd0d..9defcafd3 100644 --- a/skinStyles/mediawiki.special.search.styles/minerva.less +++ b/skinStyles/mediawiki.special.search.styles/minerva.less @@ -6,6 +6,11 @@ display: none; } +.mw-search-results-container, +.mw-search-results-info { + width: 100%; +} + @media all and ( min-width: @width-breakpoint-tablet ) { #search { // stylelint-disable-line selector-max-id display: none;