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

[css-typed-om] CSSRotation/Skew can be constructed with doubles, but not CSSTranslation/Perspective #272

Closed
rjwright opened this issue Jul 28, 2016 · 11 comments
Assignees

Comments

@rjwright
Copy link
Contributor

Since we allow constructing transform components with double angles in deg, should we also allow constructing transform components with double lengths in px? Alternatively disallow both.

@rjwright
Copy link
Contributor Author

@tabatkins

@rjwright
Copy link
Contributor Author

@shans

@tabatkins
Copy link
Member

No, only zero lengths can be unitless. Angles, unfortunately (because of people implementing badly before the spec was even written), support unitless degrees in several spots, including rotate(). :/

@shans
Copy link
Contributor

shans commented Jul 29, 2016

We should take the opportunity to provide consistency here.

It sounds like you would lean towards correctness (i.e. no unitless degrees either). An argument can also be made for convenience:
new CSSSimpleLength(42, 'px')
vs.
new CSSSimpleLength(42).

Overall I think I probably value correctness more too. Anyone else have any thoughts?

@tabatkins
Copy link
Member

Discussed this with @fantasai - we shouldn't be allowing unitless angles either. That's a back-compat issue for the CSS literal syntax because Safari engineers are terrible at designing CSS syntax; we have no such restrictions in Houdini, and can make sure we do things consistently and correctly instead.

@rjwright
Copy link
Contributor Author

rjwright commented Aug 3, 2016

So shall I pull it out?

@tabatkins
Copy link
Member

I'd prefer it, but want to verify with @shans

@shans
Copy link
Contributor

shans commented Aug 3, 2016

It's always easier to add stuff later than remove. Let's pull out all unitless constructors for now.

@rjwright
Copy link
Contributor Author

rjwright commented Aug 4, 2016

SGTM

@shans shans self-assigned this Aug 11, 2016
@shans
Copy link
Contributor

shans commented Aug 11, 2016

@rjwright want to submit a PR for this?

@rjwright
Copy link
Contributor Author

Will do

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

3 participants