Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use application.css and sprockets' "require"

This should reduce the occasions where someone neglects to
add a new (CSS) asset to the list for precompilation.

New JS assets in app/assets/stylesheets will be picked up automatically.
New JS assets in vendor/assets/stylesheets or lib/assets/stylesheets
will need to be require'd in app/assets/stylesheets/application.css
  • Loading branch information...
commit 91c9548417d4979afbe01e5a45b8687f8eb47ec3 1 parent 20f6024
@jamiecobbett jamiecobbett authored
View
18 app/assets/stylesheets/application.css
@@ -1,7 +1,19 @@
/*
- # app/assets/stylesheets/application.css
- *= require formtastic-bootstrap
-*/
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require_tree .
+ *= require bootstrap.min
+ *= require chosen
+ *= require formtastic-bootstrap
+ */
body {
padding-top: 40px;
View
1  app/views/artefacts/_form.html.erb
@@ -95,4 +95,3 @@
}
</script>
<% end %>
-<% content_for :extra_headers, stylesheet_link_tag('chosen') %>
View
2  app/views/layouts/application.html.erb
@@ -3,7 +3,7 @@
<head>
<title><%= yield :page_title %> | GOV.UK Panopticon</title>
<%= csrf_meta_tags %>
- <%= stylesheet_link_tag 'bootstrap.min.css', 'application.css' %>
+ <%= stylesheet_link_tag 'application.css' %>
<%= yield :extra_headers %>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
View
3  config/application.rb
@@ -25,8 +25,7 @@ class Application < Rails::Application
config.assets.version = '1.0'
config.assets.prefix = '/assets'
- config.assets.precompile += %W(application.css bootstrap.min.css bootstrap-responsive.min.css chosen.css
- html5.js)
+ config.assets.precompile += %W(html5.js)
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/app/repositories)
Please sign in to comment.
Something went wrong with that request. Please try again.