Sha256: 1fc524c951e875ef136c6bf9dbda81ac03ea841018347a95d4b3076f9171b8e6
Contents?: true
Size: 1.77 KB
Versions: 2
Compression:
Stored size: 1.77 KB
Contents
# GOV.UK Elements Rails gem A gem wrapper around [govuk_elements](http://github.com/alphagov/govuk_elements) that pulls stylesheet and javascript files into a Rails app. ## Installing Just include `govuk_elements_rails` in your `Gemfile`. It automatically attaches itself to your asset path so the static/SCSS files will be available to the asset pipeline. ### Development If you are installing from git, ensure you enable submodules like so: gem 'govuk_elements_rails', :git => "https://github.com/ministryofjustice/govuk_elements_rails.git", :submodules => true ## Usage At the top of a Sass file in your Rails project you should use an `@import` rule to include the file for the mixins you require. For example here are all the imports possible: @import 'elements/helpers'; @import 'elements/reset'; @import 'elements/elements-typography'; @import 'elements/layout'; @import 'elements/forms'; @import 'elements/tables'; @import 'elements/buttons'; @import 'elements/details'; @import 'elements/lists'; @import 'elements/panels'; @import "elements/icons"; In the `app/assets/javascripts/application.js` file in your Rails project use `require` rule to include the files for the javascript enhancements you require. For example here are all the requires possible at present: // from govuk_elements gem //= require details.polyfill //= require bind //= require selection-buttons ## Alternate ways to reuse GOV.UK Elements There are other alternate ways to include GOV.UK Elements files in a Rails project, for example via `Bower`. Feel free to use an alternate approach if it is more appropriate for your team. ## Feedback Please provide feedback via [GitHub issues](https://github.com/ministryofjustice/govuk_elements_rails/issues).
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
govuk_elements_rails-0.1.1 | README.md |
govuk_elements_rails-0.1.0 | README.md |