I read online that if a size for em isn’t set then it automatically defaults to 16px, but when I tinker around with my card styling and set some words to 1em, they’re way larger than 16px. Is Anki’s default em size different? If so, what is it?
It seems to be dependent on the platform. For example on macOS, it seems to be 1em = 15px.
You can easily figure out yourself, by placing two spans next to each other:
<span style="font-size: 15px">foo</span> <span style="font-size: 1em">foo</span>
Hi, thank you for the response! I really don’t know anything about coding or CSS in general, so I’m not sure how to use the code you wrote. Could I get an explanation on how to use it?
You could just pop it into the HTML view of a field in a card just for the purpose of testing.
But as a matter of curiosity, if you don’t know how to use CSS and HTML, what is the relevance of the em unit to you?
In the editor (Add dialog or Browser), open the HTML view of the current field with Ctrl + Shift + X. Paste the HTML Henrik posted above inside and increment/decrement the pixel value until the sizes match.