vim-css-color icon indicating copy to clipboard operation
vim-css-color copied to clipboard

support for variables

Open mybigman opened this issue 5 years ago • 2 comments

:root {
  --gulf-blue: 55, 64, 87;
}

rgb(var(--gulf-blue));
rgba(var(--gulf-blue), 0.5);

mybigman avatar Jul 01 '20 07:07 mybigman

Yikes. That will be painful at best, if feasible at all. If not, it may instead be possible to highlight the definition (rather than individual uses). I don’t know. I’ll have to think about it.

Good to know that this is a thing people do in CSS now, though, thanks for alerting me.

ap avatar Aug 09 '20 05:08 ap

My use case in CSS is like this:

html {
    --var-color-primary: #9C2646;
    --var-color-secondary: #E2525E;
}

.some-class {
    color: var(--var-color-secondary);
}

If --var-color-secondary text inside var() can be highlighted with the defined color, it would be of great help.

adityashaw2 avatar Dec 16 '22 07:12 adityashaw2