
Loading…
Parsing compressed CSS does not work #1927
alefwmm
commented
YuJM
commented
try
(intdex.html )
<style is="custom-style">
:root {
--my-custom-color:#F00;
}
</style>
(your custom-element )
<style>
:host{ background-color:var(--my-custom-color);
}
</style>
alefwmm
commented
My bad, I found what the problem really is.
When the last CSS rule is a custom variable and does not have a semi-colon, the problem happens.
This is okay:
:root{--my-custom-color:#F00;}This is not:
:root{--my-custom-color:#F00}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The parser for custom properties does not work for compressed CSS like:
:host{--my-custom-color:#F00;}When not compressed, it works properly:
:host { --my-custom-color: #F00; }