Note that there are some explanatory texts on larger screens.

plurals
  1. POInaccurate rem units in Opera12 and IE9
    primarykey
    data
    text
    <p>Although I'm not new to the idea of responsive design I have experienced a very troublesome thing...</p> <p>I have decided to completely move to <code>rem</code> units, but I still follow <code>62.5%</code> rule (I have used it with <code>em</code>).</p> <p>So for starters:</p> <pre><code>html { font-size: 62.5%; } </code></pre> <p>I assume that <strong>1rem = 10px</strong> (I know it's not always true, but hey, it's for me to ease math a little bit, for browser it's still relative right?)</p> <p>Horror starts in <strong>Opera</strong> (<strong>12.12</strong> both linux and win version, where default font-size is set to <code>14px</code> and <code>16px</code> respectively).</p> <pre><code>header nav ul li a span { padding: 1.8rem 2.7rem 3rem 0; font-family: 'sawasdeebold', sans-serif; font-size: 2rem; line-height: 3rem; letter-spacing: -0.3rem; display: block; } </code></pre> <p>As You can see part of my navigation is let's say "pixel perfect" thanks to using <code>rem</code> units. Under linux page is a little bit narrower (that's no problem the font is smaller so <code>1rem</code> represents less pixels). However everything in <code>nav</code> scales badly if default size is changed to something else than <code>14px</code>... Under Windows the same is true for <code>16px</code>... The whole scaling idea just doesn't work. I don't need every pixel to match, but it looks ugly...</p> <p><img src="https://i.stack.imgur.com/dCFGx.png" alt="Navigation in rems"></p> <p>The similar problem appears under <strong>IE9</strong>, but this time is the logotype where:</p> <pre><code>header h1 a { margin: 1.8rem 0 0 1.6rem; width: 46.2rem; height: 10.1rem; background: transparent url(../static/img/logotype.jpg) 0 0 no-repeat; background-size: 46.2rem 20.2rem; text-indent: -5000px; display: block; } header h1 a:hover { background-position: 0 -10.1rem; } </code></pre> <p>Even though I set logotype's height and the exact size for its background, on hover, the background is positioned <code>1px</code> too low...</p> <p>Aside of these problems I have one, general question.</p> <p>Is it POSSIBLE to create "pixel perfect" layouts with <code>rem</code> units?</p> <p>I haven't even touched media queries yet and I want to know if it's worth my effort...</p> <p>BIG THANKS guys!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload