问题
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
regionin css file and then presstabtwice - 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