Open romainmenke opened 1 year ago
If this plugin could use PostCSS to enhance the LSP experience in VSCode, that would be infinitely useful.
When it was released, this plugin provided the best syntax support for modern CSS. However, with the advances in LSPs, this language extension is now a hindrance, unless it can be updated to include a language server. As a language server, it would be much more powerful; allowing ‘type safety’ experiences, and support for newer experimental features. That last one is key, in that PostCSS helped advance CSS by giving developers the ability to prototype newer features before they were widely available.
Yes builtin support for CSS in VSCode has advanced a lot and CSS itself has advanced a lot. Many things that were a draft spec and a PostCSS plugin are now native features.
The immediate issue that users of this extension seem to be facing is that they install this, expecting everything to just work. However they quickly discover that they lose many more feature than they gain.
This is not the only PostCSS VSCode extension that is suffering from this issue.
There is also :
The last extension is maybe the most promising.
It has seen updates and releases less than a year ago.
The underlying issue is the extreme maintenance burden that exists for anything that wants to be a PostCSS language extension.
PostCSS is not a language like CSS itself or like SCSS. It's an ecosystem of plugins to transform CSS. There is no specification, no syntax definition, no rules, ...
This VSCode extension needs to keep up to date with the rapid developments in CSS and needs to find ways to support everyone's custom composition of PostCSS plugins.
I personally don't think it is healthy or sustainable to attempt to do this, especially considering the marginal improvements to DX.
Isn't it more interesting to solve this in VSCode itself?
The builtin CSS extension has extension points : https://code.visualstudio.com/api/extension-guides/custom-data-extension
Solving it there also benefits users of other tools like LightningCSS. This in turn means that more people capable (knowledge, experience, time, motivation) of helping are working on the same tool instead of all working on separate tools.
There could be more extension points, extension points could be made more powerful, ...
To circle back to the immediate issue of having a public extension that isn't maintained. Is it possible to add a note to the readme and publish this?
This note would indicate that the extension is in need of updates and maintenance and at this time doesn't offer the most ideal experience.
That would take of the pressure of needing to do a major chunk of work today :)
I agree with every point here.
The main issue with this extension is that it causes the built-in CSS language server to stop working. That wasn’t the case when it was released. For that reason, I agree with adding a note to the repo. I don’t want to make people think I’m clawing onto this for bragging rights; it was only ever meant to help folks.
You’ve helped me think about this more clearly. Okay, based on that —
• Is it possible to add a note to the readme and publish this?
Yes, and I will do that. I think it’s a matter of adding a note to the README, and then publishing that to the VSCode extension store. It always takes me an hour to figure out how to log back into that system, but I will. My goal is to have this done by the end of the week, but I’m putting it on my calendar for after work today and tomorrow.
One the subject of the builtin CSS extension having extension points. Those extensions are limited, but I think it would be good to start there. The knowledge curve was high for me to get started, but using those extension points would probably be lower than creating a whole new extension.
Yes, and I will do that. I think it’s a matter of adding a note to the README, and then publishing that to the VSCode extension store. It always takes me an hour to figure out how to log back into that system, but I will. My goal is to have this done by the end of the week, but I’m putting it on my calendar for after work today and tomorrow.
That would be awesome 🙇 Thank you Jon!
One the subject of the builtin CSS extension having extension points. Those extensions are limited,
Yes they are.
It would be nice if they could do more. Support for functions is something I've wanted for quite a while :)
Months passed and still no notes 😢
I can't make meaningful contributions to this package, but I am able to make the builtin support for CSS in VSCode itself better.
Are there still things this extension does that make it useful?
I can only currently think of two things :
@custom-media
@custom-selector
If there is anything else, please let me know so that I can investigate what can be done in VSCode itself.