Hi Bobby,

2010/6/4 bobbykjack <[email protected]>:
> Is anyone able + willing to help out a newbie to the codebase? I'm
> trying to understand how Firebug (specifically, Firebug lite since
> that seems easier) parses stylesheets and presents the style info for
> a specific element in the style tab / panel. I've made some progress,
> but I'm wondering if someone can point me towards the code that
> handles parsing of the user agent stylesheet.
>
> Also, whilst I'm here, if anyone can direct me to the uncompressed
> source, that would be a great help. I'm kinda tired of reformatting
> thousands of lines of javascript, now! ;-)

I suggest running Firebug Lite in development mode:
http://getfirebug.com/firebuglite#DevelopmentMode

You can get the latest version of the code with our repository:
http://fbug.googlecode.com/svn/lite/branches/firebug1.3/

Or, you can get the full stable source here:
http://getfirebug.com/releases/lite/latest/firebug-lite.tar.tgz

The file you are looking for is:
http://fbug.googlecode.com/svn/lite/branches/firebug1.3/content/firebug/css.js

The functions you are looking for seem to be these
(located at the beginning of the css.js file):

- processAllStyleSheets()
- processStyleSheet()
- sortElementRules()
- getCSSRuleSpecificity()


I suggest also reading some background about how
CSS Cascading Order and Inheritance works. Here
is a very good article:

Cascading Order and Inheritance in CSS
http://monc.se/kitchen/38/cascading-order-and-inheritance-in-css


Also, W3C specifications about the subject:

Cascading Order Specification
http://www.w3.org/TR/REC-CSS1/#cascading-order

Assigning property values, Cascading, and Inheritance
http://www.w3.org/TR/CSS21/cascade.html

Table of CSS properties with initial values - Appendix F. Full property table
http://www.w3.org/TR/CSS21/propidx.html


If you have any other question, please post here
and I'll be glad to help you.


regards,

Pedro Simonetti.


>
> Cheers,
>
> - Bobby
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Firebug" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/firebug?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to