View Single Post
Old 03-30-2022, 03:40 PM   #23
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,828
Karma: 169712582
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by phillipgessert View Post
Ha, that stood out to me too, but since I don't use them, I wasn't very confident that was the issue. Seems likely.

I also don't remember why I don't. It does kind of seem like a needless abstraction to use a multiple of the font-size of the html element rather than that of the element you're actually working with. If I had to guess, rems would be mainly useful for highly precise, grid- and baseline-oriented layouts, and those won't work for ebook where user controls would throw it all out of whack anyway.
As far as I recall, using rem was supposed to help prevent some issues with inheritance where you were nesting elements. If I set a header to font-size: 2em; and then set a font-size: 1.5em on something inside that header, that text would display at 3 em whereas using 1.5rem would display the text at 1.5em (assuming I set root size to 1em).
DNSB is offline   Reply With Quote