Just checking if anybody has strong feels on https://gerrit.wikimedia.org/r/#/c/195195/
This is a patch from Isarra adding a $wgLogoHD config setting which can list URLs for 1.5x and 2x-density images to supplement $wgLogo. They get loaded in MonoBook/Vector-like skins using CSS and media queries if used, and have no effect otherwise.
This is roughly equivalent to how a hi-DPI logo is provided on English Wikipedia and a few other special-cases via custom CSS, but without the need to fudge around with custom site CSS. :)
Downside: size-derivatives URLs must be specified manually in site config.
Upside: when using SVGs rendered on-wiki, that's *real* easy to automate and create a suitable config to cut-n-paste.
An alternative might be to fancy things up with a $wgLogo supplement that accepts an on-wiki file name, with the scaling managed internally by the wiki. But that might be a bit trickier.
Any thoughts? This is an old "paper cut" issue that drives our designers nuts and I'd love to get it working one way or another. :)
-- brion
On 03/09/2015 05:31 PM, Brion Vibber wrote:
Just checking if anybody has strong feels on https://gerrit.wikimedia.org/r/#/c/195195/
This is a patch from Isarra adding a $wgLogoHD config setting which can list URLs for 1.5x and 2x-density images to supplement $wgLogo. They get loaded in MonoBook/Vector-like skins using CSS and media queries if used, and have no effect otherwise.
For comparison, there is also https://gerrit.wikimedia.org/r/#/c/193434/ . Paladox is proposing to make wgLogo SVG (will need back-compat of course), with wgLogoPNG as a fallback for browsers that don't support SVG.
Matt Flaschen
On 10-03-2015 01:07, Matthew Flaschen wrote:
For comparison, there is also https://gerrit.wikimedia.org/r/#/c/193434/ . Paladox is proposing to make wgLogo SVG (will need back-compat of course), with wgLogoPNG as a fallback for browsers that don't support SVG.
Depending on the complexity of the SVG logo, that could result in a large file being downloaded. The Wikipedia logo SVG is 162 KB vs. 19 KB for the PNG. But if someone wants SVG, by all means
One question though; the logo is now a background image, requiring media queries for PNG and a lot of CSS background hacking for SVG. Is there no way to do it using a regular <img> tag, using srcset for PNG, instead?
Regards,
On 2015-03-10 1:56 AM, Erwin Dokter wrote:
On 10-03-2015 01:07, Matthew Flaschen wrote:
For comparison, there is also https://gerrit.wikimedia.org/r/#/c/193434/ . Paladox is proposing to make wgLogo SVG (will need back-compat of course), with wgLogoPNG as a fallback for browsers that don't support SVG.
Depending on the complexity of the SVG logo, that could result in a large file being downloaded. The Wikipedia logo SVG is 162 KB vs. 19 KB for the PNG. But if someone wants SVG, by all means
One question though; the logo is now a background image, requiring media queries for PNG and a lot of CSS background hacking for SVG. Is there no way to do it using a regular <img> tag, using srcset for PNG, instead?
Regards,
IIRC there are some reasons related to something like overflow or centering that require the use of a background in the MonoBook/Vector style skins. Plus site styles that use CSS to override the logo.
Either way, even if we switched Vector to use an <img> we'd still have to solve the issue of using a background-image since there will be other skins that use a background-image.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]
On Tue, Mar 10, 2015 at 1:56 AM, Erwin Dokter erwin@darcoury.nl wrote:
On 10-03-2015 01:07, Matthew Flaschen wrote:
For comparison, there is also https://gerrit.wikimedia.org/r/#/c/193434/ . Paladox is proposing to make wgLogo SVG (will need back-compat of course), with wgLogoPNG as a fallback for browsers that don't support SVG.
Depending on the complexity of the SVG logo, that could result in a large file being downloaded. The Wikipedia logo SVG is 162 KB vs. 19 KB for the PNG. But if someone wants SVG, by all means
Yeah, using a direct SVG is currently not ideal for Wikipedia unless someone manages to make a much more lightweight SVG version of the logo. :(
One question though; the logo is now a background image, requiring media queries for PNG and a lot of CSS background hacking for SVG. Is there no way to do it using a regular <img> tag, using srcset for PNG, instead?
Possible yes but it would change the skin layouts more dramatically and may break customized skins/CSS.
"Fun!" :)
On the plus side, the $wgLogoHD setting would work fine with both the background-image method currently used and a possible switch to <img>+srcset in the future if/when we're willing to make bigger skin markup changes... so we can adopt this first and then do skin cleanup later.
-- brion
wikitech-l@lists.wikimedia.org