-
Notifications
You must be signed in to change notification settings - Fork 167
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
Lumo styles leak to the host page when embedding Vaadin component #12704
Comments
Noted that if you use a custom theme on the embedded component then lumo doesn't leak to the host page. |
@caalador I don't really agree with your severity label. This basically prevents embedding Vaadin apps without major changes in the host page CSS (which might be close to impossible in many cases). |
The custom theme workaround would be ok if that was documented. |
Minor label was as it seemed to not affect if using the custom theme, but v22 didn't play the same game on that as v14 did. |
I think this should be cross checked: #16083 |
I was able to reproduce this issue in latest 24 and in 23.4 versions, I'm attaching sample projects. embedded-leak-vaadin-23.4.zip In both of them you can see that the ExampleServlet is generating a plain html:
But then the page, the head tag is populated with a lot of things from vaadin: |
The issue was assigned to a developer and is currently being investigated |
When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704
* fix: prevent embedded styles to leak main document When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704 * apply review suggestions
* fix: prevent embedded styles to leak main document When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704 * apply review suggestions
* fix: prevent embedded styles to leak main document When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704 * apply review suggestions Co-authored-by: Marco Collovati <[email protected]>
When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704
This ticket/PR has been released with Vaadin 24.4.0.alpha24 and is also targeting the upcoming stable 24.4.0 version. |
When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704
When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704
When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704
When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704 Co-authored-by: Marco Collovati <[email protected]>
When using an exported a themed Flow web-component, Lumo style may leak the embedding document, causing invalid CSS rules to be applied. This change prevents applying Lumo global imports when the theme is applied to a web-component. Fixes #12704 Co-authored-by: Marco Collovati <[email protected]>
This ticket/PR has been released with Vaadin 23.3.34. |
This ticket/PR has been released with Vaadin 24.3.11. |
This ticket/PR has been released with Vaadin 23.4.1. |
This ticket/PR has been released with Vaadin 23.5.1. |
This ticket/PR has been released with Vaadin 24.5.0.alpha1 and is also targeting the upcoming stable 24.5.0 version. |
Description of the bug
When I embed a Vaadin application, its styles are applied also to parts that don't belong to the embedded application.
Expected behavior
The other parts of the application are not affected by the embedded application.
Minimal reproducible example
Check out this project, deploy and navigate to basic.html file. You'll see that the H1 header from the host page changes font once the Vaadin app gets loaded.
Versions
The text was updated successfully, but these errors were encountered: