4 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 1-2 years
  • United Kingdom
studiowebmedia says

Hello Guys!

First post here, so go easy ;)

I am a couple of weeks away from my submission, really looking forward to getting myself on the marketplace!

I was just wondering, is there any particular way themeforest requires code, more specifically CSS to be laid out?

The reason I ask, is that in my css, i find it easier to work and write, in one line, per selector. (below eg.)

.awesome {width: 100%, border: 2px solid #FDFDFD; background: #1F1F1F;}

Does my code have to be formatted to the following to be approved?

.awesome {
width: 100%;
border: 2px solid #FDFDFD;
background: #1F1F1F;
}

Don’t want to miss out, by such a small thing.

Cheers guys!

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

I think you can write the code as your way in css file, don’t put it in html/php template.

4 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 1-2 years
  • United Kingdom
studiowebmedia says

Hi phpface!

So no inline css at all?

Thanks :)

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

yes, the reviewer will not approve your item, if it have the inline or internal css, thats the item rules :)

4 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 1-2 years
  • United Kingdom
studiowebmedia says

Excellent! Great help! Thanks again.

22 posts
  • Has attended an Envato Live event
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 1-2 years
  • Exclusive Author
  • Referred between 10 and 49 users
  • United States
RescueThemes 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.

4 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 1-2 years
  • United Kingdom
studiowebmedia says

Thanks RescueThemes,

I know it sounds silly, but I just thought that some people may find it hard to read, is they’re not used to seeing CSS laid out like that :p

Better to be safe than sorry I say,

Thanks :)

168 posts
  • Referred between 1 and 9 users
  • Bought between 1 and 9 items
  • Has been a member for 4-5 years
  • Pakistan
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
MsTrends says

Thanks RescueThemes,

I know it sounds silly, but I just thought that some people may find it hard to read, is they’re not used to seeing CSS laid out like that :p

Better to be safe than sorry I say,

Thanks :)

If there are numerous properties in CSS selector its better to write all those vertically, for better readability. However, if there are a few, you can write it horizontally. (just try to make sure customer doesn’t have to scroll horizontally for each selector)

SnoopyIndustries
SnoopyIndustries Recent Posts Threads Started
343 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 1-2 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
SnoopyIndustries says

Guys the reviewers are not some scary monsters. There are some rules regarding code writing but only stuff that’s extremely intuitive. If you write css code in your style.css file without proper breaks the code is impossible to read and edit by others, that’s why it needs proper indentation. Same goes for all other code written.

Otherwise, make sure the HTML passes the w3c validator and that you’re properly commenting your code. That’s about it for HTML.

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

If you’re making WordPress theme, you should follow this guide:

http://make.wordpress.org/core/handbook/coding-standards/css/
by
by
by
by
by
by