Sign up to create your own snipts, or login.

Public snipts » catcubed's snipts » Easy css hacks using SASS

posted on Dec 02, 2009 at 3:39 p.m. EST in 
  • //Easy CSS Hacks using SASS
    // In most cases, you'll never need the 3rd, or 4th hacks here.
    
    #idtag
    	* html &
    		//IE6 and below
    		cssstyle: value
    	* first-child+html &
    		//IE7 only
    		cssstyle: value
    	html>body &
    		//IE7,IE8, and modern browsers
    		cssstyle: value
    	html:first-child &
    		//Opera only 9 and below
    		cssstyle: value
    	
    

    copy | embed

2 Comments

on Dec 09, 2009 at 12:13 a.m. EST
I think in most cases it's nicer to use IE's conditional comments, rather than these hacks
on Jan 02, 2010 at 9:26 p.m. EST
Depends on the site but usually you are correct.
Sign up, or login to leave a comment.