Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Wrong output of color() in cssnext playground #82

Closed
Macxim opened this issue Mar 28, 2015 · 3 comments
Closed

Wrong output of color() in cssnext playground #82

Macxim opened this issue Mar 28, 2015 · 3 comments

Comments

@Macxim
Copy link
Contributor

Macxim commented Mar 28, 2015

In cssnext playground,
color( [ <color> ] [red( | green( | blue( | alpha( | a(] ['+'] [<number>] ) ) doesn't seem to render properly.
No problem with ['-'] though.

.class{
  background-color: color(#2B88E6); /* expected: rgb(43, 136, 230) */
  color: color(#2B88E6 red(+30)); /* expected: rgb(73, 136, 230) */
  border-top-color: color(#2B88E6 green(+100)); /* expected: rgb(43, 236, 230) */
  border-bottom-color: color(#2B88E6 blue(+20)); /* expected: rgb(43, 136, 250) */
}

will render in

.class{
  background-color: rgb(43, 136, 230); /* expected: rgb(43, 136, 230) */
  color: rgb(255, 136, 230); /* expected: rgb(73, 136, 230) */
  border-top-color: rgb(43, 255, 230); /* expected: rgb(43, 236, 230) */
  border-bottom-color: rgb(43, 136, 255); /* expected: rgb(43, 136, 250) */
}

I can't seem to reproduce this issue anywhere else.

@MoOx
Copy link
Owner

MoOx commented Mar 30, 2015

playground is just outdated.
This bug should be related to something like this https://github.com/ianstormtaylor/css-color-function/blob/master/History.md#121---march-16-2015 (fixed)

caniuse-api wasn't fully compatible with browserify so playground was outdated + adjusted by hand in order to work for 1.0.0 release.

I have made a PR so we can bump playground and close this issue: Nyalab/caniuse-api#26

@Macxim
Copy link
Contributor Author

Macxim commented Mar 30, 2015

Alright, thanks for looking into it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants