Skip to content

how to avoid color name be translated into color value? #2018

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

Closed
calidion opened this issue May 19, 2014 · 2 comments
Closed

how to avoid color name be translated into color value? #2018

calidion opened this issue May 19, 2014 · 2 comments

Comments

@calidion
Copy link

.theme-chooser(@c0, @c1, @c3) {
  span.theme-chooser-@{c3} {
    background-color: @c1;
    color: @c0;
    height: 10px;
    width: 20px;
    cursor: pointer;
    border: 2px solid #c4c4c4;
    display: inline-block;
  }
  span.active.theme-chooser-@{c3} {
    background-color: @c0;
    color: @c1;
    border: 2px solid #F4BD13;
  }
}
.theme-chooser(#a9a9a9, #d8d8d8, gray);

will result in:

span.theme-chooser-#808080 {
  background-color: #d8d8d8;
  color: #a9a9a9;
  height: 10px;
  width: 20px;
  cursor: pointer;
  border: 2px solid #c4c4c4;
  display: inline-block;
}
span.active.theme-chooser-#808080 {
  background-color: #a9a9a9;
  color: #d8d8d8;
  border: 2px solid #F4BD13;
}

but i want

span.theme-chooser-gray {
  background-color: #d8d8d8;
  color: #a9a9a9;
  height: 10px;
  width: 20px;
  cursor: pointer;
  border: 2px solid #c4c4c4;
  display: inline-block;
}
span.active.theme-chooser-gray {
  background-color: #a9a9a9;
  color: #d8d8d8;
  border: 2px solid #F4BD13;
}
@seven-phases-max
Copy link
Member

This is fixed in the 2.0 branch. And for earlier versions you can use escaped values, e.g.:

.theme-chooser(#a9a9a9, #d8d8d8, ~'gray');

@seven-phases-max
Copy link
Member

Closing as duplicate of #1595.

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