Skip to content

Commit

Permalink
Merge pull request #286 from alphagov/make-gem-components-work-in-static
Browse files Browse the repository at this point in the history
Make components CSS available to static in the component guide
  • Loading branch information
andysellick committed Apr 30, 2018
2 parents 1f97693 + b33f3ff commit c852ab1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/assets/stylesheets/component_guide/all_components.scss
@@ -0,0 +1 @@
@import "../govuk_publishing_components/all_components";
@@ -0,0 +1 @@
@import "../govuk_publishing_components/all_components_print";
Expand Up @@ -12,6 +12,12 @@
</title>
<%= stylesheet_link_tag "component_guide/application", media: "screen" %>
<%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_stylesheet}" %>
<% if GovukPublishingComponents::Config.static %>
<%= stylesheet_link_tag "component_guide/all_components", media: "screen" %>
<%= stylesheet_link_tag "component_guide/all_components_print", media: "print" %>
<% end %>
<% if GovukPublishingComponents::Config.application_print_stylesheet %>
<%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_print_stylesheet}", media: "print" %>
<% end %>
Expand Down
7 changes: 6 additions & 1 deletion config/initializers/assets.rb
@@ -1 +1,6 @@
Rails.application.config.assets.precompile += %w(govuk_publishing_components/component_guide.css govuk_publishing_components/search-button.png)
Rails.application.config.assets.precompile += %w(
govuk_publishing_components/component_guide.css
component_guide/all_components.css
component_guide/all_components_print
govuk_publishing_components/search-button.png
)

0 comments on commit c852ab1

Please sign in to comment.