
So it's best to add back in the commented outline and remove the offending line.Īnd there we go! Once you have complied the Sass, your Mendix application will now be fully accessible for users who change their font size!Īny other benefits of using rem over pixels?

This is what is throwing the compile error as you can’t use rem and px together. So that 1rem is equal to 10px this makes things easier for text size calculations.Īs you can see, it's adding the font-size-default (which is now set to use rem, not px) and +4px. To simplify things, its best to set the font size in the HTML to 62.5%. if the font from the browser was 16px, 1rem would equal 16px. Rem values are relative to the root HTML element and let you specify a text size in a relative fashion.ġrem is equal to the font size set in the HTML. So how do we use the text size rather than overwriting it with our own? One way to do this is to use ‘rem’ rather than ‘px’. So what we want is an app that changes its font size based on the users preference. That means the font-base-size will ALWAYS be 14px, regardless of what the user sets their default font size to.

Most developers, when they are introduced to any type of styling, will use pixels and its easy to continue that practice.Īs you can see in the above image, the font-base-size is set to 14px. Every developer is brought up using pixel, its easy to understand and easily translatable.
