1081 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 more
Smartik says

Guys, you really shouldn’t worry about this. Everyone has his coding style, so if you find it easier to write the CSS rules in the same line, do it so, this shouldn’t be a problem at all. Also the buyers can use a CSS beautifier and organize it however they want.

@fitwp, some rules there are just ridiculous. Why shouldn’t I use underscores to define selectors? I like using underscore, because the whole selector is selectable and I will never change this. Seriously.

1148 posts
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
  • Exclusive Author
  • Envato Studio (Microlancer) Beta Tester
  • United States
fillerspace says

@fitwp, some rules there are just ridiculous. Why shouldn’t I use underscores to define selectors? I like using underscore, because the whole selector is selectable and I will never change this. Seriously.
I prefer dashes for a few reasons:
  • They don’t require the shift key to type
  • They match the style of the CSS specification (:first-child, text-decoration, etc)
  • You can use the |=value operator to match attributes beginning with “value” or “value-”

An interesting bit of trivia, the original CSS spec did not allow underscores: https://developer.mozilla.org/en-US/docs/Underscores_in_class_and_ID_Names

136 posts
  • Bought between 1 and 9 items
  • Sold between 5 000 and 10 000 dollars
  • Exclusive Author
  • Europe
  • Has been a member for 0-1 years
WPEnter says

Inline CSS is this (which you shouldn’t do):
<div class="awesome" style="border: 2px solid #FDFDFD; background: #1F1F1F;" />

But it’s fine if you’re entering your style in a stylesheet like this:

.awesome {width: 100%, border: 2px solid #FDFDFD; background: #1F1F1F;}
You won’t be rejected because you’re writing it horizontally instead of vertically. You should consider which is easier for your buyers though for readability.

+1

41 posts
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 0-1 years
  • Exclusive Author
  • Bought between 1 and 9 items
fitwp says


@fitwp, some rules there are just ridiculous. Why shouldn’t I use underscores to define selectors? I like using underscore, because the whole selector is selectable and I will never change this. Seriously.
I prefer dashes for a few reasons:
  • They don’t require the shift key to type
  • They match the style of the CSS specification (:first-child, text-decoration, etc)
  • You can use the |=value operator to match attributes beginning with “value” or “value-”
An interesting bit of trivia, the original CSS spec did not allow underscores: https://developer.mozilla.org/en-US/docs/Underscores_in_class_and_ID_Names

+1, there’re some discussions about this that might help:

http://stackoverflow.com/q/7560813/371240 http://programmers.stackexchange.com/q/141988

By the way, coding standards is not something that forces you to follow. You can have your own style, that’s totally ok. Just keep it consistent, that’s more important.

by
by
by
by
by
by