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

If statement with color function fails with inherit value #3378

Closed
VovanR opened this issue Mar 20, 2019 · 2 comments
Closed

If statement with color function fails with inherit value #3378

VovanR opened this issue Mar 20, 2019 · 2 comments

Comments

@VovanR
Copy link

VovanR commented Mar 20, 2019

Example: https://codepen.io/VovanR/pen/qvJEeW?editors=1100

._btn(@color) {
  color: if((iscolor(@color)), darken(@color, 10%), @color);
  background-color: if((iscolor(@color)), green, pink);
}

.btn1 {
  ._btn(yellow);
}

.btn2 {
  ._btn(inherit);
}

body {
  color: lime;
}

I try to use iskeyword but it fails too

._btn(@color) {
  color: if((iskeyword(@color)), @color, darken(@color, 10%));
  background-color: if((iskeyword(@color)), pink, green);
}

But without color function in If statement it works fine. Try to comment color rule line

@seven-phases-max
Copy link
Member

See #3371

@seven-phases-max
Copy link
Member

Closing in favour of #3371.

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