0

I'm working on a woothemes.com Wordpress template (specifically the 'Simplicity' theme) and I am trying to follow the rules they set out for manipulating CSS, which word for word is:

WARNING! DO NOT EDIT THIS FILE!

To make it easy to update your theme, you should not edit the styles in this file. Instead use the custom.css file to add your styles. You can copy a style from this file and paste it in custom.css and it will override the style in this file. You have been warned! :)

Pretty obvious I think. So by following the rules, how do I effectively cancel out an entire CSS selector (I think I could manually set each selector element to 0, but is there a more elegant way of doing this?):

.entry img, img.thumbnail { margin-bottom: 10px; padding: 2px; border: 1px solid #ddd; background:#fff;  

    /* Box Shadow */
    -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

In pseudo code I'd write:

.entry img, img.thumbnail { 

       clear-all-styles;

}

But obviously that won't work :)

fakeguybrushthreepwood
  • 2,983
  • 7
  • 37
  • 53
  • I think you'll have to manually set all of the styles to `0`, there isn't (at least, as far as I am aware) something to remove all styles like you want. –  Nov 30 '12 at 10:32
  • possible duplicate of [Cancel some CSS Style](http://stackoverflow.com/questions/11827200/cancel-some-css-style) – Jukka K. Korpela Nov 30 '12 at 10:38

1 Answers1

1

There is no such way of disabling styles in css, you'll have to do it manually as you do it in your first example.

As a matter of fact, that is the same way that css guru Eric Meyer uses to reset styles in his famous reset.css file.

Nelson
  • 49,283
  • 8
  • 68
  • 81
  • Hmm, this is an excellent point thinking of all the reset files I've seen before. Would be easy just to say 'RESET', but obviously that's not a possibility. Thank you for introducing me to Eric Meyer! – fakeguybrushthreepwood Nov 30 '12 at 10:45
  • In CSS there is no RESET, as you put it, because it should never be needed in the first place if browsers did actually followed the CSS spec. I mean, in the CSS spec there are default values for each property, if all browsers implemented these default values as published in the spec then there would be no need to `reset.css` files . – Nelson Nov 30 '12 at 10:57