google / material-design-lite

Material Design Components in HTML/CSS/JS
https://getmdl.io
Apache License 2.0
32.29k stars 5.03k forks source link

Investigate transitioning to postcss #3420

Closed samccone closed 8 years ago

samccone commented 8 years ago

I got this :horse:


ref #811

Garbee commented 8 years ago

I'm taking a look at this real quick too again...

Color definitions we want for 2.0. What the hell? Why are we doing this array thing then pulling from that?

We could literally just make variables and go couldn't we? Any reason for the array thing once we move to using raw RGB colors?

Garbee commented 8 years ago

cc @surma and @sgomes about the color definition thing. Maybe there is a reason for the mapping that we don't know about?

If there isn't once after moving to rgb colors, then this just got solved using the simplest method.

surma commented 8 years ago

@Garbee That was originally to allow our templating generation to work. Since PostCSS would allow us to take a fundamentally different approach, there’s no need to stick with that technique AFACIT.

Garbee commented 8 years ago

Then, we can drop this issue off on the corner and say goodnight.

I'll work on PostCSS conversion in my 2.0 mockup and we can discuss whether to go with it as that is being reviewed after 1.1 is released.

I must admit, I'm currently giving no thought to how the template system is going to work. That is imo solvable so long as we have a good foundation to work with.

surma commented 8 years ago

Ideally, @samccone proposal of having PostCSS run in the browser to generate the themed CSS will work out.

samccone commented 8 years ago

so to be super clear :gem: @Garbee this is not a dupe of #811 ... the ideal goal of this investigation is a total transition and not a transpilation across multiple formats :)

(going to reopen for now)

Garbee commented 8 years ago

Ok, all good. I'm not looking at "transpilation" either in the long-run. Going to use things like precss for things like the grid now since the loops are useful, other than that try to just including nesting to ease maintenance and drop the rest from there.

But, you can figure up what you think is best and I can at least start a conversion in the mockup and we can see where things meet and need modification.

samccone commented 8 years ago

welp turns out we are doing a lot of crazy sass specific things in the code.. making a simple transition pretty hard for us.

I am going to close this issue for now but I have spiked a few hours into this so far https://github.com/google/material-design-lite/commits/sjs/post-css ... and have decided that this will take more hours that I think is worth it to finish.

traviskaufman commented 8 years ago

^ FYI this is being picked back up in #4514