material-design-lite icon indicating copy to clipboard operation
material-design-lite copied to clipboard

Support for LESS?

Open RaeesBhatti opened this issue 11 years ago • 5 comments

A lot of people (including me) use Less instead of Sass as preprocessor. It would be nice if you can create an automated Less repo which is updated with this one. Bootstrap does the same to convert Less to Sass

RaeesBhatti avatar Jul 20 '15 20:07 RaeesBhatti

We said it in #775 about Stylus: Sadly, we don’t have the manpower to maintain another preprocessor. Even if the conversion is automated, we’d be responsible if something breaks.

However, if the process is truly automated, why don’t you help us out and set up a repo that mirrors the LESS version of MDL?

surma avatar Jul 20 '15 20:07 surma

This is exactly what I'm doing right now :wink:

RaeesBhatti avatar Jul 20 '15 20:07 RaeesBhatti

Awesome. If you manage to set it up successfully, please let us know :)

surma avatar Jul 20 '15 20:07 surma

@raeesiqbal MDL uses simple mixins, u can easily port it into less. Or start repo i can help

kybarg avatar Jul 20 '15 20:07 kybarg

FYI: I didn't find any simple way of converting this project's sass to less, the are a couple of tools available but they don't support all of the sass features used here. To actually have a less repository we would need to improve those tools.

https://github.com/mediafreakch/less-plugin-sass2less fails with

SyntaxError: Cannot read property 'denominator' of undefined in node_modules/material-design-lite/src/_variables.scss on line 350, column 1:
349 
350 @spinner-duration: 360 * @spinner-arc-time / (
351     strip-units(@spinner-arc-start-rot + (360deg - @spinner-arc-size)));

and after that

NameError: variable @i is undefined in node_modules/material-design-lite/src/grid/_grid.scss on line 133, column 16:
132   @for @i from @grid-phone-columns through @grid-desktop-columns {
133     .mdl-cell--@{i}-col,
134     .mdl-cell--@{i}-col-phone.mdl-cell--@{i}-col-phone {

Didn't try https://github.com/jonschlinkert/grunt-refactor but it seems to also lack if, else and for statements support.

Gahen avatar Feb 15 '17 18:02 Gahen