-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Replace Less #15565
Comments
I think plain CSS with https://www.npmjs.com/package/postcss-nesting is the way to go nowadays. Once enough browsers support native CSS nesting, the plugin can just be removed. This is btw also what vite recommends. |
I wonder whether we should just convert the Less to CSS and commit the output as-is, without any nesting. It will produce long selectors for the nesting cases, but personally I prefer no nesting because it'll make the selectors from browser devtools CTRL-F able in the source which is very helpful when searching for specific selectors. Also, not using nesting encourages developers to write shorter and better selectors. I think it's a net benefit to not have nesting. |
Absolutely agreed. |
Ran most of the Less files through the Less compiler and Prettier and then followed up with a round of manual fixes. The Less compiler had unfortunately stripped all `//` style comments that I had to restore (It did preserve `/* */` comments). Other fixes include duplicate selector removal which were revealed after the transpilation and which weren't caught by stylelint before but now are. Fixes: #15565
Ran most of the Less files through the Less compiler and Prettier and then followed up with a round of manual fixes. The Less compiler had unfortunately stripped all `//` style comments that I had to restore (It did preserve `/* */` comments). Other fixes include duplicate selector removal which were revealed after the transpilation and which weren't caught by stylelint before but now are. Fixes: go-gitea#15565
Less is a rather dead project which does not support recent CSS features as seen in #15520. I suggest moving to either SCSS or plain CSS.
Thoughts on SCSS:
Thoughts on CSS:
The text was updated successfully, but these errors were encountered: