Issue 39 in fizzler: calculate the specificity of a given selector

0 views
Skip to first unread message

fiz...@googlecode.com

unread,
Oct 28, 2009, 9:29:11 PM10/28/09
to fizzler...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 39 by jake.net: calculate the specificity of a given selector
http://code.google.com/p/fizzler/issues/detail?id=39

Would it be possible to calculate the specificity of a given selector based
on the W3 specification

http://www.w3.org/TR/CSS2/cascade.html#specificity

There is a ruby project that does this and I think it would be a handy
feature.

http://code.dunae.ca/css_parser/

CssParser.calculate_specificity('#content div p:first-line a:link')
=> 114

My goal is to be able to take an html document and parse it applying all
the css styles inline on the actual elements. This is useful in getting
good email rendering results and I got the idea from premailer

http://premailer.dialect.ca/

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

fiz...@googlecode.com

unread,
Oct 28, 2009, 9:33:21 PM10/28/09
to fizzler...@googlegroups.com

Comment #1 on issue 39 by jake.net: calculate the specificity of a given
selector
http://code.google.com/p/fizzler/issues/detail?id=39

There is also a awesome css parser that I found on code project
http://www.codeproject.com/KB/recipes/CSSParser.aspx

Reply all
Reply to author
Forward
0 new messages