r82748 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82747‎ | r82748 | r82749 >
Date:21:16, 24 February 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
Removed white-background from ul.gallery; Updated commonPrint gallery styles

Since a while now proper margins and overflow prevent underlines and stuff from shining through other elements (such as tables, thumbs and galleries). Therefore there's no longer a need to force a white-background which caused ugly galleries on (parts of) pages with a non-white background (ie. a table.wikitable, or div.toccolours or Commons' {{Information}} template)

The printstyles were outdated (stil targeted <table> instead of the new fluid galleries' <ul>). Updated now and white background removed there as well

* This commit fixes (bug 27458) Remove white background-color from ul.gallery
* r65923 introduced print-style for galleries (to make them look like galleries instead of tables)
* r77411 made galleries fluid and therewith changed the element from <table> to <ul>
Modified paths:
  • /trunk/phase3/skins/common/commonPrint.css (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/commonPrint.css
@@ -233,31 +233,35 @@
234234
235235 #siteNotice { display: none; }
236236
237 -/* image galleries */
238 -table.gallery {
239 - border: 1px solid #ccc;
240 - margin: 2px;
241 - padding: 2px;
242 - background-color: white;
243 - border-collapse: collapse;
244 -}
245 -
246 -table.gallery tr {
 237+/* Galleries (see shared.css for more info) */
 238+li.gallerybox {
247239 vertical-align: top;
 240+ background-color: #f9f9f9;
 241+ border: solid 2px white;
 242+ display: -moz-inline-box;
 243+ display: inline-block;
248244 }
249245
250 -table.gallery td {
251 - vertical-align: top;
252 - padding: 1px;
253 - border: 1px solid #ccc;
 246+ul.gallery, li.gallerybox {
 247+ zoom: 1;
 248+ *display: inline;
254249 }
255250
256 -div.gallerybox {
 251+ul.gallery {
257252 margin: 2px;
 253+ padding: 2px;
 254+ display: block;
258255 }
259256
260 -div.gallerybox div.thumb {
 257+li.gallerycaption {
 258+ font-weight: bold;
261259 text-align: center;
 260+ display: block;
 261+ word-wrap: break-word;
 262+}
 263+
 264+li.gallerybox div.thumb {
 265+ text-align: center;
262266 border: 1px solid #ccc;
263267 margin: 2px;
264268 }
@@ -266,8 +270,8 @@
267271 overflow: hidden;
268272 font-size: 94%;
269273 padding: 2px 4px;
 274+ word-wrap: break-word;
270275 }
271 -
272276 /*
273277 ** Diff rendering
274278 */
Index: trunk/phase3/skins/common/shared.css
@@ -747,6 +747,7 @@
748748
749749 /* Galleries */
750750 /* These display attributes look nonsensical, but are needed to support IE and FF2 */
 751+/* Don't forget to update commonPrint.css */
751752 li.gallerybox {
752753 vertical-align: top;
753754 background-color: #f9f9f9;
@@ -763,7 +764,6 @@
764765 ul.gallery {
765766 margin: 2px;
766767 padding: 2px;
767 - background-color: white;
768768 display: block;
769769 }
770770

Follow-up revisions

RevisionCommit summaryAuthorDate
r85354MFT r82518, r82530, r82538, r82547, r82550, r82565, r82572, r82608, r82696, r...demon18:25, 4 April 2011
r922781.17wmf1 MFT r82748, r87840, r89401, r89697reedy19:01, 15 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65923Improve CSS for print versions...hartman00:08, 5 May 2010
r77411Give image <gallery>s fluid width...simetrical00:11, 29 November 2010

Comments

#Comment by Kaldari (talk | contribs)   20:27, 4 July 2011

Why do we want to keep the color styling on gallerybox if we're getting rid of it for gallery?

Status & tagging log