Optional document format in visual studio. CSS tag formatting

When I work in VS2008, I very often use Ctrl + K + D, as it saves a lot of time.

But in CSS files, this command formats the document in a way that I don't really like.

For example, when I automatically format a document,

.Foo
{
width:1px;
height:2px;
}

However, I like to format tags this way, since they are much easier to read (in my opinion):

.Foo
{ width:1px;
  height:2px; }

So, is there a way I can implement this?

I seem to need the Tag specific options function, but I'm not quite sure how to do this.

Thank.

+3
source share
2 answers

, ;

css ( ) " ( , )"

css

.foo
{
    font-weight: bold;
    color: #ff0000;
}

.foo { font-weight: bold; color: #ff0000; }

( , , , , , .)

+2

Visual Studio, , , :

. # ( ) .

Screenshot of the CSS text formatting options dialog in Visual Studio 2008

+7

Source: https://habr.com/ru/post/1737374/


All Articles