31 posts
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Microlancer Beta Tester
  • Referred between 1 and 9 users
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • India
TheMetroGuy says

Hi all,

My WordPress theme was soft rejected saying the CSS need improvements and there are some bad practices.

I fixed a few but want to clean it as much as possible before submitting again.

Are there any articles discussing about bad practices, things to avoid?

I already googled and found few. I’m asking in the forums for some expert opinion.

Thanks in advance, Chaitanya.

158 posts
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
  • United States
ThemeProfuse says

You need to use css shorthand code to improve quality

320 posts
  • Exclusive Author
  • Has been a member for 2-3 years
  • Malaysia
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
billyf says

Well, without any ‘preview’ of what you currently have in your codes, it would be a bit difficult to tell you exactly what ‘bad practices’ you have in your codes.

31 posts
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Microlancer Beta Tester
  • Referred between 1 and 9 users
  • Bought between 10 and 49 items
  • Has been a member for 5-6 years
  • India
TheMetroGuy says
1582 posts Don't Worry, Be Happy
  • Beta Tester
  • Grew a moustache for the Envato Movember competition
  • Elite Author
  • United States
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 3-4 years
  • Referred between 200 and 499 users
  • Most Wanted Bounty Winner
+2 more
FinalDestiny says

validate your code through the w3c validator http://jigsaw.w3.org/css-validator

893 posts
  • Author had a Free File of the Month
  • Microlancer Beta Tester
  • Has been a member for 3-4 years
  • Exclusive Author
  • Europe
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
Smartik says

validate your code through the w3c validator http://jigsaw.w3.org/css-validator

0 errors: Link

There are some warnings which can be ignored, like: moz, webkit

320 posts
  • Exclusive Author
  • Has been a member for 2-3 years
  • Malaysia
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
billyf says

Well, I wonder what’s the purpose of all the commented styles? For instance :

width:100%; /*height:250px; */ margin:20px 0px;
Also, why is there a heavy mix of different coding styles, such as some with :
ul#portfolio, ul#portfolio-nav{list-style: none; margin-left:0px;}
But others are coded using this style :
.team ul li.last-in-row div.block{
    margin-right:0px;
}

The latter is the preferred style as it makes code modification easier due to increased legibility.

893 posts
  • Author had a Free File of the Month
  • Microlancer Beta Tester
  • Has been a member for 3-4 years
  • Exclusive Author
  • Europe
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
Smartik says

@TheMetroGuy, separate styles in more .css files. I see that you have media queries in the same .css file which of course is a bad practice. Responsive design should be optional.

161 posts
  • Bought between 1 and 9 items
  • Europe
  • Has been a member for 1-2 years
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
themebros says

Why do you have all selectors start in the same vertical line?

.selector
.child
.child-of-child

It’s not very readable. Do it like:

.selector
    .child
        .child-of-child

Check out the CSS Coding Standards – by the WP team

Which CSS file is your main CSS file (the one with the theme info at the top)?

893 posts
  • Author had a Free File of the Month
  • Microlancer Beta Tester
  • Has been a member for 3-4 years
  • Exclusive Author
  • Europe
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
Smartik says

^ themebros, NO. This is not a reason to get rejected.

by
by
by
by
by
by