W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: QSA, the problem with ":scope", and naming

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 20 Oct 2011 11:13:56 +0200
Message-ID: <4E9FE654.2050201@lachy.id.au>
To: Jonas Sicking <jonas@sicking.cc>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Ojan Vafai <ojan@chromium.org>, Alex Russell <slightlyoff@google.com>, Webapps WG <public-webapps@w3.org>, Yehuda Katz <wycats@gmail.com>, John Resig <jeresig@gmail.com>, Paul Irish <paulirish@google.com>
On 2011-10-20 07:52, Jonas Sicking wrote:
> I'm not sure I understand what you are proposing here. Are you saying that
> <div>
> <style scoped>
> :scope {
>    background: green;
> }
> </style>
> </div>
> should set the background of the<div>  green? This does seem intuitive
> I agree, but it might also lead to strange behavior since the
> rendering of the<div>  will change once the stylesheet is parsed. In
> other words, it's very easy to get flash-of-unstyled-content behavior.

In the majority of cases, that's a very easy problem for authors to 
avoid by always putting <style scoped> as the first child of the 
element.  Since a <div> is invisible in most cases without any content 
or other styles, any change in rendering from invisible to visible 
wouldn't be any different from normal incremental rendering.

Lachlan Hunt - Opera Software
Received on Thursday, 20 October 2011 09:14:30 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC