W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2017

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

From: Xidorn Quan via GitHub <sysbot+gh@w3.org>
Date: Mon, 16 Jan 2017 04:16:17 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-200928090-1484540176-sysbot+gh@w3.org>
upsuper has just created a new issue for 

== [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:
<!DOCTYPE html>
<iframe src="about:blank"></iframe>
  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';
    alert('line-height: ' + win.getComputedStyle(b).lineHeight);

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 
Received on Monday, 16 January 2017 04:16:24 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:07 UTC