W3C home > Mailing lists > Public > www-style@w3.org > September 2011

Re: Suggestion for @global to help with <style scoped>

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 21 Sep 2011 00:22:47 +0000 (UTC)
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.64.1109210022170.16440@ps20323.dreamhostps.com>
On Tue, 20 Sep 2011, fantasai wrote:
> 
> So, given that, rather than having a "scoped vs. global" switch, how 
> about using a pseudo-class to distinguish whether a portion of the 
> selector is matching out-of-scope elements? E.g.
> 
>      <style scoped>
>       section > h1 { border-bottom: solid; }
>       :context(body.homepage) h1 { color: red; }
>       :context(body.archive) h1 { color: gray; }
>      </style>

...what element does the :context() match against?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 21 September 2011 00:25:32 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:04 UTC