I have a problem when I trying to format css code. Visual studio gives me unnecessary spaces in css
Before format css code in visual studio :
.test-parent {
}
.test-parent .test-child {
}
.test-parent .test-child .test-child-child {
}
After format css code in visual studio :
.test-parent {
}
.test-parent .test-child {
}
.test-parent .test-child .test-child-child {
}
Is it possible to disable unnecessary spaces in visual studio 2017 ?
press F1 or ctrl+shift+p and then enter beautify .. alt+shift+f did nothing, but typing beautify...
You can also run code cleanup across your entire project or solution. Right-click on the project or solution name in Solution Explorer, select Analyze and Code Cleanup, and then select Run Code Cleanup.
I believe this feature is called "Hierarchical Indentation".
You should be able to disable it by completing the following.
This should stop Visual Studio formatting your CSS in the nested format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With