Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add note about how Sass & Sprockets don't match

  • Loading branch information...
commit 08341024428f3ab56076ce3df2eb4e166bf7f432 1 parent 4805a65
@roytomeij roytomeij authored vijaydev committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 railties/guides/source/asset_pipeline.textile
View
4 railties/guides/source/asset_pipeline.textile
@@ -19,7 +19,7 @@ Prior to Rails 3.1 these features were added through third-party Ruby libraries
By having this as a core feature of Rails, all developers can benefit from the power of having their assets pre-processed, compressed and minified by one central library, Sprockets. This is part of Rails' "fast by default" strategy as outlined by DHH in his keynote at RailsConf 2011.
-In Rails 3.1, the asset pipeline is enabled by default. It can be disabled in +config/application.rb+ by putting this line inside the application class definition:
+In Rails 3.1, the asset pipeline is enabled by default. It can be disabled in +config/application.rb+ by publicing this line inside the application class definition:
<ruby>
config.assets.enabled = false
@@ -234,6 +234,8 @@ The directives that work in the JavaScript files also work in stylesheets, obvio
In this example +require_self+ is used. This puts the CSS contained within the file (if any) at the precise location of the +require_self+ call. If +require_self+ is called more than once, only the last call is respected.
+NOTE. If you want to use multiple Sass files, use the "Sass +@import+ rule":http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#import instead of the Sprockets directives. Using Sprockets directives all Sass files exist within their own scope, making variables or mixins only available within the document they were defined in.
+
You can have as many manifest files as you need. For example the +admin.css+ and +admin.js+ manifest could contain the JS and CSS files that are used for the admin section of an application.
The same remarks about ordering made above apply. In particular, you can specify individual files and they are compiled in the order specified:
Please sign in to comment.
Something went wrong with that request. Please try again.