Sumit has uploaded a new change for review. https://gerrit.wikimedia.org/r/194512
Change subject: Category view modified to use column width ...................................................................... Category view modified to use column width Category view used css media queries to set column count to 3 beyond 768px and reduces the count to 1 below it. This behaviour has been changed by setting the column width to 300px and allowing the column number to adjust automatically. As a result, media queries have been removed. See https://css-tricks.com/almanac/properties/c/column-width/ Follow up on https://gerrit.wikimedia.org/r/#/c/187952/ Bug: T55130 Change-Id: I20b68dea8f64b2d07866f4aa20ef83941c879697 --- M resources/src/mediawiki.action/mediawiki.action.view.categoryPage.less M resources/src/mediawiki.less/mediawiki.mixins.less 2 files changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/12/194512/1 diff --git a/resources/src/mediawiki.action/mediawiki.action.view.categoryPage.less b/resources/src/mediawiki.action/mediawiki.action.view.categoryPage.less index 1f0c626..74b5a5f 100644 --- a/resources/src/mediawiki.action/mediawiki.action.view.categoryPage.less +++ b/resources/src/mediawiki.action/mediawiki.action.view.categoryPage.less @@ -1,14 +1,11 @@ @import "mediawiki.mixins"; .mw-category { - .column-count(1); - + .column-count(3); + .column-width(300px); .mw-category-group { - .column-break-inside(avoid); - } -} -@media screen and ( min-width: 768px ) { - .mw-category { - .column-count(3); + li { + .column-break-inside(avoid); + } } } diff --git a/resources/src/mediawiki.less/mediawiki.mixins.less b/resources/src/mediawiki.less/mediawiki.mixins.less index 349a721..903f8c1 100644 --- a/resources/src/mediawiki.less/mediawiki.mixins.less +++ b/resources/src/mediawiki.less/mediawiki.mixins.less @@ -76,7 +76,6 @@ .column-count(@value) { -webkit-column-count: @value; -moz-column-count: @value; - -o-column-count: @value; column-count: @value; } @@ -85,3 +84,8 @@ page-break-inside: @value; // Firefox 1.5+ break-inside: @value; // IE 10+ } +.column-width(@value) { + -webkit-column-width: @value;// Chrome Any, Safari 3+, Opera 11.1+ + -moz-column-width: @value;// Firefox 1.5+ + column-width: @value;// IE 10+ +} -- To view, visit https://gerrit.wikimedia.org/r/194512 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I20b68dea8f64b2d07866f4aa20ef83941c879697 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sumit <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
