Created
          March 24, 2011 19:17 
        
      - 
      
- 
        Save irae/885661 to your computer and use it in GitHub Desktop. 
    Idea for CSS Compiler
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* My wish for a new CSS parser/compiler */ | |
| /* input */ | |
| @define avatar-float { | |
| variable:$direction; | |
| float:$direction; | |
| margin-$direction:5px; | |
| padding:5px; | |
| } | |
| #conversation | |
| .from-me {avatar-float:left;background:#ffd;} | |
| .from-friend {avatar-float:right;background:#fdf;} | |
| /* output */ | |
| #conversation .from-me {float:left;margin-left:5px;padding:5px;background:#ffd;} | |
| #conversation .from-friend {float:right;margin-right:5px;padding:5px;background:#fdf;} | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Also, sprites could be done inline with output defined with css sintax:
background:url('/images/assets/h-feed.png') sprite('/images/production/icons.png') no-repeat 0 0;