cllns / material_design_lite-rails

:large_blue_circle: Material Design Lite, for Rails
MIT License
127 stars 12 forks source link

Package SCSS #5

Closed cllns closed 9 years ago

cllns commented 9 years ago

Material Design Lite can be customized to use different colors.

There are:

which is 304 combinations (well a bit less, since primary/secondary can't be same). That's a lot. I'm not sure if it's "too much". Seems manageable but undesirable.

Material Design Lite is written in SCSS, but compiled to, and released as, pure CSS. If it were a SCSS framework, we could set our own variables. We could just mirror all the SCSS in the gem, and compile it in the Rails app. That way, users could add their own _variables.scss, which would override the default values.

I'm not sure if that belongs in this gem. It might.

ghost commented 9 years ago

Why not just "install" this into the gem: https://github.com/google/material-design-lite/tree/master/src

It is the scss and so we can modify it to our liking.

cllns commented 9 years ago

Yup, that's the plan.

The issue I'm facing now is how to know commit of the SCSS is related to a particular compiled version.

google/material-design-lite uses release tags in a way I haven't seen before. They tag their releases with only the compiled files (rather than in a dist/ folder). Take a look at the 1.0.0 tag for an example. I imagine in the commits on master there's a hint at the state of the SCSS at 1.0.0.

cllns commented 9 years ago

It looks like this is the commit we want. That was the last commit before the commits in v1.0.0. I wish we had a more definitive way of knowing what source is in a particular tag. I'll make an issue with them about that.

ghost commented 9 years ago

Oh wow. Thats kind of stupid. Did they make a tag at all?

cllns commented 9 years ago

I don't think so.

Please don't call their decision "stupid" though. Remember: they're well-meaning, intelligent, hard-working people who just didn't anticipate this particular use case.

I understand the decision they made: the way it is now is much simpler. It just doesn't work for us.

ghost commented 9 years ago

Right. Didnt mean to offend anyone.

ghost commented 9 years ago

I think we should go ahead and do this, even if its hard to find.

Especially since the color purple doesnt suit my site. :P

cllns commented 9 years ago

I think I'll wait until they properly release them, @nahtnam. Why not throw the SCSS files into vendor/assets/stylesheets, for now? Let me know how that goes if you do :)

ghost commented 9 years ago

@cllns Sorry, I gave up on MDL. Its a bit too "lite" for me :P

cllns commented 9 years ago

https://github.com/rubysamurai/material_design_lite-sass exists now, so I'll let them deal with the SASS and stick to providing just the packaged CSS/JS.