W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: Previous-sibling combinator

From: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Fri, 17 Aug 2012 23:12:34 +0800
Message-ID: <502E5F62.8050706@oupeng.com>
To: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>
CC: WWW Style <www-style@w3.org>
(12/08/17 22:50), Marat Tanalin | tanalin.com wrote:
> Take into account though, that there is escaping feature in CSS. For
> example, in HTML5, identifiers are allowed to contain characters that
> are special in CSS. So to be used in selectors, such special
> characters must be escaped:
>
>     <div id="lorem+ipsum"></div>
>
>     #lorem\+ipsum {/**/}
> 
> There is nothing why `-` should be different, 

Of course '-' is different, you don't do \-webkit\-property\-you\-like

> it just should be escaped if it has no special meaning in a specific place of selector:
> 
>     x\-element {/**/}

Perhaps I gave a bad example. The obvious example is something like

  .a-cat

, matching <div class="a-cat">. Or do you think the amount of sites
doing this is ignorable?

Also, what how do you interpret

  :any-link

?

In summary, not requiring space around '-' is just not a workable
approach. Requiring space around '-' could work. It just looks quite
awkward but we have that precedence with calc().


Cheers,
Kenny
-- 
Web Specialist, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Friday, 17 August 2012 15:13:16 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT