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

CSS custom properties #277

Open
steph950 opened this issue Mar 21, 2020 · 2 comments
Open

CSS custom properties #277

steph950 opened this issue Mar 21, 2020 · 2 comments

Comments

@steph950
Copy link

Thanks for your great work.

I don't know if you have still time to work on it, but the CSS custom properties are not validated by the eclipse plugin.

--main-bg-color:@mainBGColor; => the double dashes are not recognized as valid during lexical analysis

var(--main-bg-color) => this is also not recognized as valid

But even if Eclipse considers these to be errors, the code is perfectly compiled by the less compiler.

@vobruba-martin
Copy link

I'm using this ugly workaround:

:root {
  -x: ~'0;'
  ~'--main-bg-color:' @mainBGColor ~';'
  ~'--another-custom-property:' @whatever ~';'
  ;
}
body {
  background-color: ~'var(--main-bg-color)';
}

@steph950
Copy link
Author

I'm using this ugly workaround:

:root {
  -x: ~'0;'
  ~'--main-bg-color:' @mainBGColor ~';'
  ~'--another-custom-property:' @whatever ~';'
  ;
}
body {
  background-color: ~'var(--main-bg-color)';
}

Indeed using ~'' does the job, Eclipse doesn't see it as errors ;-)
But in this case, wrapping with simple quotes removes the IDE links. When I click on a less variable used anywhere, I love this link leading to the less variable declaration...

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