-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Description
In a recent commit to the new Popover component the host element was set to hidden (see #7671), so it will be aligned with other modal-related components hidden host (see #3597).
However, in Popover, you use Lit's static get styles function, while in other components, like Dialog, you use a style tag in the template to achieve the same result (see https://github.com/vaadin/web-components/blob/main/packages/dialog/src/vaadin-dialog.js#L99).
I was wondering if the latter approach, of using Lit to enforce static CSS, is not too harsh, and if it would be possible to maintain the template style approach instead.
I myself have a use case where I internalize the overlay to be within the shadow DOM (so it won't be affected from other styles in the page) and I need to override the hidden root style. While I was able to achieve this result with Dialog, it seems that in Popover there is no way to do it.
Expected outcome
<style>
:host {
display: none !important;
}
</style>
instead of
static get styles() {
return css`
:host {
display: none !important;
}
`;
}
Minimal reproducible example
...
Steps to reproduce
...
Environment
Vaadin version(s): 24.5.0
Browsers
No response