Visual Studio 2017禁用CSS格式化不必要的空格 [英] Visual studio 2017 disable css formatting unnecessary spaces
本文介绍了Visual Studio 2017禁用CSS格式化不必要的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试格式化CSS代码时遇到问题. Visual Studio在CSS中给了我不必要的空间
I have a problem when I trying to format css code. Visual studio gives me unnecessary spaces in css
在Visual Studio中格式化CSS代码之前:
Before format css code in visual studio :
.test-parent {
}
.test-parent .test-child {
}
.test-parent .test-child .test-child-child {
}
在Visual Studio中格式化CSS代码后:
After format css code in visual studio :
.test-parent {
}
.test-parent .test-child {
}
.test-parent .test-child .test-child-child {
}
是否可以在Visual Studio 2017中禁用不必要的空间?
Is it possible to disable unnecessary spaces in visual studio 2017 ?
推荐答案
我相信此功能称为分层缩进".
I believe this feature is called "Hierarchical Indentation".
您应该可以通过完成以下操作来禁用它.
You should be able to disable it by completing the following.
- 点击工具"菜单
- 单击选项...
- 向下滚动并展开文本编辑器
- 向下滚动并展开CSS
- 选择高级
- 将分层缩进"设置为关".
这应该停止Visual Studio以嵌套格式格式化CSS.
This should stop Visual Studio formatting your CSS in the nested format.
这篇关于Visual Studio 2017禁用CSS格式化不必要的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文