Skip to content

Instantly share code, notes, and snippets.

@uu59
Created May 3, 2013 04:33
Show Gist options
  • Save uu59/5507222 to your computer and use it in GitHub Desktop.
Save uu59/5507222 to your computer and use it in GitHub Desktop.
YUIなしでcssをminifyする ref: http://qiita.com/items/95cd753fa824e5d2890e
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
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