Created
May 3, 2013 04:33
-
-
Save uu59/5507222 to your computer and use it in GitHub Desktop.
YUIなしでcssをminifyする ref: http://qiita.com/items/95cd753fa824e5d2890e
This file contains 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
require "sass" | |
css = <<CSS | |
body { | |
color: red; | |
background-color: black; | |
} | |
img.dokuro { | |
display: inline-block; | |
-moz-animation: spin 2s infinite linear; | |
-o-animation: spin 2s infinite linear; | |
-webkit-animation: spin 2s infinite linear; | |
animation: spin 2s infinite linear; | |
} | |
body:before, body:after { | |
content: "Welcome to Underground"; | |
} | |
CSS | |
puts css | |
puts | |
puts "--- ↓ ---" | |
puts | |
puts Sass::Engine.new(css, :syntax => :scss, :style => :compressed).render |
This file contains 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
body { | |
color: red; | |
background-color: black; | |
} | |
img.dokuro { | |
display: inline-block; | |
-moz-animation: spin 2s infinite linear; | |
-o-animation: spin 2s infinite linear; | |
-webkit-animation: spin 2s infinite linear; | |
animation: spin 2s infinite linear; | |
} | |
body:before, body:after { | |
content: "Welcome to Underground"; | |
} | |
--- ↓ --- | |
body{color:red;background-color:black}img.dokuro{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}body:before,body:after{content:"Welcome to Underground"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment