• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Ty the Web Guy

Everything Web™ Since 1995

  • Home
  • About Me
  • Experience
  • Services
  • Contact

REM Unit Polyfill

July 28, 2014 By Ty Cahill

Project: https://github.com/chuckcarpenter/REM-unit-polyfill
Website: http://chuckcarpenter.github.io/REM-unit-polyfill/

The polyfill will test any browser for REM support and patch it up if needed, although we all know IE8 and below is where the issue lies. Once lack of support is determined, it reads all the link tags for stylesheets and finds selectors that have rules using the REM unit. It then recalculates those rules to PX and writes them in the head to override in the cascade. Magic.

Filed Under: Dev Goodies, JavaScript

Footer

Ty the Web Guy has been immersed in web design and development for over 20 years. Serving businesses and non-profits locally in the Sacramento area and across the United States. Find out how Ty can help you!

Call 1-800-754-5470 or email [email protected].

Copyright © 2021 Ty the Web Guy · All rights reserved.

Ty the Web Guy and Everything Web are trademarks of Ty Cahill.