Override Inline Styles from the Stylesheet

Just quick-posting this for my own reference to tumblr because I haven’t tested on any other browsers but firefox, BUT… this works:

span[style^=""]{
    color: inherit !important;
    font-size: inherit !important;
}

Add any other properties you like. This essentially tells the browser that if it finds any spans with a style applied, to ignore and inherit from the stylesheet (pretty much).

It’s tough to account for every possible element you could put an inline style on, but with CMS’ particularly Wordpress, the standards is to wrap it in a span.

Why? - because it’s annoying when I see a nice pretty design of mine get torn to shreds by florescent colors in an inline style. I only do this on very rare occasions when I have a client who I know is likely to mark up their content in weird ways and I also know the integrity of their site is important and I want to make sure things stay clean and classy.

It’s also not a bad idea for working with a social network site where you’re allowed to add to the existing stylesheet but can’t actually alter it. And worse, when they put inline styles in, either because they don’t want you messing with that part of your profile, or more common, they just don’t know about web standards. :)

May 3, 2008 8:19pm (1 week ago)|

May 3, 2008 11:25am (1 week ago)|

May 3, 2008 11:25am (1 week ago)|
  • Link: Crazy Video

    This is crazy! Who is creative enough to come up with this!?


May 2, 2008 9:05am (2 weeks ago)|
  • Link: Have JavaScript, Will Travel

    The technology of the web is maturing. However slowly and clumsily, it is maturing. The web of today looks nothing like the web of ten years ago. Most notable are the advent and widespread adoption…

May 1, 2008 11:40pm (2 weeks ago)|

To see her at work in that little wooden high chair of hers, legs dangling, jaw pulsing, is like watching a woodsman fell an oak with a plastic butter knife.

Mom-101: Oh Irony, How You Taunt My Youngest Child With Your Cruel Literary Device Ways

April 30, 2008 10:34pm (2 weeks ago)|
  • Link: Starting with CSS and bug fixing tips

    I receive a lot of e-mail per day and some of them are from people who want my help on CSS or if I know why certain things don’t work or show up in IE 6 or 7 etc. If I could help fix their…

April 30, 2008 5:15pm (2 weeks ago)|

Word Game Wednesday

Christa’s word game this week:

  • PARACHUTE

I couldn’t get 15 and only got half of these by using a dictionary. As always, it’s a tough one!

  • PERCH
  • CHUTE
  • CHART
  • HATER
  • HAUTE
  • THECA

5 letters but proper nouns

  • PERTH
  • PRUTH
  • THERA

other words

  • PATH
  • CHAT
  • HAT
  • RHEA

April 30, 2008 9:59am (2 weeks ago)|
  • Link: Strip Paragraph Tags

    add_filter('the_excerpt', 'mdwp_strip_p'); - this function should be able to be used anywhere but I’ve only ever needed to do this when markdown is involved, so markdown.php and change this line…

April 30, 2008 7:11am (2 weeks ago)|
  • Link: Regarding Backups

    Now that I have a baby, I’m taking a lot more pictures and recording a lot more video than I ever have before. And as you can imagine, I’d hate to lose any of it. So I spent some time over the last…

April 29, 2008 8:20pm (2 weeks ago)|