Glaisher has uploaded a new change for review.
https://gerrit.wikimedia.org/r/208150
Change subject: Revert "Use CSS columns instead of tables in
Special:SpecialPages"
......................................................................
Revert "Use CSS columns instead of tables in Special:SpecialPages"
This reverts commit dc40debaea2effd46a43c88d0fc925b3550c829b.
Bug: T97026
Change-Id: I1475a61037e6ece536b2b4e26f4d606d5d3828f7
---
M includes/specials/SpecialSpecialpages.php
M resources/src/mediawiki.special/mediawiki.special.css
2 files changed, 30 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/50/208150/1
diff --git a/includes/specials/SpecialSpecialpages.php
b/includes/specials/SpecialSpecialpages.php
index c3234e1..ed3ad5b 100644
--- a/includes/specials/SpecialSpecialpages.php
+++ b/includes/specials/SpecialSpecialpages.php
@@ -96,14 +96,22 @@
$includesCachedPages = false;
foreach ( $groups as $group => $sortedPages ) {
+ $total = count( $sortedPages );
+ $middle = ceil( $total / 2 );
+ $count = 0;
$out->wrapWikiMsg(
"<h2 class=\"mw-specialpagesgroup\"
id=\"mw-specialpagesgroup-$group\">$1</h2>\n",
"specialpages-group-$group"
);
$out->addHTML(
- Html::openElement( 'div', array( 'class' =>
'mw-specialpages-list' ) )
- . '<ul>'
+ Html::openElement(
+ 'table',
+ array( 'style' => 'width:100%;',
'class' => 'mw-specialpages-table' )
+ ) . "\n" .
+ Html::openElement( 'tr' ) . "\n" .
+ Html::openElement( 'td', array( 'style' =>
'width:30%;vertical-align:top' ) ) . "\n" .
+ Html::openElement( 'ul' ) . "\n"
);
foreach ( $sortedPages as $desc => $specialpage ) {
list( $title, $restricted, $cached ) =
$specialpage;
@@ -124,10 +132,21 @@
array( 'class' => implode( ' ',
$pageClasses ) ),
$link
) . "\n" );
+
+ # Split up the larger groups
+ $count++;
+ if ( $total > 3 && $count == $middle ) {
+ $out->addHTML(
+ Html::closeElement( 'ul' ) .
Html::closeElement( 'td' ) .
+ Html::element( 'td', array(
'style' => 'width:10%' ), '' ) .
+ Html::openElement( 'td', array(
'style' => 'width:30%' ) ) . Html::openElement( 'ul' ) . "\n"
+ );
+ }
}
$out->addHTML(
- Html::closeElement( 'ul' ) .
- Html::closeElement( 'div' )
+ Html::closeElement( 'ul' ) .
Html::closeElement( 'td' ) .
+ Html::element( 'td', array( 'style' =>
'width:30%' ), '' ) .
+ Html::closeElement( 'tr' ) .
Html::closeElement( 'table' ) . "\n"
);
}
diff --git a/resources/src/mediawiki.special/mediawiki.special.css
b/resources/src/mediawiki.special/mediawiki.special.css
index a13ec3c..d245726 100644
--- a/resources/src/mediawiki.special/mediawiki.special.css
+++ b/resources/src/mediawiki.special/mediawiki.special.css
@@ -84,10 +84,13 @@
font-weight: bold;
}
-.mw-specialpages-list {
- -webkit-columns: 16em 2;
- -moz-columns: 16em 2;
- columns: 16em 2;
+.mw-specialpages-table {
+ margin-top: -1em;
+ margin-bottom: 1em;
+}
+
+.mw-specialpages-table td {
+ vertical-align: top;
}
/* Special:Statistics */
--
To view, visit https://gerrit.wikimedia.org/r/208150
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1475a61037e6ece536b2b4e26f4d606d5d3828f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits