4 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in 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!

142 posts
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
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
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United Kingdom
studiowebmedia says

Hi phpface!

So no inline css at all?

Thanks :)

142 posts
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
phpface says

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

4 posts
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United Kingdom
studiowebmedia says

Excellent! Great help! Thanks again.

38 posts
  • Won a competition
  • Has sold $10,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United States
+6 more
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
  • Has been part of the Envato Community for over 1 year
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in 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 :)

171 posts
  • Has referred 1+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Has been part of the Envato Community for over 4 years
+2 more
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
360 posts
  • Has sold $40,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 2 years
  • Has referred 10+ members
+2 more
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
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
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