CSSLoader updated
For a component I’m working on I made some minor changes and additions to the CSSLoader classes.
I removed the ability to include prefixes in your CSS files (like “mx:Button”) since there was no way that I could think of to check which prefix an mxml tag has. The prefix feature was removed in favour of the ability to include pseudo-elements (like “a:hover”), which comes in handy when styling htmlText.
The CSSLoader class now also has a function called getHTMLStyleSheet() which returns a StyleSheet instance carrying all style specifications from a CSS file.
Last, I implemented a loadString() method which lets you directly add a plain text stylesheet rather than get the data from a file..
No Responses