I have a responsive Bootstrap page with fixed-size divs containing text. To avoid the text overflowing the div as it changes size, I'm using this solution with media queries to change the default font size.
However, the $font-size-base
variable in the Bootstrap sass variables is still defined in terms of pixels and therefore stuff using it doesn't obey this scaling. I tried changing the font-size-base to 1em
, but this cause a whole cascade of errors of Incompatible units: 'px' and 'em'
.
I could basically overwrite the font sizes I need to be variable in my custom sass file, but this seems like kind of a kludgy approach. Is there a cleaner way that I can make Bootstrap use ems for the font size so that it will change according to my media queries?