409 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in India
Dhruv says

Hello, While looking at common rejection factors for CodeCanyon Items, i came across

Inline CSS : Do not use inline CSS . Export all styling to an external stylesheet.

I agree with this, but what if there are some places where i use the style only once and not again in that case i would use inline css

Saving the style in external stylesheet will load it everytime (even though i don’t need it) In that case what should i do…I have used lot of inline styles (all were necessary as the application i am developing is sort of big) but i don’t have any problem in exporting them to external stylesheet.., but that would be useless – as these inline styles are page specific.

But i will go with the rules, it will be easier even for me to have all the styles in single place/file I request forum moderators / product reviewers and top-notch authors to answer this post.

186 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 100+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
Artillegence says

Inline style should be avoided and there is no reason to use them except for email templates , most of the elements can be styled using css selectors, ids and classes in the external stylesheet

409 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in India
Dhruv says

Yes, i know that but…... what if…

let’s say theres 1 link which i want to style differently than others

ex:

Codecanyon

For this which is better

/* External stylesheet */ .link { color: red; text-decoration: underline; } <a href="#" class="link">Codecanyon</a>

or

<a href="#" style="color:red; text-decoration:underline;">Codecanyon</a>

Keeping in mind that this style will be only used once, but will be loaded everytime.

Note : There might be tens or up to hundreds of elements like this.

409 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in India
Dhruv says

The code at place of Codecanyon was

<a href="#">Codecanyon</a>
296 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
theninja says
Although I do see where you’re coming from, there are a few reasons why it’s best to use external stylesheets :
  1. They’re a lot less messy and much easier to edit/customise/update.
  2. Inline CSS is loaded each time, whereas typically (depending how your server is set up of course), external stylesheets will be cached once and won’t have to load each time you view a page.
  3. It’s become a standard practice over the years (like placing links to external stylesheets between the head tags etc).
  4. And lastly, your item won’t be accepted unless you use external stylesheets and it’s best not to argue with the reviewers, they know their stuff lol :P
2529 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Interviewed on an Envato blog
+11 more
JeffreyWay says

Keep it to an external file. :)

409 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in India
Dhruv says
Although I do see where you’re coming from, there are a few reasons why it’s best to use external stylesheets :

Have no idea what it means??? By the way i am from India. ( do you expect us to ask this type of questions :D )

I know external stylesheets are best and i use them all the time + have already used in the application.

I get everything + everypoint..

The only reason i asked this question was if i made use of inline styles will my app get rejected.., and the answer would be most probably yes.

Inline CSS is loaded each time, whereas typically (depending how your server is set up of course), external stylesheets will be cached once and won’t have to load each time you view a page.

Exactly, but the page where i use inline css wont be loaded every time, totally depending on the user.

Anyways, all the inline css i have used i will put them in a new external file. (not much though :D) Thanks.

409 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in India
Dhruv says
Keep it to an external file. :)

Already started moving all the inline css to external css file. :stress:

Thank you.

296 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
theninja says
Although I do see where you’re coming from = Although I understand your point of view
Sorry, I’ll remember to cut back on the lingo in the future, I forget that not everyone speaks the same way abroad. :bigsmile:
Inline CSS is loaded each time, whereas typically (depending how your server is set up of course), external stylesheets will be cached once and won’t have to load each time you view a page.
What I meant by that is imagine a user visits one of your pages that’s using “style.css”, that file is cached and no longer has to be fetched from your server each time a new page is visited, whereas each time a person visits a page with inline CSS , that has to be loaded each time… it won’t make a huge difference but you understand what I mean, right?
831 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
tigerlabs says

If you would like to style only one link differently use a span tag like so..

a { color:black; } span { color:red; }

<a href="">Normal link</a>
<a href=""><span>Unique link</span></a>

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