css

steveb8n 2022-07-28T22:33:26.585419Z

Q: I have a stylesheet from a designer and I need to change some values in it. I’m hoping to use something like Enlive for CSS i.e. parse and transform raw CSS. Does something like this exist?

Aron 2022-08-08T09:30:45.538049Z

Yeah, for css that might be good. My original problem was scss 😞

Aron 2022-08-08T09:31:04.854249Z

But, on the other hand, I resigned at that job, so don't have to fix the CSS anymore 😄

steveb8n 2022-07-28T22:33:48.105489Z

@ashnur very similar to your question. did you find anything?

steveb8n 2022-07-28T22:35:17.479569Z

Worst case I’ll use string match/replace but it would be nice to load the css as data. even better would be css -> garden i.e. round-trip Garden css

Aron 2022-07-29T03:40:14.223949Z

I haven't finished it, but the suggestion to use ANTLR4 sounds promising https://github.com/antlr/grammars-v4/tree/master/scss

👍 1
plexus 2022-08-07T22:44:10.876219Z

I've experimented a tiny bit with this http://cssparser.sourceforge.net/

steveb8n 2022-08-07T22:47:19.130689Z

looks pretty simple, thanks for the reference. I ended up just doing string replace with an xpath-like concept that did the job