Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-06 Thread Håkon Wium Lie
Also sprach Aryeh Gregor: .w180 { width: 90px } Style *attributes* -- on the other hand -- are much harder to deal with. They always win in competition with other conflicting rules. Except by using !important, which is of course the point of !important. Yes, that's possible.

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-04 Thread Håkon Wium Lie
Also sprach Brion Vibber: It seems to me that setting the exact width is a rare exception, and one that shouldn't stand in the way of reusing content. Assume that it'll be used very frequently and that it should not break. If necessary, you use a style attribute. That solution will

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-04 Thread David Gerard
2009/4/4 Håkon Wium Lie howc...@opera.com: Your markup is:  [[Image:Digital ambient light meter.jpg|145px|thumb|right|A handheld digital ambient light meter, showing an f-stop of 5.6 for 24 frame/s 500 ISO filming]] I'm curious about your reasons for setting 145px, though. Is it because the

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-04 Thread Håkon Wium Lie
Also sprach Brion Vibber: I'm curious about your reasons for setting 145px, though. It looked good at that size. :) The default sizes being based on width alone is pretty horrible -- it makes the actual total image size dependent on the aspect ratio, so images will be varyingly

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread Roan Kattouw
2009/4/3 Håkon Wium Lie howc...@opera.com: I've spent the last few days analyzing Wikipedia's HTML code for images and captions. The current code is quite good, but verbose and it has redundancies. Here is a proposal that describes how to simplify and improve the code:  

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread Håkon Wium Lie
Also sprach Roan Kattouw: http://www.princexml.com/howcome/2009/wikipedia/image/ Another point of criticism: the article seems to study thumbnails (images generated with [[Image:Foo.jpg|thumb]]) exclusively. Images without the thumb attribute are rendered differently (no caption, no

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread Håkon Wium Lie
Also sprach Chad: My hypothesis is that the current HTML code can be simplified and improved by relying more CSS. The benefits are reduced code size (what's the bandwidth of Wikipedia?) and easier reuse of the content. /me waits for the obligatory omg think of the text browsers

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread David Gerard
2009/4/3 Chad innocentkil...@gmail.com: On Fri, Apr 3, 2009 at 8:45 AM, Håkon Wium Lie howc...@opera.com wrote: My hypothesis is that the current HTML code can be simplified and improved by relying more CSS. The benefits are reduced code size (what's the bandwidth of Wikipedia?) and easier

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread Håkon Wium Lie
Also sprach Tei: I've spent the last few days analyzing Wikipedia's HTML code for images and captions. The current code is quite good, but verbose and it has redundancies. Here is a proposal that describes how to simplify and improve the code:  

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread Håkon Wium Lie
Also sprach ABCD: The width of the element is set on a class (w180) instead of using a style attribute. Wikipedia offers thumbnail images in six different sizes (120px, 150px, 180px, 200px, 250px, 300px) and this number is low enough to use classes. The main benefit of using classes

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread Håkon Wium Lie
Also sprach Aryeh Gregor: http://www.princexml.com/howcome/2009/wikipedia/image/ The proposed solution reduces the number of elements from 10 to 6 and the code size is reduced by more than 50%. As others have noted, the thumbnails can actually be any size, so we really do need

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread Aryeh Gregor
On Fri, Apr 3, 2009 at 5:19 PM, Håkon Wium Lie howc...@opera.com wrote: The gain is that the code is easier to reuse. When style is set through a class name, it can be overridden by another style sheet. For example, when creating these samples:  http://www.princexml.com/samples/#wiki I

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread Brion Vibber
Håkon Wium Lie wrote: It seems to me that setting the exact width is a rare exception, and one that shouldn't stand in the way of reusing content. Assume that it'll be used very frequently and that it should not break. (Would be interesting if someone wants to do a survey, but I rather

Re: [Wikitech-l] A proposal to simplify and improve image markup in Wikipedia

2009-04-03 Thread David Gerard
2009/4/3 Brion Vibber br...@wikimedia.org: Håkon Wium Lie wrote: It seems to me that setting the exact width is a rare exception, and one that shouldn't stand in the way of reusing content. Assume that it'll be used very frequently and that it should not break. (Would be interesting if