Skip to content

Commit

Permalink
sass support and simplied stylesheet include
Browse files Browse the repository at this point in the history
  • Loading branch information
Chad Pytel committed Oct 27, 2010
1 parent 7358f9f commit 6a74102
Show file tree
Hide file tree
Showing 14 changed files with 486 additions and 18 deletions.
8 changes: 8 additions & 0 deletions README.textile
Expand Up @@ -24,6 +24,14 @@ Flutie registers a :flutie shortcut for stylesheets, so in your layout you can d

...this will include all the flutie stylesheets, then the 'admin' stylesheet, and it will cache them all into one file.

h3. Sass

If you use Sass in your application, the flutie stylesheets are also available as scss files, installed in public/flutie/sass. This location is automatically added to your Sass template load path. These files can be imported into your own css files for use with the following:

@import "flutie"

h3. Custom Styles

To add custom styles to the styleguide add partials to the app/views/styleguides directory. For example:

bc. app/views/styleguides/_todo_item.erb:
Expand Down
10 changes: 1 addition & 9 deletions config/initializers/expansion.rb
@@ -1,9 +1 @@
ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :flutie => [
'/flutie/stylesheets/reset',
'/flutie/stylesheets/defaults',
'/flutie/stylesheets/type',
'/flutie/stylesheets/forms',
'/flutie/stylesheets/tables',
'/flutie/stylesheets/lists',
'/flutie/stylesheets/screen'
]
ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :flutie => [ '/flutie/stylesheets/flutie' ]
3 changes: 3 additions & 0 deletions config/initializers/sass.rb
@@ -0,0 +1,3 @@
if defined?(Sass::Plugin) && defined?(Rails)
Sass::Plugin.add_template_location(Rails.root.join('public', 'flutie', 'stylesheets', 'sass').to_s)
end

0 comments on commit 6a74102

Please sign in to comment.