-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Please fork and upgrade VSCode CSSComb extension #30
Comments
Hi there! I have unfortunately run into some other problems with CSSComb and don't plan to continue working on it. The underlying AST generator, Gonzales-PE, is very out-of-date and has several bugs that would require drastic rewrites. Instead, I have decided to use StyleLint, which can do everything CSSComb does. It also has a VSCode plugin that works very well. I would recommend you also take a look at StyleLint. |
I have already tried it yesterday. Styleint offers the support for the plugin to sort alphabetically the element properties, but no longer supports the depreciated style formatting configurations, nor aligning the CSS vendor prefixes or the Allman style. I also tried ESLint, JS Beautify, Prettier, and PostCSS. ESLint and JS Beautify support only the Allman style, Prettier does not support any of these three options, and PostCSS supports only the CSS vendor prefixes alignment. As you are using Styleint, if you know to use Allman style, to sort CSS element properties alphabetically, and to align the CSS vendor prefixes, please let me know. CSSComb is the only that supports all these three options. |
You can still use the style formatting options by getting this package: https://www.npmjs.com/package/stylelint-stylistic
Stylelint-stylistic has the option to place your curly braces as you want. For example if you use the option stylistic/block-opening-brace-newline-after
Get this plugin package: https://github.com/hudochenkov/stylelint-order
I haven't found a plugin that does this, but it's not too hard to write your own. You can also try using this plugin so you don't need vendor prefixes: https://www.npmjs.com/package/autoprefixer |
@gusbemacbe could probably make a plugin to align the vendor prefix if you can't figure it out. But I would want to know you got the rest working before I start on it. |
As I have ended my job journey now, I am going to test it and report it to you. |
It does not work yet. Allman's style and vendor prefix alignment did not give effect. My {
"extends":
[
"autoprefixer",
"stylelint-config-standard",
"stylelint-config-standard-scss",
"stylelint-order",
"stylelint-stylistic/config"
],
"plugins":
[
"stylelint-order"
],
"rules":
{
"order/order":
[
"custom-properties",
"declarations"
],
"stylistic/block-opening-brace-newline-before": "always",
"stylistic/block-opening-brace-newline-after": "always"
}
} |
Here's mine; you may need to change yours a bit. In particular it looks like you forgot to add
|
Your configuration file worked, but the Allman style did not give effect. I tried to make my own CSS vendor prefixes alignment plugin for more than eight different forms, but it wasn't successful. |
Note that my configuration file does not use Allman style. Did you make sure to add the correct rules? |
I apologise for my absence. I have been attempting to build a CSS vendor prefixes alignment plugin, but written in Python, and it worked. As for the Allman style setting in the body
{
padding: 0;
margin: 0;
font-family: sans-serif;
font-size: 16px;
line-height: 1.5;
color: #FFFFFF;
background-color: #000000;
h1
{
margin-bottom: 0.5em;
font-size: 2em;
line-height: 1.25;
a
{
color: #FFFFFF;
text-decoration: none;
}
}
} I think that it is better to stick with your upgraded version of CSSComb that is less complicated than Stylelint. If you would like to see my CSS vendor prefixes alignment and Allman style (it worked only partially) written in Python, follow:
|
Good morning, @calculuschild!
I saw you forked and upgraded CSSComb library and installed it via the command
pnpm i -g calculuschild/csscomb.js
. I was pleased to see that it worked very well.Of course that you want to pull request your new commits into that original repository, but the repository authors no longer answer.
However, @mrmlnc archived and discontinued https://github.com/mrmlnc/vscode-csscomb. Please, can you fork and upgrade, so I would be able to use this extension to format my CSS files at VSCode?
Thank you so much!
The text was updated successfully, but these errors were encountered: