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!

177 posts
  • Has referred 10+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 1+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 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 :)

177 posts
  • Has referred 10+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 1+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+3 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.

113 posts
  • Won a competition
  • Has sold $40,000+ on Envato Market
  • Joined us in one of our Envato Live Events
  • 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 :)

173 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
399 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
  • Joined an Envato Football competition
+3 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.

42 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 1 year
+2 more
fitwp says

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

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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by