You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using .less for a long time and I love how fast is to extend clases with it.
I love the new ideas de css-modules brings to the table, but I think that the "composes from" syntax is too long.
composes: shadow from "./theme.css";
It's interesting because we are doing in css what we wouldn't do in our JS files.
inJS we add the imports at the top, we give them a variable and then very easily we reference them in the code: import myLib from 'my/libs' myLib.method(foo)
what we don't do: (syntax doesn't make sense)
It seems that the compose syntax would be analogous to:
```js
function myMethod(){
var myVar = import randomVar from 'libs/api.js'
}
function myOtherMethod(){
var myVar = import randomVar from 'libs/api.js'
}
We would import myLib at the top. And then reference it super quickly. That would look something like:
I've been using .less for a long time and I love how fast is to extend clases with it.
I love the new ideas de css-modules brings to the table, but I think that the "composes from" syntax is too long.
composes: shadow from "./theme.css";
It's interesting because we are doing in css what we wouldn't do in our JS files.
inJS we add the imports at the top, we give them a variable and then very easily we reference them in the code:
import myLib from 'my/libs'
myLib.method(foo)
what we don't do: (syntax doesn't make sense)
We would import myLib at the top. And then reference it super quickly. That would look something like:
Much faster to type, no?
What do you think?
The text was updated successfully, but these errors were encountered: