[csswg-drafts] [css-values] Value of rem when document have no root element

upsuper has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-values] Value of rem when document have no root element ==
It is not specced that what should happen when there is no root 
element in a document, and one tries to compute value of `rem` unit.

For example given the following code:
```html
<!DOCTYPE html>
<iframe src="about:blank"></iframe>
<script>
  window.onload = function() {
    var win = document.querySelector('iframe').contentWindow;
    var doc = document.querySelector('iframe').contentDocument;
    var b = doc.body;
    doc.documentElement.style.fontSize = '24px';
    b.style.lineHeight = '2rem';
    doc.removeChild(doc.documentElement);
    alert('line-height: ' + win.getComputedStyle(b).lineHeight);
  };
</script>
```

Gecko and Edge shows `48px`, and Blink shows empty.

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/936 using your GitHub 
account

Received on Monday, 16 January 2017 04:16:24 UTC