Material Design Lite lets you add a Material Design look and feel to your websites. It doesn’t rely on any JavaScript frameworks and aims to optimize for cross-device use, gracefully degrade in older browsers, and offer an experience that is immediately accessible. Get started now
To your Rails application's Gemfile, add
gem 'google_mdl'
And then run
$ bundle
Do one of the following:
To your application.js
file, add:
//= require material.min
OR
If you're using coffee, add
#= require material.min
in your application.js.coffee
.
Do one of the following:
To your application.css
, add
*= require material.min
OR
If you're using sass, add
@import
in your application.scss
.
@import "material.min";
Material Design Lite uses a font called 'Material Icons'. You can either load this font from google, or host it yourself.
Add the following line to your application.html.erb
view layout file,
in the <head>
section:
<%= stylesheet_link_tag "https://fonts.googleapis.com/icon?family=Material+Icons" %>
OR
Use the material_icons
gem to host the font locally.
Getting start with Material Design Lite(MDL)
Bug reports and pull requests are welcome on GitHub at https://github.com/varmad/google_mdl. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.