glam
glam copied to clipboard
CSS Cleanup
We are at a fork in the road with CSS. Unless browsers are going to support custom CSS properties, or Web Components pioneers it (doesn't look like they care), we should not be in the business of mixing standard CSS with our flavor of CSS.
Options (not necessarily mutually exclusive):
- Put the content in external files, read it with Ajax and use custom parser. Also remove from
- Use traditional CSS syntax, OR
- Come up with whatever syntax changes we want; it's our CSS now
- Ditch stylesheets altogether; do everything in data attributes. Goodbye, separation of concerns. Why has this become so popular?
It seems logical that if you're going to say the future the the web is not being constrained to the current set of tags that you'd also not be limited to the current set of CSS properties. What is the downside of mixing standard with custom, say with a vendor prefix -gl-skybox: url(...) etc?
You could use css-sauron to parse the css.
https://github.com/litejs/dom-lite/issues/13#issuecomment-66239490
Wish I understood what it is. I just went to the page and saw a pile of WTF.
But you're saying there's a good CSS parser in there? Are you using it for your project?
Yeah, I've had a play with it. Haven't integrated it in yet, but it's a tool for finding out what rules apply to which dom elements.