W3C home > Mailing lists > Public > www-style@w3.org > June 2015

Re: [css-ui-4] user-select inheriting into absolutely positioned elements

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Mon, 01 Jun 2015 11:41:30 -0400
Message-ID: <556C7D2A.2070101@mit.edu>
To: www-style@w3.org
On 6/1/15 4:59 AM, Florian Rivoal wrote:
> At the same time, the old behavior was probably introduced for a reason

Do you mean in Mozilla's implementation or in the spec?

In Mozilla's implementation it happened to be the simplest behavior: to 
figure out user-select for a box, just walk up its parent chain.  Due to 
the way absolutely positioned (and floated) things are taken out of flow 
in Gecko, their parent is their containing block, which may be an 
ancestor of the parent of the actual element being styled.  So the walk 
up the parent chain misses the user-select styles.

In other words, a naive implementation in Gecko, which does not bother 
to stop to think about the absolutely positioned case at all, leads to 
the "don't inherit into abspos" behavior.

-Boris
Received on Monday, 1 June 2015 15:42:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:54 UTC