CSS Brace Styles

I can't figure out how the standard (or simply popular) binding style name applies to CSS. Here are all the brace styles:

/* one - pico? */
selector { property: value; 
           property: value; }

/* two - pico extra */
selector { 
    property: value; /* Start Properties on Newline */
    property: value; }

/* three - horstmann? */
selector 
{ property: value;
  property: value;
}

/* four - GNU? */
selector 
{ 
    property: value; /* Start Properties on Newline */
    property: value;
}​

/* five - GNU Saver */
selector { property: value;
           property: value;
}

/* six - CSS Default */
selector { 
    property: value; /* Start Properties on Newline */
    property: value;
}

/* seven - Braces Aligned */
selector { property: value;
           property: value;
         }

/* eight - Banner? */
selector {
    property: value; /* Start Properties on Newline */
    property: value;
    }

Can someone name each brace style for me?

Many thanks!

+5
source share
4 answers

I would say that three is Horstman.

Pico as it is, but the opening brace begins with a new line.

The banner will be:

selector {
    property: value;
    property: value;
    }

The rest of your guesses seem correct.

I took most of them from Indentation on Wikipedia :)

+7
source

I think you yourself named the most popular indentation styles. I personally prefer:

.class {
  property: value;
}
+2
source

css .
:
.foo {width:100%;height:550px;}

?

/* Nine - Almost-optimized(?) */
selector { property: value; property: value; }

+1

Allman Style

+1

All Articles