Remove font-smoothing/text-antialising in Internet Explorer 7

You could think this is not possible without messing up with IE7 preferences.

Well, I’ve just accidentally discovered you can actually do it using CSS only. Here’s the trick:

In the very last CSS file you load, insert


* {
filter: none;
}

Reload your page and see the magic happen.

If you want to remove the smoothing from a specific element, use any other CSS selector. Don’t forget to add * at the end of it to match all contained children as this doesn’t seem to be an inherited property.

You’ll also notice this “hack” gives layout to the element. It’s sometimes even more stronger than the usual zoom:1 or min-height:0!

Happy hacking!