Compress css files with Rails

Hi,
I work on a website with many css files. To improve the performance of
the site I would to merge all my css file into one on the production
site.
I know I could do this using plugins, but I heard it is possible
natively within rails.

Does someone know what it is?
Greg

See the :cache => true option of stylesheet_link_tag http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M002231

Felix

stylesheet_link_tag with the :cache option.

Cheers,

Andy

See the :cache => true option of stylesheet_link_tag http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M002231

You don’t have to use true either - you can use a string (so if you have more than one layout each using a different set of stylesheets you can create individual cache files for each layout).

Cheers,

Andy

Felix Schäfer wrote:

Is there an option to remove all useless content in the files? such as
comments.

Greg Ma wrote:

Is there an option to remove all useless content in the files? such as
comments.

If you use Sass (which I highly, highly recommend) then this is done for
you. You get lots of other advantages too.

Best,

Marnen Laibow-Koser wrote:

If you use Sass (which I highly, highly recommend) then this is done for
you. You get lots of other advantages too.

Best,
--
Marnen Laibow-Koser

What is Saas?

http://sass-lang.com/

Best regards

Peter De Berdt

Peter De Berdt wrote: