On Fri, Apr 3, 2009 at 10:31 AM, Håkon Wium Lie <[email protected]> wrote:

> 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 is that
>  > > alternative style sheets can change the presentation, e.g., for
>  > > printing purposes. The style attribute, on the other hand, can never
>  > > be overridden.
>  >
>  > Actually, you can set the width to any value you wish in the input
>  > document, which would cause problems with your suggestion.
>  > ([[File:Example.png|123px|thumb|Some text.]] will always display at
>  > 123px wide, no matter what preferences are used).
>
> Right. In this case, using a style attribute would probably be the
> only viable solution. But this is rare, no? If we can eliminate 99% of
> style attributes, I'm happy. Is there any way to count those that
> specify exact widths?


Actually this is not only rare but discouraged. Widths should only be
specificed in unusual cases (such as very wide or very tall images). Using
classes for the standard thumb widths is an excellent suggestion and then
the use of styles for unusual situations would be the exception it should
be. In other words we shouldn't base our decision to use a less flexible
formatting feature because of rare exceptions.
-Trodel
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to