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

Style unit helpers #95

Closed
raquo opened this issue Apr 15, 2021 · 0 comments
Closed

Style unit helpers #95

raquo opened this issue Apr 15, 2021 · 0 comments

Comments

@raquo
Copy link
Owner

raquo commented Apr 15, 2021

Having to do this is annoying, and causes the overhead of another signal:

div(left <-- $int.map(v => s"${v}px"))

We could offer something like this instead:

left.px <-- $int
left.em <-- $double
left.percent <-- $intOrDouble

See what's the best way to do this, maybe something like StyleCodec in SDT?

Also: scale() for transform

Please comment with other helpers that might make sense to do together with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant