Materialize (http://materializecss.com) set up for the Rails 4+ asset pipeline.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
vendor/assets
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
materialize-rails.gemspec

README.md

Gem Version

materialize-rails

materialize-rails makes using Materialize in your Rails 4+ app easy.

This gem may contain custom patches applied on top of the Materialize release. Such releases of materialize-rails are marked as such in the version number.

A lack of custom[0-9]+ means that it only contains the original Materialize release.

NOTE: The 0.97.5 release of Materialize is an exception to this versioning pattern (mostly because I messed up). Its custom release will be 0.97.5.1, 0.97.5.2 etc., hoping the Materialize guys won't ship their own 0.97.5.1.

Installation

Add

gem 'materialize-rails'

to your Gemfile. Then

$ bundle install

and you're done.

Usage

The Materialize files are available to your Rails 4+ app now, but you need to make sure your app actually uses them first.

Stylesheets

Import the Materialize styles into your stylesheets.

@import "materialize";

This can be done in any .scss file that is part of your application.

JavaScript

Add this line to your app/assets/javascripts/application.js:

//= require materialize

Since Materialize depends on jQuery, that line needs to be included after jQuery, e. g.

//= require jquery2
//= require materialize

You want to contribute?

  1. Fork materialize-rails.
  2. Add your contributions in a branch on your fork.
  3. Push the changes in your branch.
  4. Create a new pull request.

Please note that Materialize-based contributions should go to their GitHub account, so your changes can be included right at the source.