atomico icon indicating copy to clipboard operation
atomico copied to clipboard

Implement `toCss` utility and fix `styles` prop

Open efoken opened this issue 2 years ago • 0 comments

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.

efoken avatar Oct 27 '23 13:10 efoken