Removed white-background from ul.gallery; Updated commonPrint gallery styles
authorKrinkle <krinkle@users.mediawiki.org>
Thu, 24 Feb 2011 21:16:41 +0000 (21:16 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Thu, 24 Feb 2011 21:16:41 +0000 (21:16 +0000)
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>

skins/common/commonPrint.css
skins/common/shared.css

index 2213400..67fb41f 100644 (file)
@@ -233,30 +233,34 @@ span.texhtml { font-family: serif; }
 
 #siteNotice { display: none; }
 
-/* image galleries */
-table.gallery {
-       border: 1px solid #ccc;
-       margin: 2px;
-       padding: 2px;
-       background-color: white;
-       border-collapse: collapse;
-}
-
-table.gallery tr {
+/* Galleries (see shared.css for more info) */
+li.gallerybox {
        vertical-align: top;
+       background-color: #f9f9f9;
+       border: solid 2px white;
+       display: -moz-inline-box;
+       display: inline-block;
 }
 
-table.gallery td {
-       vertical-align: top;
-       padding: 1px;
-       border: 1px solid #ccc;
+ul.gallery, li.gallerybox {
+       zoom: 1;
+       *display: inline;
 }
 
-div.gallerybox {
+ul.gallery {
        margin: 2px;
+       padding: 2px;
+       display: block;
 }
 
-div.gallerybox div.thumb {
+li.gallerycaption {
+       font-weight: bold;
+       text-align: center;
+       display: block;
+       word-wrap: break-word;
+}
+
+li.gallerybox div.thumb {
        text-align: center;
        border: 1px solid #ccc;
        margin: 2px;
@@ -266,8 +270,8 @@ div.gallerytext {
        overflow: hidden;
        font-size: 94%;
        padding: 2px 4px;
+       word-wrap: break-word;
 }
-
 /*
 ** Diff rendering
 */
index 0f15395..4518276 100644 (file)
@@ -747,6 +747,7 @@ table.mw_metadata td {
 
 /* Galleries */
 /* These display attributes look nonsensical, but are needed to support IE and FF2 */
+/* Don't forget to update commonPrint.css */
 li.gallerybox {
        vertical-align: top;
        background-color: #f9f9f9;
@@ -763,7 +764,6 @@ ul.gallery, li.gallerybox {
 ul.gallery {
        margin: 2px;
        padding: 2px;
-       background-color: white;
        display: block;
 }