A tiny transform library that lets you write CSS using XML
const postcss = require('postcss');
const xss = require('./parser');
postcss()
.process(css, { parser: xss })
.then(function(result) {
console.log(result.content);
});
Use xss
as a parser.
If i'm being completely honest this sort of begun as a jokey idea and then evolved into an exploration of of postcss
works on the inside and how to write transforms for it and such
Imagine this, you hold a senior position at a company you hate. You write up a compelling case for css in xml, something about the Android developers having an easier time with this because android uses xml. Probably. Nobody in your company really cares enough about the Android app to even know do they. You lead a team for two months to rewrite the entire CSS stack in this abhorrent XML thing. It should actually work with css modules and stuff. Hell you could even write a jsx pragma. You leave. Retire to the Bahamas for a bunch of months. The company you hated all along now has to maintain this. You sip a strawberry mojito in the beach and pet a bird. Things are good. You made it.
Hahahsahjbddsvufbf of course not I already had enough trouble rationalizing how separate the parsers for the declaration xml and the root xml should be to bother writing anything up.
Please refer to the test page or to the three files of code that i refactored so thoroughly that everything is now an abstract mess nobody can follow. I don't even know how this works. it's amazing. i love it.
No.
I will donate to your project if you use this.
Yes but THAT should actually be called css
. It's not my fault whatever commitee came up with that name wanted to sound 'radical' or 'extreme' because their legal guardians didn't get them those sneakers with built in rollerblades. Once this project gains traction I will submit a formal proposal to rename cross site scripting to css as it always should have been called.
I asked alexa for cascade synonyms and she says we should use waterfalling style sheets. WSS. There, fixed.