atomico
atomico copied to clipboard
Implement `toCss` utility and fix `styles` prop
This PR allows using objects for styles with a toCss utility as an alternative to the template literal as mentioned in https://github.com/atomicojs/atomico/issues/91#issuecomment-1239000709.
I tried to implement a very basic solution with tiny amount of code. Let me know what you think. Maybe I want to add support for nested objects similar to SCSS, but I'm not sure if that's still needed when nested CSS is starting to get supported by browsers.
This PR also fixes the style prop to work like in React, with non-dimensional values – check the tests.