kilmc / battery

An Atomic CSS Generator
MIT License
11 stars 2 forks source link

List of ideas/gotchas #1

Open dy opened 5 years ago

dy commented 5 years ago

This is really promising idea! Reminds tachyons a lot! Recently I was prototyping the same framework, and got some ideas, handy practically or inspired by other frameworks. Would be nice to see them incorporated here!

kilmc commented 5 years ago

@dy Hey Dimitry. I totally missed this comment. Thanks for posting. I've been working to support that naming convention from Tailwind. I was having trouble with escaping the : at the right point in the processing of the class names but have recently re-worked how Battery is built to allow for it. It's in a branch right now and hasn't been merged but when it is, you'll be able to do : separators. That would also allow for using the % symbol too for your examples about lenghtUnits.

A lot of what you're talking about is possible via plugins. I have a bunch of sample plugins here if you'd like to check them out https://github.com/kilmc/battery-config/tree/master/src/plugins including lengthUnits, aspect ratios and pseudo selectors.

I also have plans to allow people to pull in a core naming convention in, almost like babel's presets and then they can have a simple config to adjust type size, color, breakpoints and spacing. We're definitely on the same page in terms of future features.