Search code examples
browsermicrosoft-edgepixel

What is the pixel value for 1 REM (Root Ephemeral Units) for IE edge?


I did some google search, but could not find out what is the default pixel value (1 rem) for edge. If someone could put a link here, that will be appreciated. e.g. xx pixel === 1 rem, for edge.


Solution

  • I haven't found any doc talking about it, but I can give you an answer: 16px === 1rem in Edge (with font size set to "Medium" in Edge settings).

    I did a simple test. I set the font-size in CSS to be 1rem, and inspected its pixel value in DevTools. It says 16px. See the pic below:enter image description here

    But if you change the font size inside browser, this equation will break. Simply put,

    Very small: 9px === 1rem

    Small: 12px === 1rem

    Medium: 16px === 1rem

    Large: 20px === 1rem

    Very large: 24px === 1rem