Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/216987
Change subject: Fix flash of unstyled title on Special:MobileDiff ...................................................................... Fix flash of unstyled title on Special:MobileDiff Seperate page-summary styles from pagelist (can be, by definition, used in pagelists OR diff, so shouldn't be bundled with pagelist styles). Added new mobile.pagesummary.styles module (loaded with position top) to Special:MobileDiff. Bug: T101798 Change-Id: I26d6598d9a6f9142ed0f02594df47d538722227c --- M includes/Resources.php M includes/specials/SpecialMobileDiff.php M resources/mobile.pagelist.styles/pagelist.less A resources/mobile.pagesummary.styles/pagesummary.less 4 files changed, 74 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/87/216987/1 diff --git a/includes/Resources.php b/includes/Resources.php index ec25274..11a7648 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -82,6 +82,12 @@ 'resources/mobile.pagelist.styles/pagelist.less', ), ), + 'mobile.pagesummary.styles' => $wgMFResourceFileModuleBoilerplate + array( + 'position' => 'top', + 'styles' => array( + 'resources/mobile.pagesummary.styles/pagesummary.less', + ), + ), 'skins.minerva.tablet.styles' => $wgMFResourceFileModuleBoilerplate + array( 'position' => 'top', 'styles' => array( diff --git a/includes/specials/SpecialMobileDiff.php b/includes/specials/SpecialMobileDiff.php index 42303f7..2ffce5f 100644 --- a/includes/specials/SpecialMobileDiff.php +++ b/includes/specials/SpecialMobileDiff.php @@ -112,9 +112,12 @@ $this->targetTitle->getPrefixedText() ) ); - // @todo FIXME: Don't add these styles. This is only needed for the user - // icon to the left of the username - $output->addModuleStyles( 'mobile.special.pagefeed.styles' ); + $output->addModuleStyles( array( + 'mobile.pagesummary.styles', + // @todo FIXME: Don't add these styles. This is only needed for the user + // icon to the left of the username + 'mobile.special.pagefeed.styles' + ) ); // Allow other extensions to load more stuff here Hooks::run( 'BeforeSpecialMobileDiffDisplay', array( &$output, $ctx, $revisions ) ); diff --git a/resources/mobile.pagelist.styles/pagelist.less b/resources/mobile.pagelist.styles/pagelist.less index 25a193c..c6d1162 100644 --- a/resources/mobile.pagelist.styles/pagelist.less +++ b/resources/mobile.pagelist.styles/pagelist.less @@ -1,5 +1,6 @@ @import "minerva.variables"; @import "minerva.mixins"; +@import "../mobile.pagesummary.styles/pagesummary"; @itemPaddingV: .8em; @titleMarginV: .5em; @@ -13,61 +14,6 @@ // Pages // // Styleguide 5. - -// Page summary -// -// Use the page-summary class whenever describing a page but not showing -// the full content of the page. This might be used in a page list or a diff. -// -// Markup: -// <div class="page-summary"> -// <h3>San Francisco</h3> -// <p>San Francisco is a city in California in the USA</p> -// </div> -// -// Styleguide 5.1. -.page-summary { - h2, - h3 { - font: inherit; - font-weight: bold; - // FIXME: Use one of the grays defined in variables.less - color: @colorGray5; - a { - color: inherit; - } - - strong { - text-decoration: underline; - } - } -} - -.list-header { - font-weight: bold; - font-size: .85em; - padding: .5em @contentMargin .4em; - background-color: @grayLightest; - color: @grayMedium; -} - -.list-thumb { - background-repeat: no-repeat; - background-position: center center; - - &.list-thumb-none { - background-color: @grayLightest; - .background-image-svg-quick('noimage'); - } - - &.list-thumb-x { - .background-size( 100%, auto ); - } - - &.list-thumb-y { - .background-size( auto, 100% ); - } -} // Lists of pages // diff --git a/resources/mobile.pagesummary.styles/pagesummary.less b/resources/mobile.pagesummary.styles/pagesummary.less new file mode 100644 index 0000000..515862c --- /dev/null +++ b/resources/mobile.pagesummary.styles/pagesummary.less @@ -0,0 +1,61 @@ +@import "minerva.variables"; +@import "minerva.mixins"; + +// Pages +// +// Styleguide 5. + +// Page summary +// +// Use the page-summary class whenever describing a page but not showing +// the full content of the page. This might be used in a page list or a diff. +// +// Markup: +// <div class="page-summary"> +// <h3>San Francisco</h3> +// <p>San Francisco is a city in California in the USA</p> +// </div> +// +// Styleguide 5.1. +.page-summary { + h2, + h3 { + font: inherit; + font-weight: bold; + // FIXME: Use one of the grays defined in variables.less + color: @colorGray5; + a { + color: inherit; + } + + strong { + text-decoration: underline; + } + } +} + +.list-header { + font-weight: bold; + font-size: .85em; + padding: .5em @contentMargin .4em; + background-color: @grayLightest; + color: @grayMedium; +} + +.list-thumb { + background-repeat: no-repeat; + background-position: center center; + + &.list-thumb-none { + background-color: @grayLightest; + .background-image-svg-quick('noimage'); + } + + &.list-thumb-x { + .background-size( 100%, auto ); + } + + &.list-thumb-y { + .background-size( auto, 100% ); + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/216987 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26d6598d9a6f9142ed0f02594df47d538722227c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits