We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6020386 commit ea5be24Copy full SHA for ea5be24
1 file changed
src/render/canvas/canvas-renderer.ts
@@ -714,7 +714,21 @@ export class CanvasRenderer extends Renderer {
714
715
if (!isTransparent(styles.backgroundColor)) {
716
this.ctx.fillStyle = asString(styles.backgroundColor);
717
- this.ctx.fill();
+
718
+ if (styles.display === DISPLAY.INLINE) {
719
+ for (const textNode of paint.container.textNodes) {
720
+ for (const textBound of textNode.textBounds) {
721
+ this.ctx.fillRect(
722
+ textBound.bounds.left,
723
+ textBound.bounds.top,
724
+ textBound.bounds.width,
725
+ textBound.bounds.height
726
+ );
727
+ }
728
729
+ } else {
730
+ this.ctx.fill();
731
732
}
733
734
await this.renderBackgroundImage(paint.container);
0 commit comments