From: Tim Starling Date: Wed, 13 Dec 2006 05:53:06 +0000 (+0000) Subject: Set an explicit class on framed thumbnail inner divs and images, changed some CSS... X-Git-Tag: 1.31.0-rc.0~54918 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=0219f3490f4051fc44e518b8d13bedbf98ae4533;p=lhc%2Fweb%2Fwiklou.git Set an explicit class on framed thumbnail inner divs and images, changed some CSS to use these instead of using descendent selectors. The immediate application is the ImageMap extension. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9f87ef678d..8bcf68d9a4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -294,6 +294,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN readable error message displayed by UI code. * Added Title::isSubpage() * (bug 8241) Don't consider user pages of User:Foo.css to be CSS subpages +* Set an explicit class on framed thumbnail inner divs and images, changed some + CSS to use these instead of using descendent selectors. + == Languages updated == diff --git a/includes/Linker.php b/includes/Linker.php index d74770cc84..b3a24e1bdb 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -605,7 +605,7 @@ class Linker { $magnifyalign = $wgContLang->isRTL() ? 'left' : 'right'; $textalign = $wgContLang->isRTL() ? ' style="text-align:right"' : ''; - $s = "
"; + $s = "
"; if( $thumbUrl == '' ) { // Couldn't generate thumbnail? Scale the image client-side. $thumbUrl = $img->getViewURL(); @@ -624,7 +624,7 @@ class Linker { $s .= ''. ''.$alt.''; + 'longdesc="'.$u.'" class="thumbimage" />'; if ( $framed ) { $zoomicon=""; } else { diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index d6c5b4dcf4..9f00687613 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -2170,12 +2170,12 @@ Template with complex template as argument !! end !! test -TODO: Template with thumb image (with link in description) +Template with thumb image (with link in description) !! input {{paramtest| param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}} !! result -This is a test template with parameter +This is a test template with parameter !! end @@ -2881,7 +2881,7 @@ Image with frame and link !! input [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]] !! result -
This is a test image Main Page
This is a test image Main Page
+
This is a test image Main Page
This is a test image Main Page
!! end @@ -2910,7 +2910,7 @@ Thumbnail image caption with a free URL !! input [[Image:foobar.jpg|thumb|http://example.com]] !! result - + !! end @@ -2919,7 +2919,7 @@ BUG 1887: A ISBN with a thumbnail !! input [[Image:foobar.jpg|thumb|ISBN 12354]] !! result - + !! end @@ -2928,7 +2928,7 @@ BUG 1887: A RFC with a thumbnail !! input [[Image:foobar.jpg|thumb|This is RFC 12354]] !! result -
This is RFC 12354
Enlarge
This is RFC 12354
+
This is RFC 12354
Enlarge
This is RFC 12354
!! end @@ -2937,7 +2937,7 @@ BUG 1887: A mailto link with a thumbnail !! input [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]] !! result - + !! end @@ -2947,7 +2947,7 @@ so math is not stripped and turns up as escaped <math> tags. !! input [[Image:foobar.jpg|thumb|2+2]] !! result -
<math>2+2</math>
Enlarge
<math>2+2</math>
+
<math>2+2</math>
Enlarge
<math>2+2</math>
!! end @@ -2958,7 +2958,7 @@ math !! input [[Image:foobar.jpg|thumb|2+2]] !! result -
2 + 2
Enlarge
2 + 2
+
2 + 2
Enlarge
2 + 2
!! end @@ -3031,7 +3031,7 @@ Image caption containing another image !! input [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]] !! result -
This is a caption with another Image:Icon.png inside it!
Enlarge
This is a caption with another Image:Icon.png inside it!
+
This is a caption with another Image:Icon.png inside it!
Enlarge
This is a caption with another Image:Icon.png inside it!
!! end @@ -3051,7 +3051,7 @@ Bug 3090: External links other than http: in image captions !! input [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]] !! result -
This caption has irc and Secure ext links in it.
Enlarge
This caption has irc and Secure ext links in it.
+
This caption has irc and Secure ext links in it.
Enlarge
This caption has irc and Secure ext links in it.
!! end @@ -4621,7 +4621,7 @@ Fuzz testing: image with bogus manual thumbnail !!input [[Image:foobar.jpg|thumbnail= ]] !!result -
Enlarge
+
Enlarge
!!end @@ -5867,7 +5867,7 @@ TODO: Images with the "|" character in the comment !! input [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]] !! result -
An external URL
Enlarge
An external URL
+
An external URL
Enlarge
An external URL
!!end @@ -6118,4 +6118,4 @@ more tables math character entities and much more -Try for 100% code coverage \ No newline at end of file +Try for 100% code coverage diff --git a/skins/common/common.css b/skins/common/common.css index 497ea2ae92..0eab607e24 100644 --- a/skins/common/common.css +++ b/skins/common/common.css @@ -51,45 +51,48 @@ table.rimage { /* thumbnails */ div.thumb { - margin: 10px; - text-align: center; - width: auto; -} -div.thumb div { - border: 1px solid #8888aa; - background-color: #f7f8ff; - padding: 2px; - font-size: 94%; - text-align: center; - overflow: hidden; + margin-bottom: .5em; + border-style: solid; + border-color: white; + width: auto; +} +div.thumbinner { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; } -div.thumb div * { - border: none; - background: none; +html .thumbimage { + border: 1px solid #ccc; } -div.thumb img { - border:1px solid #8888AA; - margin-bottom:3px; - background:#FFFFFF; +html .thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: .3em 0 .1em 0; } -div.thumbcaption, -div.thumbcaption * { - border: none !important; - background: none !important; +div.magnify { + float: right; + border: none !important; + background: none !important; } -div.thumbcaption { - padding: 0.2em 0 0.2em 0 !important; - text-align: left !important; +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; } div.tright { - float: right; - clear: right; - margin-left:0.5em; + clear: right; + float: right; + border-width: .5em 0 .8em 1.4em; } div.tleft { - float: left; - clear: left; - margin-right:0.5em; + float: left; + clear: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; } /* Page history styling */ @@ -458,4 +461,4 @@ table.multipageimage td { .templatesUsed { margin-top: 1em; } -#toolbar { clear: both; } \ No newline at end of file +#toolbar { clear: both; } diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 42e7ff37be..3ae9e744d5 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -430,7 +430,7 @@ div.thumb { border-color: white; width: auto; } -div.thumb div { +div.thumbinner { border: 1px solid #ccc; padding: 3px !important; background-color: #f9f9f9; @@ -438,10 +438,10 @@ div.thumb div { text-align: center; overflow: hidden; } -div.thumb div a img { +html .thumbimage { border: 1px solid #ccc; } -div.thumb div div.thumbcaption { +html .thumbcaption { border: none; text-align: left; line-height: 1.4em; @@ -1545,4 +1545,4 @@ table.multipageimage td { .mw-plusminus-bold { font-weight: bold; } .mw-plusminus-pos { font-weight: normal; } .mw-plusminus-null { color: #aaa; } -.mw-plusminus-neg { font-weight: normal; } \ No newline at end of file +.mw-plusminus-neg { font-weight: normal; }