Module talk:Chessboard
Bug
Making the icons use position:absolute (i.e. inside a div instead of a table) caused an obscure and probably coincidental css rule for nested elements to give each of them a white background, effectively negating the svg/png transparency, to wit:
div.thumb div a img {
background-color: #FFFFFF;
}
I tracked this down in Firebug as having originated from the following url:
My edit to this module fixed the visual problem immediately by conveniently removing element "a" from the hierarchy and dodging the above css rule (see before & after screen-shot taken from Template:Chess diagram/doc) but I'm amazed nobody else had complained about it. If we really do want each chess-piece icon to link to the image page as they did before my edit, we will need some superseding CSS rule to work around this bug. ―cobaltcigs 09:20, 9 June 2013 (UTC)
- thank you. it's possible that this was recently-introduced. I have made a corresponding change to Module:Chessboard mxn, which probably wasn't necessary, since that template doesn't use transparent backgrounds, but it will make lack-of-link consistent. Frietjes (talk) 16:02, 9 June 2013 (UTC)
- thank you for reporting the problem. however, your solution caused collateral damage: when removing the "a" from the hierarchy (by adding link="), we lose the tooltip, which, for each piece, gave the square algebraic notation ("e6" etc.), the color and the piece name. i am undoing it, and instead will try something else (i think i'll just pack the image in some surreptitious element, maybe another "div" or "span" or something). i have no idea why monobook has this rule - i does not make too much sense: if such a rule is really needed, why just monobook? "div, thumb div a img" is clearly something to do with content and not interface, and i can't think of a good reason why same content with monobook should have white background to images while other skins leave the img background untouched. the correct solution, IMO, would be to remove this rule (unless someone can explain why monobook should have it). peace - קיפודנחש (aka kipod) (talk) 00:39, 10 June 2013 (UTC)