https://bugzilla.wikimedia.org/show_bug.cgi?id=30113

--- Comment #27 from Daniel Friesen <[email protected]> 
2011-07-31 04:30:28 UTC ---
(In reply to comment #24)
> Also, I hope I'm not the only one who thinks it's rather odd that we're trying
> to build an encyclopedia, but "the most important image on the whole site" is
> not an image used to illustrate the topic of an article, but the site's logo. 
> I
> would hope that people who use our wiki are "painstaking[ly] craft[ing]" their
> content rather than a little pretty image.
Heh, I was thinking of saying something along those lines too. A wiki where the
logo is "painstaking[ly] crafted" but the content is not "painstaking[ly]
crafted" is worthless. And we do make an effort to make sure that as much of
that painstakingly crafted content is accessible to disabled users.

(In reply to comment #24)
> As for an actual constructive suggestion, if the only reason we use the
> background hack in the first place is because it allows for images of the 
> wrong
> size to be uploaded, maybe we should just require that uploaded images be the
> right size. Or use imagemagick, if available, to fix it. Then we could make 
> our
> image be an image. Since presumably people making logos have some graphic
> design ability, they surely can crop their images.

That I know of there are 3 current functional uses of the logo being a
background-image:
- Without any special coding a background-image that is too large gets cut off
(we have skins with various logo area sizes, and the logo can be any arbitrary
url to any unvetted image), unlike an <img> which if allowed to grow will
overlap the content area. (note that since $wgLogo is an arbitrary url we can't
do any ImageMagic stuff with it, iirc MediaWiki also functions mostly in hosts
with url fopen wrappers disabled, so we also can't do anything that would
require MW to download an image from a url)
- Using a background-image with a center center position as we do means we
cater to a variety of logo sizes while still perfectly centering them in all
skins.
- Using a background-image also functions as a way to allow the logo and the
logo area to be customized in various ways by css.

I did some testing to see what can be done with an <img> instead of the
background-image. With use of overflow: hidden; it is possible to have the logo
area cut off overly large logos easily. The centering however is a bit of good
and bad. A text-align: center; does permit the logo to be horizontally centered
like the background-image. However we cannot vertically center a logo that is
an <img> like we can for a background-image. With some tweaks to the css it is
possible to instead make the logo area vertically shrink to fit the logo of
whatever height. However this has two caveats, both I'm sure we'll end up with
people complaining about. A) Of course, the wiki with vertically small logos
may not be happy about their logo area suddenly changing size. Technically they
can pad their logos or hardcode margins. However that's not going to make wiki
with extra skins including ones where a vertically conservative logo is a good
thing happy. And forcing people to hardcode px margins is not a good practice
for us (actually if they don't enable site stylesheets they can't even do that
without code hacks, another bad tradeoff). B) More importantly, while the logo
hasn't loaded the navigation will appear higher up in the sidebar, and once
it's loaded will move to accommodate the logo. This will have the effect of
making the sidebar jump around, create a visual distraction during the loading
of the page, and can actually create a usability defect where a user goes to
click a link, the logo loads, the sidebar jumps, and then the user clicks a
different link. (this problem will be particularly noticed by low-speed
Internet users)

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to