- From: Eli Morris-Heft <eli.morris.heft@gmail.com>
- Date: Thu, 2 Jun 2011 22:40:17 +0300
- To: "www-style@w3.org" <www-style@w3.org>
- Message-ID: <BANLkTikzDjQAm7OdcMCSJrS4we3osNXZrQ@mail.gmail.com>
Speaking as an author, not only is this a fantastic idea for stylesheet organization, but I think that it would be better to make the ampersand explicit. That way, authors don't have to go to the spec to check the exact parsing behavior (because authors should know that the ampersand starts the continuation of the parent selector, as it were), and we don't have browsers trying to guess what authors meant with spaces and not-spaces and so on. (They shouldn't be, because the spec will be explicit, but I think it's important to guard against some parser trying to be clever.) In short, I guess, it will help with debugging to be explicit in this scenario. On a totally different note, in this plan, what happens if there is an ampersand in an unnested selector: &.bar { /* ... */ } My guess is that is just acts as if the ampersand is not there. I suppose it's fairly easy to build the parser so that it handles these correctly (correctly being that each of these selectors matches every .bar, assuming people agree with my suggestion of how to handle the case of "&.bar"): &.bar { /* ... */ } & .bar { /*...*/) -Eli Morris-Heft
Received on Thursday, 2 June 2011 19:41:04 UTC