• Hello,

    I’m using Twenty Twelve as a blank canvas for all of my projects. I always use a child theme to ensure the core files aren’t touched.

    My question
    Should all PX values be converted to REM? Are any of these excluded?:

    • font-size
    • padding
    • margin
    • background-size
    • borders

    Thanks!

    Ox

Viewing 4 replies - 1 through 4 (of 4 total)
  • The only real use of rem unit in Twentytwelve is when you want to increase(or decrease) its overall size you can do so with this one line.

    html { font-size: 18px; }

    Another use of rem might be that it uses default font size setting in browser to scale all elements with rem sized.

    Other than that, there is no real use for it that I know of.

    Now consider this, browsers today can perform full page zoom. Tablet, iPad, smartphone, iPhone can pinch zoom and tap zoom. This renders the idea of changing just font size in the root to control other elements almost pointless.

    On the users side, most people don’t bother changing default font size in browser. For those who do, know how to use the Ctrl++ full page zoom.

    Thread Starter Sam Kent

    (@oxocube)

    Thanks for your reply Paul. So there’s really no need to be calculating all these REM values? I’ve just wasted a whole lot of time. On the plus side, my stylesheet will look a lot cleaner!

    Ox

    Actually, the ‘rem’ unit is a great replacement for the ’em’ unit.

    It can be used in the same exact way, but without the pitfalls of parent inheritance like the ’em’ unit. ‘rem’ looks to the top container (html) for guidance.

    Aside from that discussion, you can get fractions of a size change with rem. Ever wanted to do a font size, 12.5? Set html { font-size:10px } then your font-size to 1.25rem. boom.

    fun stuff.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You should definitely aim to replace some ‘px’ measurements on font sizes with something fluid like percentages or ’em’s so that IE6 can resize the text when people zoom in.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Should all PX values be converted to REM?’ is closed to new replies.