From 7cfcb3641b78276ed2f6ef529cbda885084214c2 Mon Sep 17 00:00:00 2001 From: Nicholas Ray Date: Fri, 22 Feb 2019 10:59:56 -0700 Subject: [PATCH] Refactor LanguageOverlay styles In I629245100f4ca430a88e450939b90d075e7021f1, languageOverlay styles and LanguageSearcher styles were split into two different files. This commit mimics that change in skinStyles. All languageOverlay specific styles were moved to languageOverlay.less, while all LanguageSearcher styles were moved to LanguageSearcher.less. Other chagnes: * Changed a reference in init.js Bug: T215657 Change-Id: I395a61cd6051ad5c6b6601205f112b55f5ab8273 --- resources/skins.minerva.scripts/init.js | 2 +- skin.json | 5 +++-- .../{LanguageOverlay.less => LanguageSearcher.less} | 7 +------ .../languageOverlay/languageOverlay.less | 11 +++++++++++ 4 files changed, 16 insertions(+), 9 deletions(-) rename skinStyles/mobile.languages.structured/{LanguageOverlay.less => LanguageSearcher.less} (79%) create mode 100644 skinStyles/mobile.startup/languageOverlay/languageOverlay.less diff --git a/resources/skins.minerva.scripts/init.js b/resources/skins.minerva.scripts/init.js index 32b3d40c2..70271c981 100644 --- a/resources/skins.minerva.scripts/init.js +++ b/resources/skins.minerva.scripts/init.js @@ -56,7 +56,7 @@ } /** - * Hijack the Special:Languages link and replace it with a trigger to a LanguageOverlay + * Hijack the Special:Languages link and replace it with a trigger to a languageOverlay * that displays the same data * @ignore */ diff --git a/skin.json b/skin.json index b5618e4c7..c0b8bd49c 100644 --- a/skin.json +++ b/skin.json @@ -127,14 +127,15 @@ "skinStyles/mediawiki.hlist/minerva.less" ], "mobile.languages.structured": [ - "skinStyles/mobile.languages.structured/LanguageOverlay.less" + "skinStyles/mobile.languages.structured/LanguageSearcher.less" ], "mobile.startup": [ "skinStyles/mobile.startup/skin.less", "skinStyles/mobile.startup/toast.less", "skinStyles/mobile.startup/Overlay.less", "skinStyles/mobile.startup/toggle.less", - "skinStyles/mobile.startup/search/SearchOverlay.less" + "skinStyles/mobile.startup/search/SearchOverlay.less", + "skinStyles/mobile.startup/languageOverlay/languageOverlay.less" ], "mediawiki.special": [ "skinStyles/mobile.special.styles/minerva.less" diff --git a/skinStyles/mobile.languages.structured/LanguageOverlay.less b/skinStyles/mobile.languages.structured/LanguageSearcher.less similarity index 79% rename from skinStyles/mobile.languages.structured/LanguageOverlay.less rename to skinStyles/mobile.languages.structured/LanguageSearcher.less index de47f1db6..a8e9cdc61 100644 --- a/skinStyles/mobile.languages.structured/LanguageOverlay.less +++ b/skinStyles/mobile.languages.structured/LanguageSearcher.less @@ -1,12 +1,7 @@ @import '../../minerva.less/minerva.variables'; @media screen and ( min-width: @width-breakpoint-desktop ) { - .language-overlay { - .overlay-content { - margin: 0; - min-width: 100%; - } - + .language-searcher { .panel-body, .overlay-content-body { margin-left: auto; diff --git a/skinStyles/mobile.startup/languageOverlay/languageOverlay.less b/skinStyles/mobile.startup/languageOverlay/languageOverlay.less new file mode 100644 index 000000000..b6a40afa4 --- /dev/null +++ b/skinStyles/mobile.startup/languageOverlay/languageOverlay.less @@ -0,0 +1,11 @@ +@import '../../../minerva.less/minerva.variables'; + +@media screen and ( min-width: @width-breakpoint-desktop ) { + .language-overlay { + // FIXME: Consolidate this into skinStyles/Overlay.less + .overlay-content { + margin: 0; + min-width: 100%; + } + } +}