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

hsl() and hsla() color parsing #501

Merged
merged 4 commits into from
Jan 17, 2015
Merged

hsl() and hsla() color parsing #501

merged 4 commits into from
Jan 17, 2015

Conversation

motiz88
Copy link
Contributor

@motiz88 motiz88 commented Jan 16, 2015

Fixes #437, see also #28.
Also adds support for rebeccapurple.

hsl() and hsla() color values are now supported, with corresponding unit tests.
Also added rebeccapurple (from CSS Color Level 4) to the named color list.
parseNumber() was erroring out on numbers with long fractional parts.
@kangax
Copy link
Collaborator

kangax commented Jan 16, 2015

To my C++-uneducated eye this LGTM (code, tests, etc.)

/cc @rvagg @TooTallNate


c = 0;
if (*str == '-')
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lots of inconsistencies here with brace style, some of them are with a newline and some are not; have a look through the rest of the project to find a happy place with consistency

@rvagg
Copy link
Contributor

rvagg commented Jan 17, 2015

This is fine by me minus all the code style inconsistencies

As an explanation for that I'm guessing that there might be some copy/paste going on from another project somewhere and perhaps we should include attribution. @motiz88 is this all your own code or can we attribute (simply in a comment) parts of it elsewhere?

Also removed parseClipped() and commented out wrapInt (now wrap_int).
@motiz88
Copy link
Contributor Author

motiz88 commented Jan 17, 2015

Sorry about code style, I was honestly not paying enough attention to that. I think I did a better job now :)
Yes, there are small bits I adapted from elsewhere - see the updated comments.

@rvagg
Copy link
Contributor

rvagg commented Jan 17, 2015

if it works then 👍 from me!

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.

hsl/hsla support
3 participants