mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-11 05:58:40 +00:00
Fix laps
* Fix lap with flex * Fix lint error * Fix more lint errors * Fix indentation in test spec * Update screenshots * remove .glue class
This commit is contained in:
@@ -44,19 +44,16 @@ defineFunction({
|
||||
// two items involved in the lap.
|
||||
// Next, use a strut to set the height of the HTML bounding box.
|
||||
// Otherwise, a tall argument may be misplaced.
|
||||
// This code resolved issue #1153
|
||||
const strut = buildCommon.makeSpan(["strut"]);
|
||||
strut.style.height = (node.height + node.depth) + "em";
|
||||
strut.style.verticalAlign = -node.depth + "em";
|
||||
node.children.unshift(strut);
|
||||
|
||||
// Next, prevent vertical misplacement when next to something tall.
|
||||
node = buildCommon.makeVList({
|
||||
positionType: "firstBaseline",
|
||||
children: [{type: "elem", elem: node}],
|
||||
}, options);
|
||||
|
||||
// Get the horizontal spacing correct relative to adjacent items.
|
||||
return buildCommon.makeSpan(["mord"], [node], options);
|
||||
// This code resolves issue #1234
|
||||
node = buildCommon.makeSpan(["thinbox"], [node], options);
|
||||
return buildCommon.makeSpan(["mord", "vbox"], [node], options);
|
||||
},
|
||||
mathmlBuilder: (group, options) => {
|
||||
// mathllap, mathrlap, mathclap
|
||||
|
@@ -215,6 +215,29 @@
|
||||
min-width: 2px;
|
||||
}
|
||||
|
||||
.vbox {
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.hbox {
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.thinbox {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
width: 0;
|
||||
max-width: 0; // necessary for Safari
|
||||
}
|
||||
|
||||
.msupsub {
|
||||
text-align: left;
|
||||
}
|
||||
|
Reference in New Issue
Block a user