r78232 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78231‎ | r78232 | r78233 >
Date:00:30, 12 December 2010
Author:simetrical
Status:ok (Comments)
Tags:
Comment:
Make ul.gallery block, not inline-block

As suggested by fomafix at
<https://bugzilla.wikimedia.org/show_bug.cgi?id=3276#c33&gt;. This makes
it play nicer with floats, at least in Firefox 4, and doesn't seem to
otherwise break stuff (but I haven't tested in many browsers).
Modified paths:
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/shared.css
@@ -793,6 +793,13 @@
794794 border: solid 2px white;
795795 display: -moz-inline-box;
796796 }
 797+
 798+ul.gallery, li.gallerybox {
 799+ display: inline-block;
 800+ zoom: 1;
 801+ *display: inline;
 802+}
 803+
797804 ul.gallery {
798805 margin: 2px;
799806 padding: 2px;
@@ -800,12 +807,6 @@
801808 display: block;
802809 }
803810
804 -ul.gallery, li.gallerybox {
805 - display: inline-block;
806 - zoom: 1;
807 - *display: inline;
808 -}
809 -
810811 li.gallerycaption {
811812 font-weight: bold;
812813 text-align: center;

Follow-up revisions

RevisionCommit summaryAuthorDate
r80214Removing redundant line (Follow-up r78232)...krinkle00:34, 14 January 2011
r80216Oops, FF2 doesn't support inline-block display. Restoring that one....krinkle00:39, 14 January 2011
r805261.17: MFT r78232, r78253, r79722, r79732, r79785, r79817, r79864, r79891, r79...catrope22:19, 18 January 2011

Comments

#Comment by Fomafix (talk | contribs)   14:40, 7 January 2011

This is a follow-up of r77411 an should be also included in 1.17.

#Comment by Trevor Parscal (WMF) (talk | contribs)   00:20, 13 January 2011

Even IE 5.5 is happy. :)

#Comment by Krinkle (talk | contribs)   01:36, 13 January 2011

I could be missing something but it seems this moves the block a few lines up. Still display inline-block, not changed to block...

And in r77411:

+ul.gallery {
 	margin: 2px;
 	padding: 2px;
 	background-color: white;
+	display: block;
 }
 
+ul.gallery, li.gallerybox {
+	display: inline-block;
+	zoom: 1;
+	*display: inline;
 }

which also has inline-block overriding display block.


I'm missing the "Make ul.gallery block, not inline-block".

#Comment by Simetrical (talk | contribs)   23:38, 13 January 2011

Look at the rule it was moved above. Originally, the first rule specified display: block and the second specified display: inline-block for ul.gallery, so it was inline-block. I switched the order, so the display: block rule wins. It would probably be clearer to make a separate rule for li.gallerybox and duplicate the zoom rule and star hack.

Status & tagging log