CssToInlineStyles icon indicating copy to clipboard operation
CssToInlineStyles copied to clipboard

Any plans on adding CSS variables support?

Open osbre opened this issue 3 years ago • 4 comments

https://developer.mozilla.org/en-US/docs/Web/CSS/var()

osbre avatar Apr 07 '21 12:04 osbre

what do you need exactly as support for CSS variables ?

stof avatar Apr 07 '21 12:04 stof

I was thinking about

:root {
    --fg-color: rgb(55, 53, 47);
}

.notion {
  color: var(--fg-color);
}

Which results in

<div class="notion" style="color: rgb(55, 53, 47)"></div>

osbre avatar Apr 07 '21 12:04 osbre

that issue already supported?

kaaaaaaaaaaai avatar Jun 24 '21 06:06 kaaaaaaaaaaai

Doing that will require building a more complete CSS engine, to parse values of properties (which are not parsed currently). While I'm open to contributions for that, I won't have the resources to do such big work myself.

stof avatar Dec 08 '21 09:12 stof