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

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

From: Florian Rivoal <florian@rivoal.net>
Date: Mon, 1 Jun 2015 20:23:32 +0200
Cc: www-style@w3.org
Message-Id: <BB242D58-DE4F-4AB5-8FBD-92F34FDBBD60@rivoal.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
> 
> On 01 Jun 2015, at 17:41, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:
> 
> 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?

I meant Mozilla. For (this part of) the spec, I was just following your implementation, assuming that if you had this kind of unconventional behavior, it would have been justified by use cases you had run into. Looks like I read too much into what is essentially a bug.

> 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.

I am not exactly sure why you'd do a pseudo inheritance via the box tree rather than classical inheritance via the DOM tree if you're not intentionally trying to go for this kind of side effect, but since this looks accidental, and you've removed it, and nobody else does it, I'll update the spec to match the consensus implementation.

 - Florian
Received on Monday, 1 June 2015 18:23:57 UTC

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