Answer the question
In order to leave comments, you need to log in
How to create a small CSS parser in JS?
Here is the problem: there is a CSS code, for example
a {
color: red;
}
b {
background: green;
}
Answer the question
In order to leave comments, you need to log in
And if you go through the DOM and make an array with all the elements and their styles. For example in jQuery it's quite easy.
Today it was on Habré
php css parser
http://idc.anavallasuiza.com/project/stylecow/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question