Fix regression with precentage-width tables that are less than 100% wide caused by changes to full-width CSS to fix shrink-wrap issues.
This commit is contained in:
parent
2cdbf46bd9
commit
0e9f51f39e
|
@ -72,6 +72,7 @@
|
||||||
display: "inline-table" // see issues #1282 and #1338
|
display: "inline-table" // see issues #1282 and #1338
|
||||||
},
|
},
|
||||||
".mjx-full-width": {
|
".mjx-full-width": {
|
||||||
|
"text-align": "center",
|
||||||
display: "table-cell!important",
|
display: "table-cell!important",
|
||||||
width: "10000em"
|
width: "10000em"
|
||||||
},
|
},
|
||||||
|
@ -1753,7 +1754,9 @@
|
||||||
if (this.CHTML.pwidth) {
|
if (this.CHTML.pwidth) {
|
||||||
node.parentNode.style.minWidth = this.CHTML.mwidth||CHTML.Em(this.CHTML.w);
|
node.parentNode.style.minWidth = this.CHTML.mwidth||CHTML.Em(this.CHTML.w);
|
||||||
node.parentNode.className = "mjx-full-width "+node.parentNode.className;
|
node.parentNode.className = "mjx-full-width "+node.parentNode.className;
|
||||||
} else if (!this.isMultiline && this.Get("display") === "block") {
|
node.style.width = this.CHTML.pwidth;
|
||||||
|
}
|
||||||
|
if (!this.isMultiline && this.Get("display") === "block") {
|
||||||
var values = this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");
|
var values = this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");
|
||||||
if (values.indentalignfirst !== MML.INDENTALIGN.INDENTALIGN) values.indentalign = values.indentalignfirst;
|
if (values.indentalignfirst !== MML.INDENTALIGN.INDENTALIGN) values.indentalign = values.indentalignfirst;
|
||||||
if (values.indentalign === MML.INDENTALIGN.AUTO) values.indentalign = CONFIG.displayAlign;
|
if (values.indentalign === MML.INDENTALIGN.AUTO) values.indentalign = CONFIG.displayAlign;
|
||||||
|
@ -1765,7 +1768,7 @@
|
||||||
shift += (values.indentalign === MML.INDENTALIGN.RIGHT ? -indent : indent);
|
shift += (values.indentalign === MML.INDENTALIGN.RIGHT ? -indent : indent);
|
||||||
}
|
}
|
||||||
var styles = node.parentNode.parentNode.style;
|
var styles = node.parentNode.parentNode.style;
|
||||||
styles.textAlign = values.indentalign;
|
node.parentNode.style.textAlign = styles.textAlign = values.indentalign;
|
||||||
// ### FIXME: make percentage widths respond to changes in container
|
// ### FIXME: make percentage widths respond to changes in container
|
||||||
if (shift) {
|
if (shift) {
|
||||||
shift *= CHTML.em/CHTML.outerEm;
|
shift *= CHTML.em/CHTML.outerEm;
|
||||||
|
|
|
@ -282,6 +282,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
".MathJax.MathJax_FullWidth": {
|
".MathJax.MathJax_FullWidth": {
|
||||||
|
"text-align": "center",
|
||||||
display: (oldIE ? "block" : "table-cell") + "!important",
|
display: (oldIE ? "block" : "table-cell") + "!important",
|
||||||
width: (oldIE ? "100%" : "10000em") + "!important"
|
width: (oldIE ? "100%" : "10000em") + "!important"
|
||||||
},
|
},
|
||||||
|
@ -3000,7 +3001,7 @@
|
||||||
var indent = HTMLCSS.length2em(this.displayIndent,1,HTMLCSS.scale*HTMLCSS.cwidth);
|
var indent = HTMLCSS.length2em(this.displayIndent,1,HTMLCSS.scale*HTMLCSS.cwidth);
|
||||||
shift += (values.indentalign === MML.INDENTALIGN.RIGHT ? -indent : indent);
|
shift += (values.indentalign === MML.INDENTALIGN.RIGHT ? -indent : indent);
|
||||||
}
|
}
|
||||||
node.style.textAlign = values.indentalign;
|
SPAN.style.textAlign = node.style.textAlign = values.indentalign;
|
||||||
// ### FIXME: make percentage widths respond to changes in container
|
// ### FIXME: make percentage widths respond to changes in container
|
||||||
if (shift) {
|
if (shift) {
|
||||||
HUB.Insert(span.style,({
|
HUB.Insert(span.style,({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user