Skip to content

Implement color value serialization. #60

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

Merged
merged 4 commits into from
Oct 1, 2014
Merged

Conversation

jdm
Copy link
Member

@jdm jdm commented Sep 19, 2014

No description provided.

@jdm jdm changed the title Implement basic, incorrect color value serialization. Implement color value serialization. Oct 1, 2014
@jdm
Copy link
Member Author

jdm commented Oct 1, 2014

r? @SimonSapin

@SimonSapin
Copy link
Member

Please add a couple of unit tests. Right now format!("{}", 4f32) does not include a dot (which would make it non-integer and fail parsing as a CSS color) but I’m not confident that it never will. (The Python equivalent returns 4.0.)

Also, rounding loses precision. Maybe that’s OK?

@jdm
Copy link
Member Author

jdm commented Oct 1, 2014

The precision loss matches Firefox; I think Blink as well?

@SimonSapin
Copy link
Member

Ok, then. r+ with unit tests.

@jdm
Copy link
Member Author

jdm commented Oct 1, 2014

Added!

SimonSapin added a commit that referenced this pull request Oct 1, 2014
Implement color value serialization.
@SimonSapin SimonSapin merged commit 7b0549a into servo:master Oct 1, 2014
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.

2 participants