Talk:MediaWiki CSS

Absolute units are recommended?
I'm working on a wiki re-design, and am using this marvellous page to help guide me through the complex CSS maze. Under for instance  it is recommended to use absolute units, which to my understanding means px, while em is a relative unit (font size).
 * Absolute units like pixels are recommended here to avoid overlapping the logo/sidebar when users have nonstandard font settings. Relative units are used by default.

However, when I see at my code-base, which is taken and adapted from Common CSS, I'm seeing quite a few uses of em, including here:

Does the use of em not matter so much in normal situations, or should we strive to convert all these values to px instead? Will that make the wiki more cross-browser friendly and more resistant to various user settings? --Pangaearocks (talk) 17:01, 13 July 2019 (UTC)
 * Good question! Unfortunately, there is no easy answer of which unit is universally better, as they both have their uses. The advantage of relative units such as em is that they make for a more accessible browsing experience by allowing a page to be equally clear on a variety of screen sizes and font sizes, which is why the stylesheet on this wiki uses them frequently. That bullet point you quoted is essentially a word of caution because the logo is the one thing in the top navigation area that uses pixels by default, simply due to the fact that image files use pixels as their size unit.
 * In general, for a wiki skin, if the default style that comes with the wiki uses one unit, I would continue using that unit unless you have a specific justification for changing it. --Kittymmeow (talk) 04:30, 16 July 2019 (UTC)