0

I have a quite unique way of typin css. It is in a way that makes me understand my code a whole lot better, than just randomly putting things everywhere. This allows me to use one file with no problem, rather than putting my project into a whole lot of different css files, that would end up in me having to compile them afterwards.

Let us consider:

body
{
    margin: 0;
    padding: 0;
}

I then most of the time, want to create another styling of a different element, tabbed in one from the previous one.

body
{
    margin: 0;
    padding: 0;
}
    header
    {
        width: 100%;
        height: 233px;
    }

But upon doing so, the cursor jumps back to the very start of the line, simply by hitting enter after body, as well as upon creating the brackets after the header, in this case. This is very time consuming, as I have to indent manually after creating the brackets, as well as the header.

Especially for the brackets, which automatically after being created ends up like the following:

    header
{

}

It there a setting to disable, or change, this default behavior?

4

1 回答 1

0

最好的答案是摆脱你独特的 typin css 方式并使用 css 样式指南,例如:https ://google.github.io/styleguide/htmlcssguide.xml

对您的问题的不同答案是使用 Sublime Text,据我所知,它可以满足您的需求。因此,“问题”可能出在您的编辑器上。

于 2016-12-23T12:15:52.910 回答