Visual studio 2017 disable css formatting unnecessary spaces

前端 未结 1 1874
攒了一身酷
攒了一身酷 2021-02-05 09:09

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-pare         


        
相关标签:
1条回答
  • 2021-02-05 09:45

    I believe this feature is called "Hierarchical Indentation".

    You should be able to disable it by completing the following.

    • Click the Tools menu
    • Click Options...
    • Scroll down and expand Text Editor
    • Scroll down and expand CSS
    • Select Advanced
    • Set Hierarchical indentation to "Off".

    This should stop Visual Studio formatting your CSS in the nested format.

    0 讨论(0)
提交回复
热议问题