mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-11 05:58:40 +00:00
Improve rule coding, including for \sqrt
. (#776)
* Improve rule coding.
* Rule widths (overline, underline, fraction, sqrt) actually scale
with the current font size in AMS-TeX. Implement that. (Sqrt is
a special case: the rule width depends on the font size *of the
surd*.)
* Change the CSS coding for rules. The old, complex coding prevented
variable-width lines and may have contributed to issues like #696.
Its purpose, according to 0a3a2271f4
,
was IE8 support; but KaTeX no longer supports IE8.
* The 0.5px offset makes larger sizes better, smaller sizes worse.
Smaller sizes seem more important.
* Cleanup (intended to be squashed).
This commit is contained in:
committed by
Kevin Barabash
parent
766487bfe3
commit
dcdca732a3
@@ -289,22 +289,9 @@
|
||||
}
|
||||
|
||||
.frac-line {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
|
||||
&:before {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
content: "";
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:after {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 0.04em;
|
||||
content: "";
|
||||
display: block;
|
||||
margin-top: -1px;
|
||||
}
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -406,22 +393,9 @@
|
||||
|
||||
.overline .overline-line,
|
||||
.underline .underline-line {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
|
||||
&:before {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
content: "";
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:after {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 0.04em;
|
||||
content: "";
|
||||
display: block;
|
||||
margin-top: -1px;
|
||||
}
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
.sqrt {
|
||||
@@ -430,22 +404,10 @@
|
||||
}
|
||||
|
||||
.sqrt-line {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
&:before {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
content: "";
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:after {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 0.04em;
|
||||
content: "";
|
||||
display: block;
|
||||
margin-top: -1px;
|
||||
}
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
> .root {
|
||||
|
Reference in New Issue
Block a user