when I run this nothing happens
Environment
- VSCode Version: 1.66.2
- OS Version: Windows 11
Actual behavior
nothing happens when I run "PostCSS Sorting: Run"
Expected behavior
it should sort
Steps to reproduce
press f1 and run "PostCSS Sorting: Run"
I've managed to run it by installing Sass extension
Even after installing that extension, it does nothing when I run it.
The following HTML file is unchanged when running "PostCSS Sorting: Run":
<html>
<head>
<title>foo</title>
<style lang="css">
p {
display: inline-block;
color: red;
}
</style>
</head>
<body>
<p>foo</p>
</body>
</html>
Yet if I reverse the order of the two entries under p and run the sort again, the file is still unchanged. They can't both be sorted correctly :)
(Just to save a bit of time — this extension does work in the <style> section of .svelte files, right? Because nothing else I've tried so far does, and that's what I need it for…)
(Just to save a bit of time — this extension does work in the
<style>section of.sveltefiles, right? Because nothing else I've tried so far does, and that's what I need it for…)
I came here in my same search and had the same issue as you. Did you find any extension/plugin that worked?
(Just to save a bit of time — this extension does work in the
<style>section of.sveltefiles, right? Because nothing else I've tried so far does, and that's what I need it for…)I came here in my same search and had the same issue as you. Did you find any extension/plugin that worked?
No; the only solution I found was to set up stylelint and add sorting rules (I used @p233/stylelint-config-scss) then manually reorder when lines were highlighted as being sorted incorrectly. (Having keyboard shortcuts bound to Move Line Up and Move Line Down is essential :)
It's more tedious than just hitting the reformat button, but the immediate feedback helps a lot.
(Just to save a bit of time — this extension does work in the
<style>section of.sveltefiles, right? Because nothing else I've tried so far does, and that's what I need it for…)I came here in my same search and had the same issue as you. Did you find any extension/plugin that worked?
No; the only solution I found was to set up stylelint and add sorting rules (I used @p233/stylelint-config-scss) then manually reorder when lines were highlighted as being sorted incorrectly. (Having keyboard shortcuts bound to Move Line Up and Move Line Down is essential :)
It's more tedious than just hitting the reformat button, but the immediate feedback helps a lot.
I basically came to the same conclusion! Thank you for the info and confirmation 🙂
So does this mean this extension doesn't work anymore? is it a dead project?
So does this mean this extension doesn't work anymore? is it a dead project?
Partially, it seems. Only alphabetical sorting works for me.