r96474 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96473‎ | r96474 | r96475 >
Date:19:22, 7 September 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
Backport r95340, partial r94773 from trunk for bug 30485: set override styles for hieroglyphic layout tables to avoid interference from 'wikitable' class on a surrounding table.

This adds the ext.wikihiero.css styles (slightly modified for the different class name on the older code). No other changes made, so some of the new styles are redundant to inline attributes/styles, but should have no ill effects.
Modified paths:
  • /branches/REL1_17/extensions/wikihiero/modules (added) (history)
  • /branches/REL1_17/extensions/wikihiero/modules/ext.wikihiero.css (added) (history)
  • /branches/REL1_17/extensions/wikihiero/wikihiero.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/wikihiero/wikihiero.php
@@ -26,6 +26,7 @@
2727
2828 // Register MediaWiki extension
2929 $wgHooks['ParserFirstCallInit'][] = 'WH_Register';
 30+$wgHooks['BeforePageDisplay'][] = 'wfHieroBeforePageDisplay';
3031 $wgExtensionCredits['parserhook'][] = array(
3132 'path' => __FILE__,
3233 'name' => 'WikiHiero',
@@ -35,6 +36,12 @@
3637 );
3738 $wgExtensionMessagesFiles['Wikihiero'] = dirname(__FILE__) . '/wikihiero.i18n.php';
3839
 40+$wgResourceModules['ext.wikihiero'] = array(
 41+ 'styles' => 'ext.wikihiero.css',
 42+ 'localBasePath' => dirname( __FILE__ ) . '/modules',
 43+ 'remoteExtPath' => 'wikihiero/modules',
 44+);
 45+
3946 function WH_Register( &$parser ) {
4047 $parser->setHook( 'hiero', 'WikiHieroLoader' );
4148 return true;
@@ -48,6 +55,11 @@
4956 }
5057 }
5158
 59+function wfHieroBeforePageDisplay( $out ) {
 60+ $out->addModuleStyles( 'ext.wikihiero' );
 61+ return true;
 62+}
 63+
5264 // MediaWiki entry point
5365 function WikiHieroLoader( $text, $attribs, $parser ) {
5466 WikiHieroLoad();
Index: branches/REL1_17/extensions/wikihiero/modules/ext.wikihiero.css
@@ -0,0 +1,15 @@
 2+.mw-hierotable {
 3+ border: 0 !important;
 4+ border-spacing: 0 !important;
 5+}
 6+
 7+.mw-hiero-outer {
 8+ display: inline;
 9+}
 10+
 11+.mw-hierotable td {
 12+ border: 0 !important;
 13+ padding: 0 !important;
 14+ text-align: center !important;
 15+ vertical-align: middle !important;
 16+}
Property changes on: branches/REL1_17/extensions/wikihiero/modules/ext.wikihiero.css
___________________________________________________________________
Added: svn:eol-style
117 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r96477Backport r95340, partial r94773 from trunk for bug 30485: set override styles...brion19:43, 7 September 2011
r96481Merge r96474 from 1.17 -- Backport r95340, partial r94773 from trunk for bug ......brion19:51, 7 September 2011
r107669* more specific selectors for wikitable - don't inherit properties to nested ...danny_b23:23, 30 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94773WikiHiero: replaced inline formatting with CSS, now validates as HTML5maxsem16:42, 17 August 2011
r95340* (bug 30485) Fixed interference between wikihiero extension and 'wikitable' ...brion21:52, 23 August 2011

Comments

#Comment by MaxSem (talk | contribs)   19:31, 7 September 2011

While it barely works this way, 1.17 still uses ol' good stuff like "

 

"; - I suggest you wait a few more days for my rewrite to be finished, then deploy all the changes (should be pretty straightforward, just revert r95164 that isn't going to work in 1.17).

#Comment by Brion VIBBER (talk | contribs)   19:46, 7 September 2011

The purpose here is to fix the bug without making big changes, so it remains a low-risk thing that's safe to toss into deployment -- the stuff still being in the markup doesn't harm anything, and avoids changing any actual markup in current page content. Do feel free to push the rewrite over once it's all nice and purty too, though! :)

Status & tagging log