Add support for \overline

Summary:
Follow the instructions in the TeX book for drawing \overlines. This uses the
same code as fractions to produce the bars. Also added the ability to cramp
styles (i.e. T -> T' and T' -> T').

Test Plan:
 - Look at `\overline{x}`, `\overline{\dfrac{x}{y}+z}`, and
   `\blue{\overline{x}}` to make sure they look good.
 - Make sure the tests work
 - Make sure the huxley tests look good (Not here yet :( )

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D11604
This commit is contained in:
Emily Eisenberg
2014-08-05 17:48:10 -07:00
parent 5756be048c
commit fe6b67817c
8 changed files with 107 additions and 1 deletions

View File

@@ -308,6 +308,45 @@ big parens
}
}
.overline {
.baseline-align-hack-outer;
> .overline-line,
> .overline-inner,
> .fix-ie {
.baseline-align-hack-middle;
position: relative;
text-align: center;
> span {
.baseline-align-hack-inner;
}
}
> .fix-ie {
display: inline-block;
}
> .overline-line > span {
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;
}
}
}
.sizing {
display: inline-block;