CSS region not working in Visual Studio 2012

删除回忆录丶 提交于 2019-12-22 03:25:24

问题


I have the following in my css file but css region doesn't work. There's no collapse or expand icon to click on.

But the C# region is working, just css region isn't.

/*#region shared styles */
.blah { background-color: red; }
.foo { line-height: 1.2em; }
/*endregion */

回答1:


Your missing the '#' between the '*' and 'endregion'

try

/*#region shared styles */

.blah { background-color: red; }

.foo { line-height: 1.2em; }

/*#endregion */



回答2:


Not sure why, but after doing this, it works now:

  • type region in css file and then press tab twice
  • it automatically insert the css region signature

after that, it works on newly created css regions. but my old css region still doesn't work.




回答3:


Visual Studio does not support CSS regions.

You need to install the Web Essentials 2012 extension, which adds CSS regions, along with a slew of other nice features.



来源:https://stackoverflow.com/questions/13056096/css-region-not-working-in-visual-studio-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!