-----Original Message-----
>From: Tab Atkins Jr.
>Sent: Thursday, June 02, 2011 9:40 PM
>To: Andrew Fedoniouk
>Cc: Boris Zbarsky ; Brad Kemper ; www-style@w3.org
>Subject: Re: CSS Hierarchies / Selector Nesting Proposal
>
>On Thu, Jun 2, 2011 at 9:04 PM, Andrew Fedoniouk
><andrew.fedoniouk@live.com> wrote:
>> -----Original Message-----
>>>
>>> From: Boris Zbarsky Sent: Thursday, June 02, 2011 9:09 AM To: Brad
>>> Kemper
>>> Cc: www-style@w3.org Subject: Re: CSS Hierarchies / Selector Nesting
>>> Proposal
>>> On 6/2/11 11:48 AM, Brad Kemper wrote:
>>>>
>>>> OK, I see the issue now. By inserting the ampersand token, you are
>>>> being
>>>> more explicit with regard to space handing.
>>>
>>> Yeah, the use of ' ' as a combinator is sort of killing us here. :(
>>
>> I suspect that backward compatibility is also the feature being killed.
>>
>> Consider this sample:
>>
>> <html>
>> <style>
>> #one {
>> & #two { background:yellow; }
>> background:red;
>> }
>> </style>
>> <body>
>> <div id=one>test</div>
>> </body>
>> </html>
>
>This was *explicitly* mentioned in my original email. "However, it
>degrades well in existing browsers if you put the nested rules below
>all the properties in a rule."
>
Yes, it was mentioned. But mentioning it does not solve its problem in
general.
By the way, this:
#one {
& #two { background:yellow; };
background:red;
}
is backward compatible and works unconditionally. Note ';' after '}'.
In any case all this setup is not quite useful as soon it will be at least
one UA
in use that does not support this feature. If someone will need this kind of
style organization they will use LESS or the like.
Problem is that for other CSS features there are reasonable fallbacks at the
moment.
But for this one the fallback will be in maintaining two parallel style
sets.
So it will be even worse than now.
--
Andrew Fedoniouk
http://terrainformatica.com