Do I have to use a WordPress specific CSS reset, or is a normal, Eric Meyer style CSS reset fine?

The great starter theme _S for WordPress has the following CSS reset included, which works pretty well I find: https://gist.github.com/4173728

But I prefer the Eric Meyer one, which I’m sure you’re all familiar with.

Read More

I find I run into problems with the _S one because I’ll be wondering why something isn’t reacting as it should do my styling, and I look, and the reset file has a 1.5em adjustment on something, or a float:left on another thing. Dealing with style I didn’t input myself is the main reason I use CSS resets in the first place.

BUT, my question stems from the fact that the _S reset CSS has these seemingly WordPress specific aspects to it, like:

#searchsubmit {
    display: none;
}

and

.assistive-text {
    clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
}

So am I missing out on things by using on a non-Wordpress-specific CSS reset? Would I be better off just tailoring it to be more close to what I want?

Related posts

Leave a Reply

2 comments

  1. WordPress doesn’t add any CSS to your site, at least not by default, other than a little bit for the admin bar. For the most part, all of the CSS is added by your theme or by a plugin, though there might be an exception or two.

    WordPress functions do generate a lot of ids and classes though, but those shouldn’t matter for a CSS reset. A ‘reset’ normalizes browser defaults for things like lists, tables, paragraphs and other basic markup. You don’t ‘reset’ specific ids or classes because there are no browser defaults. So, really what you have listed isn’t really a reset.

    If you are happy with your reset, keep it. WordPress is not special as per what is or is not a good reset.

  2. Well, your linked gist is not a reset. Reset implies that it provides you with a blank slate — that one doesn’t, it looks more like normalize.css.

    There is not official WordPress CSS reset. If you’re building a theme you can use what you like.

    However, there are several WordPress generated CSS classes that you should account for. As long as you do that, your theme will play nice with WP and you have nothing to worry about.