fix(editor): tooltip styles when having span tags (#9422)

fix AF-2040
This commit is contained in:
pengx17
2024-12-30 06:54:02 +00:00
parent e3b6841944
commit ea6fed127b

View File

@@ -25,11 +25,9 @@ const styles = css`
color: var(--affine-white); color: var(--affine-white);
background: var(--affine-tooltip); background: var(--affine-tooltip);
display: flex;
justify-content: center;
align-items: center;
overflow-wrap: anywhere; overflow-wrap: anywhere;
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-all;
} }
.arrow { .arrow {
@@ -201,10 +199,8 @@ export class Tooltip extends LitElement {
:host { :host {
z-index: ${unsafeCSS(this.zIndex)}; z-index: ${unsafeCSS(this.zIndex)};
opacity: 0; opacity: 0;
${ // All the styles are applied to the portal element
// All the styles are applied to the portal element ${unsafeCSS(this.style.cssText)}
unsafeCSS(this.style.cssText)
}
} }
${this.allowInteractive ${this.allowInteractive