ExCSS_Core
ExCSS_Core copied to clipboard
How to use it for existing (X)HTML text?
Hi,
because of the lack of documentation it is hard to figure out how to use the library to parse existing html. I've come so far:
- parse my Html text.
- extract the name of the CSS style sheet that is used in the document.
- parse the CSS style sheet with this library.
Ok, now I have my parsed CSS style sheet, with a lot of rules in it!
For each element of my Html document, I now want to know which properties apply to this element. The element has a name, can have an Id, can have a class attribute with one or more classes in it. So: is there a function with input: name of the element, Id, classes …, and which then returns the properties that apply to this element? Ideally, with all the priority rules already taken into consideration? I have seen in the source code there is a lot about priority implemented, just don't know how to use it.
@lellid - I keep this project alive in terms of integrating solved issues found by other devs, but I don't "support" it. It's one to either work it out, or not use it.
If you want to fork the repo, create a test case that shows what you want to do and let me know about it, I might be able to take a look.