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

unitless properties #4

Open
threepointone opened this issue May 5, 2017 · 3 comments
Open

unitless properties #4

threepointone opened this issue May 5, 2017 · 3 comments

Comments

@threepointone
Copy link
Owner

like react, the following should both 'work' without 'px -

let cls = css` font-size: 20 `
let cls = css` font-size: ${myVar} `
@itsdouges
Copy link

itsdouges commented May 7, 2017

as a counter argument - maybe it's good not to rely on the magic addition of px? at least it would be in line with how css works.

also in react px is only appended for numbers. if you pass in a string it doesn't get added.

(p.s. cool idea! i'll be watching this closely :-))

@threepointone
Copy link
Owner Author

I definitely prefer the addition, I'm not particularly interested in purity.

Aware of the second issue, have an idea to solve it.

@threepointone
Copy link
Owner Author

some further detail - because we use css vars, you can't directly concatenate 'px' when interpolating, like -

let cls = css` font-size: ${myVar}px `

the react-ish way is really nice, and backs glamor as well.

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

No branches or pull requests

2 participants