W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2005

Re: specificity of style rule?

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 02 Dec 2005 00:08:52 +0100
To: Garrett Smith <dhtmlkitchen@gmail.com>
Cc: www-dom@w3.org
Message-ID: <r70vo114ceec4i7cqgdrle4ukdd4cnbu5o@hive.bjoern.hoehrmann.de>

* Garrett Smith wrote:
>I wonder: is there a way to know the specificity of a cssRule? Can I
>get some number representing the weight?

DOM Level 2 Style does not offer such functionality, you would have to
derive it from the selector (which you would have to parse first as the
Style module provides them only as strings) and it might be better to
use some other representation for it than a number.
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 Thursday, 1 December 2005 23:09:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:12 UTC