Skip to content


Add css compression via yui-compressor #11

merged 1 commit into from

2 participants


I wanted yui-compressor to minify my css so I just add it together with the js compression when options[:minify] is given

@nightsailer nightsailer merged commit fcf5119 into nightsailer:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 9, 2012
  1. @dommmel

    Add yui compression for css

    dommmel committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/padrino/sprockets.rb
5 lib/padrino/sprockets.rb
@@ -58,6 +58,11 @@ def initialize(app, options={})
@environment.append_path 'assets/stylesheets'
@environment.append_path 'assets/images'
if options[:minify]
+ if defined?(YUI)
+ @environment.css_compressor =
+ else
+ puts "Add yui-compressor to your Gemfile to enable css compression"
+ end
if defined?(JSMin)
@environment.register_postprocessor "application/javascript", ::Sprockets::JSMinifier
Something went wrong with that request. Please try again.