mathquill.css 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. /*
  2. * LaTeX Math in pure HTML and CSS -- No images whatsoever
  3. * v0.xa
  4. * by Jay and Han
  5. * Lesser GPL Licensed: http: //www.gnu.org/licenses/lgpl.html
  6. *
  7. * This file is automatically included by mathquill.js
  8. *
  9. */
  10. @font-face {
  11. font-family: Symbola;
  12. src: url(font/Symbola.eot);
  13. src: local("Symbola Regular"), local("Symbola"), url(font/Symbola.ttf) format("truetype"), url(font/Symbola.otf) format("opentype"), url(font/Symbola.svg#Symbola) format("svg");
  14. }
  15. .mathquill-editable {
  16. display: -moz-inline-box;
  17. display: inline-block;
  18. white-space: pre-wrap;
  19. }
  20. .mathquill-editable .cursor {
  21. border-left: 1px solid black;
  22. margin-right: -1px;
  23. position: relative;
  24. z-index: 1;
  25. padding: 0;
  26. display: -moz-inline-box;
  27. display: inline-block;
  28. }
  29. .mathquill-editable .cursor.blink {
  30. visibility: hidden;
  31. }
  32. .mathquill-editable,
  33. .mathquill-embedded-latex .mathquill-editable {
  34. border: 1px solid gray;
  35. padding: 2px;
  36. }
  37. .mathquill-embedded-latex .mathquill-editable {
  38. margin: 1px;
  39. }
  40. .mathquill-editable.hasCursor,
  41. .mathquill-editable .hasCursor {
  42. -webkit-box-shadow: #68b4df 0 0 3px 2px;
  43. -moz-box-shadow: #68b4df 0 0 3px 2px;
  44. box-shadow: #68b4df 0 0 3px 2px;
  45. }
  46. .mathquill-editable .latex-command-input {
  47. color: inherit;
  48. font-family: "Courier New", monospace;
  49. border: 1px solid gray;
  50. padding-right: 1px;
  51. margin-right: 1px;
  52. margin-left: 2px;
  53. }
  54. .mathquill-editable .latex-command-input.empty {
  55. background: transparent;
  56. }
  57. .mathquill-editable .latex-command-input.hasCursor {
  58. border-color: ActiveBorder;
  59. }
  60. .mathquill-editable.empty:after,
  61. .mathquill-textbox:after,
  62. .mathquill-rendered-math .empty:after {
  63. visibility: hidden;
  64. content: 'c';
  65. }
  66. .mathquill-editable .cursor:only-child:after,
  67. .mathquill-editable .textarea + .cursor:last-child:after {
  68. visibility: hidden;
  69. content: 'c';
  70. }
  71. .mathquill-textbox {
  72. overflow-x: auto;
  73. overflow-y: hidden;
  74. }
  75. .mathquill-rendered-math {
  76. font-variant: normal;
  77. font-weight: normal;
  78. font-style: normal;
  79. font-size: 115%;
  80. line-height: 1;
  81. display: -moz-inline-box;
  82. display: inline-block;
  83. }
  84. .mathquill-rendered-math .non-leaf,
  85. .mathquill-rendered-math .scaled {
  86. display: -moz-inline-box;
  87. display: inline-block;
  88. }
  89. .mathquill-rendered-math var,
  90. .mathquill-rendered-math .text,
  91. .mathquill-rendered-math .nonSymbola {
  92. font-family: "Times New Roman", Symbola, serif;
  93. line-height: .9;
  94. }
  95. .mathquill-rendered-math * {
  96. font-size: inherit;
  97. line-height: inherit;
  98. margin: 0;
  99. padding: 0;
  100. border-color: black;
  101. -webkit-user-select: none;
  102. -moz-user-select: none;
  103. user-select: none;
  104. }
  105. .mathquill-rendered-math .empty {
  106. background: #ccc;
  107. }
  108. .mathquill-rendered-math.empty {
  109. background: transparent;
  110. }
  111. .mathquill-rendered-math .text {
  112. font-size: 87%;
  113. }
  114. .mathquill-rendered-math .font {
  115. font: 1em "Times New Roman", Symbola, serif;
  116. }
  117. .mathquill-rendered-math .font * {
  118. font-family: inherit;
  119. font-style: inherit;
  120. }
  121. .mathquill-rendered-math b,
  122. .mathquill-rendered-math b.font {
  123. font-weight: bolder;
  124. }
  125. .mathquill-rendered-math var,
  126. .mathquill-rendered-math i,
  127. .mathquill-rendered-math i.font {
  128. font-syle: italic;
  129. }
  130. .mathquill-rendered-math var.florin {
  131. margin: 0 -0.1em;
  132. }
  133. .mathquill-rendered-math big {
  134. font-size: 125%;
  135. }
  136. .mathquill-rendered-math .roman {
  137. font-style: normal;
  138. }
  139. .mathquill-rendered-math .sans-serif {
  140. font-family: sans-serif, Symbola, serif;
  141. }
  142. .mathquill-rendered-math .monospace {
  143. font-family: monospace, Symbola, serif;
  144. }
  145. .mathquill-rendered-math .overline {
  146. border-top: 1px solid black;
  147. margin-top: 1px;
  148. }
  149. .mathquill-rendered-math .underline {
  150. border-bottom: 1px solid black;
  151. margin-bottom: 1px;
  152. }
  153. .mathquill-rendered-math .binary-operator {
  154. padding: 0 0.2em;
  155. display: -moz-inline-box;
  156. display: inline-block;
  157. }
  158. .mathquill-rendered-math .unary-operator {
  159. padding-left: 0.2em;
  160. }
  161. .mathquill-rendered-math sup,
  162. .mathquill-rendered-math sub {
  163. position: relative;
  164. font-size: 90%;
  165. }
  166. .mathquill-rendered-math sup .binary-operator,
  167. .mathquill-rendered-math sub .binary-operator {
  168. padding: 0 .1em;
  169. }
  170. .mathquill-rendered-math sup .unary-operator,
  171. .mathquill-rendered-math sub .unary-operator {
  172. padding-left: .1em;
  173. }
  174. .mathquill-rendered-math sup.limit,
  175. .mathquill-rendered-math sub.limit,
  176. .mathquill-rendered-math sup.nthroot,
  177. .mathquill-rendered-math sub.nthroot {
  178. font-size: 80%;
  179. }
  180. .mathquill-rendered-math sup .fraction,
  181. .mathquill-rendered-math sub .fraction {
  182. font-size: 70%;
  183. vertical-align: -0.4em;
  184. }
  185. .mathquill-rendered-math sup .numerator,
  186. .mathquill-rendered-math sub .numerator {
  187. padding-bottom: 0;
  188. }
  189. .mathquill-rendered-math sup .denominator,
  190. .mathquill-rendered-math sub .denominator {
  191. padding-top: 0;
  192. }
  193. .mathquill-rendered-math sup {
  194. vertical-align: .5em;
  195. }
  196. .mathquill-rendered-math sup.limit,
  197. .mathquill-rendered-math sup.nthroot {
  198. vertical-align: 0.8em;
  199. }
  200. .mathquill-rendered-math sup.nthroot {
  201. margin-right: -0.6em;
  202. margin-left: .2em;
  203. min-width: .5em;
  204. }
  205. .mathquill-rendered-math sub {
  206. vertical-align: -0.4em;
  207. }
  208. .mathquill-rendered-math sub.limit {
  209. vertical-align: -0.6em;
  210. }
  211. .mathquill-rendered-math .paren {
  212. padding: 0 .1em;
  213. vertical-align: bottom;
  214. -webkit-transform-origin: bottom center;
  215. -moz-transform-origin: bottom center;
  216. -ms-transform-origin: bottom center;
  217. -o-transform-origin: bottom center;
  218. transform-origin: bottom center;
  219. }
  220. .mathquill-rendered-math .array {
  221. vertical-align: middle;
  222. text-align: center;
  223. }
  224. .mathquill-rendered-math .array > span {
  225. display: block;
  226. }
  227. .mathquill-rendered-math .non-italicized-function {
  228. font-family: Symbola, "Times New Roman", serif;
  229. line-height: .9;
  230. font-style: normal;
  231. padding-right: .2em;
  232. }
  233. .mathquill-rendered-math .fraction {
  234. font-size: 90%;
  235. text-align: center;
  236. vertical-align: -0.5em;
  237. padding: 0 .2em;
  238. }
  239. .mathquill-rendered-math .fraction,
  240. .mathquill-rendered-math x:-moz-any-link {
  241. display: -moz-groupbox;
  242. }
  243. .mathquill-rendered-math .fraction,
  244. .mathquill-rendered-math x:-moz-any-link,
  245. .mathquill-rendered-math x:default {
  246. display: inline-block;
  247. }
  248. .mathquill-rendered-math .numerator,
  249. .mathquill-rendered-math .denominator {
  250. display: block;
  251. }
  252. .mathquill-rendered-math .numerator {
  253. padding: 0 0.1em;
  254. margin-bottom: -0.1em;
  255. }
  256. .mathquill-rendered-math .denominator {
  257. border-top: 1px solid;
  258. float: right;
  259. width: 100%;
  260. padding: .1em .1em 0 .1em;
  261. margin-right: -0.1em;
  262. margin-left: -0.1em;
  263. }
  264. .mathquill-rendered-math .sqrt-prefix {
  265. padding-top: 0;
  266. position: relative;
  267. top: .1em;
  268. vertical-align: top;
  269. -webkit-transform-origin: top;
  270. -moz-transform-origin: top;
  271. -ms-transform-origin: top;
  272. -o-transform-origin: top;
  273. transform-origin: top;
  274. }
  275. .mathquill-rendered-math .sqrt-stem {
  276. border-top: 1px solid;
  277. margin-top: 1px;
  278. padding-left: .15em;
  279. padding-right: .2em;
  280. margin-right: .1em;
  281. }
  282. .mathquill-rendered-math .vector-prefix {
  283. display: block;
  284. text-align: center;
  285. line-height: .25em;
  286. margin-bottom: -0.1em;
  287. font-size: 0.75em;
  288. }
  289. .mathquill-rendered-math .vector-stem {
  290. display: block;
  291. }
  292. .mathquill-rendered-math,
  293. .mathquill-rendered-math .mathquill-editable {
  294. cursor: text;
  295. font-family: Symbola, "Times New Roman", serif;
  296. }
  297. .mathquill-rendered-math .selection,
  298. .mathquill-editable .selection,
  299. .mathquill-rendered-math .selection .non-leaf,
  300. .mathquill-editable .selection .non-leaf,
  301. .mathquill-rendered-math .selection .scaled,
  302. .mathquill-editable .selection .scaled {
  303. background: #B4D5FE !important;
  304. background: Highlight !important;
  305. color: HighlightText;
  306. border-color: HighlightText;
  307. }
  308. .mathquill-rendered-math .selection .matrixed,
  309. .mathquill-editable .selection .matrixed {
  310. background: #39F !important;
  311. }
  312. .mathquill-rendered-math .selection .matrixed-container,
  313. .mathquill-editable .selection .matrixed-container {
  314. filter: progid:DXImageTransform.Microsoft.Chroma(color='#3399FF') !important;
  315. }
  316. .mathquill-rendered-math .selection.blur,
  317. .mathquill-editable .selection.blur,
  318. .mathquill-rendered-math .selection.blur .non-leaf,
  319. .mathquill-editable .selection.blur .non-leaf,
  320. .mathquill-rendered-math .selection.blur .scaled,
  321. .mathquill-editable .selection.blur .scaled,
  322. .mathquill-rendered-math .selection.blur .matrixed,
  323. .mathquill-editable .selection.blur .matrixed {
  324. background: #D4D4D4 !important;
  325. color: black;
  326. border-color: black;
  327. }
  328. .mathquill-rendered-math .selection.blur .matrixed-container,
  329. .mathquill-editable .selection.blur .matrixed-container {
  330. filter: progid:DXImageTransform.Microsoft.Chroma(color='#D4D4D4') !important;
  331. }
  332. .mathquill-editable .textarea,
  333. .mathquill-rendered-math .textarea {
  334. position: relative;
  335. -webkit-user-select: text;
  336. -moz-user-select: text;
  337. user-select: text;
  338. }
  339. .mathquill-editable .textarea textarea,
  340. .mathquill-rendered-math .textarea textarea,
  341. .mathquill-editable .selectable,
  342. .mathquill-rendered-math .selectable {
  343. -webkit-user-select: text;
  344. -moz-user-select: text;
  345. user-select: text;
  346. position: absolute;
  347. clip: rect(1em 1em 1em 1em);
  348. }
  349. .mathquill-rendered-math .matrixed {
  350. background: white;
  351. display: -moz-inline-box;
  352. display: inline-block;
  353. }
  354. .mathquill-rendered-math .matrixed-container {
  355. filter: progid:DXImageTransform.Microsoft.Chroma(color='white');
  356. margin-top: -0.1em;
  357. }