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
Hi! I really love this project and I had a few ideas for it:
Lighten and darken colors? E.g. lighten(@${0}, 20) (out of 100)
Built in color palette (It's sort of annoying to import the material design one every time
<x-style> tag supporting css-like syntax something like this:
/* It'd be cool to support multiple properties on one line */mixin:button{inline-flex;
^reset;
^button-color:${0=grey};
justify-content:center; align-items:center;
cursor:pointer;
cursor.disabled:not-allowed;
py:4; px:6;/* Multiple on one line */
opacity.disabled:50%; transition:all 0.25s;
border;/* Mostly formatted like CSS */
color:white;
uppercase;
radius
}/* Also supporting normal syntax CSS */button{
^button:yellow;
color: black;}
A JavaScript API
Assembler.compile(css_code);//Would return the actual CSS generated, not the classes and variables but the actual CSS that would do the identical thing.Assembler.addMixin("mixin name","Props and stuff here");Assembler.addShorthand("bgc","background-color");/* Now bgc maps to background-color */
Thanks for the suggestions! Many of the things you have suggested we plan to add in future releases. The built-in color palette will definitely be the first. You can already create advanced mixins in JavaScript https://asmcss.com/docs/1.x/mixins.html#javascript-mixins
Activity
msarca commentedon Aug 25, 2021
Thanks for the suggestions! Many of the things you have suggested we plan to add in future releases. The built-in color palette will definitely be the first. You can already create advanced mixins in JavaScript https://asmcss.com/docs/1.x/mixins.html#javascript-mixins
Explosion-Scratch commentedon Aug 25, 2021
Cool! Thanks!
Explosion-Scratch commentedon Sep 12, 2021
Update: Functional async compile function, (Just works for the time being, I'm sure a native one could be synchronous and way faster.)