W3C home > Mailing lists > Public > www-style@w3.org > November 2005

Re: Computational complexity of CSS

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 16 Nov 2005 18:14:26 +0100
To: "Andrew Fedoniouk" <news@terrainformatica.com>
Cc: <www-style@w3.org>
Message-ID: <uvpmn15it3oupscpu9qs3h76qq8lianmvr@hive.bjoern.hoehrmann.de>

* Andrew Fedoniouk wrote:
>For example system of styles written as :
>
>select
>{
>   option
>   {
>      background-color: color1
>   }
>   @:focus option
>   {
>      background-color: color2
>   }
>}
>
>effectively reduces lookup complexity as inner style blocks
>need to be scanned only for children of the <select> - not
>for all N nodes in the document.

I don't really understand how this is different from your

  select > option { background-color: color1... }
  select:focus > option { background-color: color2 ... }

Why is it not possible for an implementation to behave as if it rewrites
this syntax to your improved syntax and benefit from the more efficient
implementation?
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 16 November 2005 17:14:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:41 GMT