kristoff-it / superhtml

HTML Language Server & Templating Language Library
MIT License
123 stars 9 forks source link

Implement CSS parser #4

Open kristoff-it opened 3 weeks ago

kristoff-it commented 3 weeks ago

We want to also provide autoindentation and diagnostics for CSS content.

To do so correctly, we need to implement a CSS parser which would need to follow the same principles of the main HTML parser:

If anybody is interested in taking this on, let's first discuss the idea a little.

Arnau478 commented 2 weeks ago

I've written a CSS tokenizer and parser before. The one I wrote is not really suitable for SuperHTML, as it was intended for a web browser engine. However, I am willing to address this if you let me, making a new one. A few things I wanted to say:

kristoff-it commented 2 weeks ago

Thank you for your interest. Yes I would concur that it's a good idea to support CSS2.1 and more in general I would be interested, over time, to have support for all the fancy stuff that can be done with CSS.

Here's how I would proceed: