calc-rem-lang.html (744B)
1 <!doctype html> 2 <html lang="en"><!-- The lang is important! --> 3 <meta charset="utf-8"> 4 <title>CSS Test: Calc with rem and relative units on the root element</title> 5 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> 6 <link rel="help" href="https://drafts.csswg.org/css-values/#rem"> 7 <link rel="help" href="https://drafts.csswg.org/css-values/#funcdef-calc"> 8 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1431031"> 9 <link rel="match" href="calc-rem-lang-ref.html"> 10 <style> 11 html { 12 font-size: calc(1rem + 1em); 13 } 14 </style> 15 <p style="font-size: initial">You should see a green box twice-the-initial-font-size wide.</p> 16 <div style="width: 1em; height: 1em; background: green;"></div> 17 </html>