Skip to content

Commit cd235d5

Browse files
committed
Handle background color properly when there is an indentshift.
1 parent b86a77b commit cd235d5

File tree

1 file changed

+10
-1
lines changed
  • unpacked/jax/output/HTML-CSS

1 file changed

+10
-1
lines changed

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2868,7 +2868,7 @@
28682868
//
28692869
// Add color (if any)
28702870
//
2871-
this.HTMLhandleColor(span);
2871+
var color = this.HTMLhandleColor(span);
28722872
//
28732873
// Make math span be the correct height and depth
28742874
//
@@ -2896,6 +2896,15 @@
28962896
right: {marginLeft: HTMLCSS.Em(Math.max(0,span.bbox.w+shift)), marginRight: HTMLCSS.Em(-shift)},
28972897
center: {marginLeft: HTMLCSS.Em(shift), marginRight: HTMLCSS.Em(-shift)}
28982898
})[values.indentalign]);
2899+
//
2900+
// Move the background color, of any
2901+
//
2902+
if (color) {
2903+
color.style.marginLeft = HTMLCSS.Em(parseFloat(color.style.marginLeft)+shift);
2904+
color.style.marginRight =
2905+
HTMLCSS.Em(parseFloat(color.style.marginRight)-shift
2906+
+ (values.indentalign === "right" ? Math.min(0,span.bbox.w+shift) - span.bbox.w : 0));
2907+
}
28992908
}
29002909
}
29012910
return span;

0 commit comments

Comments
 (0)