File talk:xkcd favicon.png

Explain xkcd: It's 'cause you're dumb.
Revision as of 23:14, 27 September 2020 by Yfmcpxpj (talk | contribs) (Image dimensions for xkcd external links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Image dimensions for xkcd external links

Hi folks; I see that this File:xkcd favicon.png has recently been updated from a shrunken 16x16 pixel image to the full 32x32 pixel favicon image from xkcd. Not sure about this, but from this discussion, it looks like the purpose of this file was only for custom styling of hyperlinks in the wiki that link to the xkcd.com site (rather than, say, for the purpose of documenting/explaining the favicon)? If so, with the current CSS, this 32x32 image is too large to display correctly with the hyperlinks: it overlaps the link text, and the image is cut off at the top and bottom because it's too tall to fit in a line of text. I can think of the following two options to fix it:

1. Replace/revert the image to one that is 16x16 pixels.

2. Edit the CSS to specify an explicit size for the image to fit within the xkcd hyperlinks. Not sure if this is the right place, but there's a MediaWiki:Common.css file, with a section called External link tweaks in the CSS that defines the style for these links. One way to fix it is, in the background property's shorthand syntax, add a background-size property of /16px immediately following the background-position property of center, as in bold red below.

/**********************************************************************
 * External link tweaks                                               *
 **********************************************************************/

/* Custom icon for links to xkcd.com */
a.external[href*="xkcd.com"] {
    background: url("//www.explainxkcd.com/wiki/images/1/1f/xkcd_favicon.png") no-repeat scroll right center/16px transparent !important;
    padding-right: 18px !important;
}

I don't have permissions to edit the CSS, so is there someone around who still has permission for this? Or any other thoughts on the best way to fix it? FWIW, I do think there is some value in having an actual full-size copy of xkcd's 32x32 favicon here (perhaps with an explanation page for it?), but maybe it ought to be a separate file, as this one seems to be more of a meta file for the purpose of styling the site. – Yfmcpxpj (talk) 23:14, 27 September 2020 (UTC)