Could you please create a repo with a reproduction example? I’m unable to reproduce the issue using the code you provided.
Also, based on the error, the problem comes from ThemableMixin trying to update the component instance dynamically, which means you register styles after the component is finalized. This is generally not recommended, it’s better to use the following order:
<script type="module">
import { Tooltip } from '@vaadin/tooltip/vaadin-tooltip.js';
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin';
// First register styles
registerStyles(
'vaadin-tooltip-overlay',
css`
[part='content'] {
padding: 8px;
}
`,
);
// Then register a component
export class CustomTooltip extends Tooltip {
static get is() {
return 'custom-tooltip';
}
}
customElements.define(CustomTooltip.is, CustomTooltip);
</script>
I can make a new request, but now I want for this custom-tooltip, or the vaadin-tooltip, to set the background for tooltips with a certain class. That also seems not to be possible.