We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to give a custom element a default color from the shared theme while allowing a hook for the user to customize the color by doing this:
* { --my-element-background-color: var(--my-theme-background-color); } :host { background-color: var(--my-element-background-color); }
It seems like the variable definition must be in a different scope than the reference to the variable.
The text was updated successfully, but these errors were encountered:
Variables now support default values via syntax like this:
background-color: var(--my-element-background-color, --my-element-default-background-color);
In addition properties can be defined in the scope that they are used via :host or :root.
:host
:root
Sorry, something went wrong.
sorvell
No branches or pull requests
I want to give a custom element a default color from the shared theme while allowing a hook for the user to customize the color by doing this:
It seems like the variable definition must be in a different scope than the reference to the variable.
The text was updated successfully, but these errors were encountered: