Coder Social home page Coder Social logo

mkhairi / material-sass Goto Github PK

View Code? Open in Web Editor NEW
55.0 7.0 13.0 3.53 MB

A rubygem of Material Design for Bootstrap 4

Home Page: http://daemonite.github.io/material/

License: MIT License

Ruby 100.00%
material bootstrap rubygem css rubyonrails bootstrap4 rails rubygems bootstrap-material-design

material-sass's Introduction

Material-sass Gem Version

material-sass is a rubygems version of Material Design for Bootstrap 4

Offical repo github.com/Daemonite/material

Documentation daemonite.github.io/material

Dependencies

Rails 5.1+ The Rails JavaScript helpers has been rewritten in a new gem called rails-ujs and they use vanilla JavaScript, so jQuery is not a dependency of Rails anymore. Since bootstrap relies on it, install it with bin/yarn add jquery or via gem 'jquery-rails' and add //= require jquery to application.js.

NOTE: Ensure that the sass-rails gem is presented in your Gemfile.

Installation

Add this line to your application's Gemfile:

gem 'bootstrap',     '4.1.1'
gem 'material-sass', '4.1.1'

And then run the bundler and restart your server to make the files available through the pipeline:

$ bundle install

Or install it yourself as:

$ gem install material-sass

Usage

a. Sass

Import Materialize styles in app/assets/stylesheets/application.scss:

@import "material";
//ps: no need to import 'bootstrap'

NOTE: If you have just generated a new Rails application, it may come with a .css file instead. If this file exists, it will be served instead of Sass, so remove it.

$ rm app/assets/stylesheets/application.css

b. JavaScript

Require Material javascripts in app/assets/javascripts/application.js:

//= require jquery
//= require popper
//= require bootstrap
//= require material

c. Icons

Include this line in the portion of your HTML code

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

or import this line in your application.scss

@import "https://fonts.googleapis.com/icon?family=Material+Icons";

or install this gem for offline icons

gem 'material_icons'

see docs

Contributing

note: Any changes or Pull Request regarding material assets should be made in official material repo.

  1. Fork it ( https://github.com/mkhairi/material-sass/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

material-sass's People

Contributors

gitter-badger avatar mkhairi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

material-sass's Issues

$map: #007bff is not a map for `map-get'

I can not start my server after adding your gem, for no reason what so ever, everything is working fine without it, as soon as I install it everything stops working and the error message tells me that I Can't use map-get ( in your css ) i.e. can't just execute the line:

@import "material";

Time Picker & DateTime Picker

I see that you have a Time Picker in your Materialize gem, but not here. I was wondering if that was planned? Also, I need a picker for doing both date and time, is that something you're working on at all?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.