Hi,
In a top-level 'custom-style' element, I've defined something like this:
:root {
--app-theme: {
--paper-toolbar-background: var(--paper-blue-grey-500);
}
}
Later, in a component which contains another component which contains another component that contains a toolbar:
:host {
@apply(--app-theme);
}
That doesn't do anything, however. The toolbar background remains the default indigo-500. If I do this instead:
:host {
--paper-toolbar-background: var(--paper-blue-grey-500);
}
the toolbar's color changes accordingly.
With the mixin, even though the variables defined in it seem to be ignored, the contents of it are known to the component itself, since doing the following returns the textual contents of the mixin:
myComponent.getComputedStyleValue('--app-theme')
So what exactly is the problem here? Also, the docs imply that you can have different mixins with the same name, as long as the selectors are different, but they don't go into details. If I want to switch between different app-theme mixins, how would the top-level style selectors looks like? Would it be something like : ':root { ... }' for the default, then ':root.theme-1 { ... } ' for the first variant, and so on? Or something like ':root { ... }' and '.theme-1 { ... }'?