Skip to content

Instantly share code, notes, and snippets.

@ideefixe
Created January 22, 2013 21:08
Show Gist options
  • Save ideefixe/4598448 to your computer and use it in GitHub Desktop.
Save ideefixe/4598448 to your computer and use it in GitHub Desktop.
Conditional CSS
[if {!} browser]
[if {!} browser version]
[if {!} condition browser version]
! - indicates negation of the statement (i.e. NOT) - optional
browser - states which browser the statement targets
'IE' - Internet Explorer
'Gecko' - Gecko based browsers (Firefox, Camino etc)
'Webkit' - Webkit based browsers (Safari, Chrome, Shiira etc)
'SafMob' - Mobile Safari (iPhone / iPod Touch)
'Opera' - Opera's browser
'IEMac' - Internet Explorer for the Mac
'Konq' - Konqueror
'IEmob' - IE mobile
'PSP' - Playstation Portable
'NetF' - Net Front
version - which version of the browser in question should be considered
condition - arithmetic operator
lt - Less than
lte - Less than or equal to
eq - Equal to
gte - Greater than or equal to
gt - Greater then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment