Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 1__qem mean?

I reading through the default styling applied to HTML elements for Google Chrome, available here. I found this:

p {
    display: block;
    -webkit-margin-before: 1__qem;
    -webkit-margin-after: 1__qem;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
}

What does 1__qem mean?

like image 792
Randomblue Avatar asked Sep 16 '11 18:09

Randomblue


2 Answers

From the WebKit source: CSSPrimitiveValue.h

// This value (__qem) is used to handle quirky margins in reflow roots 
// (body, td, and th) like WinIE.  
// The basic idea is that a stylesheet can use the value __qem (for quirky em)
// instead of em.  
// When the quirky value is used, if you're in quirks mode, the margin will  
// collapse away inside a table cell.

More information on Quirks Mode: http://en.wikipedia.org/wiki/Quirks_mode

Modern sites should never be in Quirks Mode, so you're safe to assume that it's the same as em for all intents and purposes.

like image 152
thirtydot Avatar answered Nov 10 '22 11:11

thirtydot


The sheet contains values such as "1__qem".

I don't really have a clue what these mean. The only reference I found about this is a post from Bill Brown on the CSS-Discuss list. It says:

I believe qem stands for "quirky em" and is a proprietary Webkit syntax used to refer to a margin which can be collapsed when the page is in quirks mode.

According to Tab Atkins, it is some "WebKit magic" :-)

Source: http://www.css-101.org/articles/base-styles-sheet-for-webkit-based-browsers/index.php

like image 25
Rob W Avatar answered Nov 10 '22 10:11

Rob W