New issue
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
Add a replacement for <custom-style> #2642
Comments
Indeed, for this we implemented a |
See also #499 |
I wonder if this should also support using ApplyShim (for legacy migration cases)? |
We do not use CSS mixins in our components and do not recommend anyone to use them. |
Also note that Polymer's If someone specifically wants to use |
Was struggling a bit today trying to phase out iron-icon in favor of vaadin-icon. https://discord.com/channels/732335336448852018/1060531737794453575/1060531737794453575 Finally figured out with less Polymer loaded, some
If this would land, I'd be able to retire our registerGlobalStyles util then. |
@lkraav Thanks for the feedback. I agree that the current code looks confusing. Here is what you would need to do: web-components/packages/vaadin-lumo-styles/test/autoload.js Lines 8 to 10 in 99e4df4
|
This can be addressed by the following helper added in #5666 (currently marked as internal): web-components/packages/vaadin-themable-mixin/register-styles.js Lines 14 to 23 in 212637f
|
The
<custom-style>
element, used for including main document-level styles, is a Polymer Web Component and so needs a replacement.Example:
It's already possible to use ESM for importing Vaadin styles and then include them in the main document with js, but the end result is quite verbose:
One option would be to extend
registerStyles
to also support main document-level styling:The text was updated successfully, but these errors were encountered: