-
Notifications
You must be signed in to change notification settings - Fork 21
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
Why not automatically add 'px' to numbers like react.js does? #52
Comments
No update so far. We're kinda unsure what's actually better. Will wait more and see. |
what about:
? I understand that will take to away from css, but is not that bad. Is also easier to reuse values. |
This is a bit arbitrary and I don't want custom keys |
I understand, fair enough. But something using numbers would be nicer in order to make calculations. With '50px' would be a pain to add 25px. |
I had an idea but is kind of pain to work with:
You have to understand that
will return a special Number class that has various methods and one of them is:
Smart defaults:
But RCSS will transform the native Number 55 to the special Number class in order to keep all the numbers in the RCSS system with that special class. Now you can make changes to those numbers with functions
What do you think about this? |
I'm not gonna start imitating all the number operations and make it hard to work with with normal logic. I think var myStyle = {
width: per(styleObj.style.width)
};
<div style={myStyle} /> But for passing objects around and reading/writing we really should just stick with normal numbers. This ties back to #27 |
Why not automatically add 'px' to numbers like react.js does?
Instead of having to add a px after each number, add it automatically.
The text was updated successfully, but these errors were encountered: