Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement toCss utility and fix styles prop #114

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

efoken
Copy link
Contributor

@efoken efoken commented Oct 27, 2023

This PR allows using objects for styles with a toCss utility as an alternative to the template literal as mentioned in #91 (comment).

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 efoken force-pushed the master branch 3 times, most recently from 223007c to 86792d8 Compare November 5, 2023 16:01
@efoken efoken force-pushed the master branch 3 times, most recently from cdb63ae to 904dea7 Compare November 10, 2023 08:17
@efoken efoken changed the title Implement passing objects to css Implement toCss utility and fix styles prop Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant