via ajaxian:

Rafael Lima took inspiration from 37 Signals browser selector idea and created it. “It” being a JS library that allows you to create browser specific CSS to be merged into your normal classes.

Example

You can prefix browser specific elements (available codes: ie, gecko, opera, konqueror, safari) and the library will make sure that the correct items are added in for a particular browser.

This can be considered cleaner than some of the really ugly hacks that you normally face.

HTML:

  1. type=“text/css”>
  2. .ie .example {
  3. background-color: yellow
  4. }
  5. .gecko .example {
  6. background-color: gray
  7. }
  8. .opera .example {
  9. background-color: green
  10. }
  11. .konqueror .example {
  12. background-color: blue
  13. }
  14. .safari .example {
  15. background-color: black
  16. }
  17. .example {
  18. width: 100px;
  19. height: 100px;
  20. }

CSS Browser Selector