mathquill.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. /*
  2. * MathQuill v0.10.1 http://mathquill.com
  3. * by Han, Jeanine, and Mary maintainers@mathquill.com
  4. *
  5. * This Source Code Form is subject to the terms of the
  6. * Mozilla Public License, v. 2.0. If a copy of the MPL
  7. * was not distributed with this file, You can obtain
  8. * one at http://mozilla.org/MPL/2.0/.
  9. */
  10. @font-face {
  11. font-family: Symbola;
  12. src: url(font/Symbola.eot);
  13. src: local("Symbola Regular"), local("Symbola"), url(font/Symbola.woff2) format("woff2"), url(font/Symbola.woff) format("woff"), url(font/Symbola.ttf) format("truetype"), url(font/Symbola.otf) format("opentype"), url(font/Symbola.svg#Symbola) format("svg");
  14. }
  15. .mq-editable-field {
  16. display: -moz-inline-box;
  17. display: inline-block;
  18. }
  19. .mq-editable-field .mq-cursor {
  20. border-left: 1px solid black;
  21. margin-left: -1px;
  22. position: relative;
  23. z-index: 1;
  24. padding: 0;
  25. display: -moz-inline-box;
  26. display: inline-block;
  27. }
  28. .mq-editable-field .mq-cursor.mq-blink {
  29. visibility: hidden;
  30. }
  31. .mq-editable-field,
  32. .mq-math-mode .mq-editable-field {
  33. border: 1px solid gray;
  34. }
  35. .mq-editable-field.mq-focused,
  36. .mq-math-mode .mq-editable-field.mq-focused {
  37. -webkit-box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
  38. -moz-box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
  39. box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
  40. border-color: #709AC0;
  41. border-radius: 1px;
  42. }
  43. .mq-math-mode .mq-editable-field {
  44. margin: 1px;
  45. }
  46. .mq-editable-field .mq-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. .mq-editable-field .mq-latex-command-input.mq-empty {
  55. background: transparent;
  56. }
  57. .mq-editable-field .mq-latex-command-input.mq-hasCursor {
  58. border-color: ActiveBorder;
  59. }
  60. .mq-editable-field.mq-empty:after,
  61. .mq-editable-field.mq-text-mode:after,
  62. .mq-math-mode .mq-empty:after {
  63. visibility: hidden;
  64. content: 'c';
  65. }
  66. .mq-editable-field .mq-cursor:only-child:after,
  67. .mq-editable-field .mq-textarea + .mq-cursor:last-child:after {
  68. visibility: hidden;
  69. content: 'c';
  70. }
  71. .mq-editable-field .mq-text-mode .mq-cursor:only-child:after {
  72. content: '';
  73. }
  74. .mq-editable-field.mq-text-mode {
  75. overflow-x: auto;
  76. overflow-y: hidden;
  77. }
  78. .mq-root-block,
  79. .mq-math-mode .mq-root-block {
  80. display: -moz-inline-box;
  81. display: inline-block;
  82. width: 100%;
  83. padding: 2px;
  84. -webkit-box-sizing: border-box;
  85. -moz-box-sizing: border-box;
  86. box-sizing: border-box;
  87. white-space: nowrap;
  88. overflow: hidden;
  89. vertical-align: middle;
  90. }
  91. .mq-math-mode {
  92. font-variant: normal;
  93. font-weight: normal;
  94. font-style: normal;
  95. font-size: 115%;
  96. line-height: 1;
  97. display: -moz-inline-box;
  98. display: inline-block;
  99. }
  100. .mq-math-mode .mq-non-leaf,
  101. .mq-math-mode .mq-scaled {
  102. display: -moz-inline-box;
  103. display: inline-block;
  104. }
  105. .mq-math-mode var,
  106. .mq-math-mode .mq-text-mode,
  107. .mq-math-mode .mq-nonSymbola {
  108. font-family: "Times New Roman", Symbola, serif;
  109. line-height: .9;
  110. }
  111. .mq-math-mode * {
  112. font-size: inherit;
  113. line-height: inherit;
  114. margin: 0;
  115. padding: 0;
  116. border-color: black;
  117. -webkit-user-select: none;
  118. -moz-user-select: none;
  119. user-select: none;
  120. box-sizing: border-box;
  121. }
  122. .mq-math-mode .mq-empty {
  123. background: #ccc;
  124. }
  125. .mq-math-mode .mq-empty.mq-root-block {
  126. background: transparent;
  127. }
  128. .mq-math-mode.mq-empty {
  129. background: transparent;
  130. }
  131. .mq-math-mode .mq-text-mode {
  132. font-size: 87%;
  133. }
  134. .mq-math-mode .mq-font {
  135. font: 1em "Times New Roman", Symbola, serif;
  136. }
  137. .mq-math-mode .mq-font * {
  138. font-family: inherit;
  139. font-style: inherit;
  140. }
  141. .mq-math-mode b,
  142. .mq-math-mode b.mq-font {
  143. font-weight: bolder;
  144. }
  145. .mq-math-mode var,
  146. .mq-math-mode i,
  147. .mq-math-mode i.mq-font {
  148. font-style: italic;
  149. }
  150. .mq-math-mode var.mq-f {
  151. margin-right: 0.2em;
  152. margin-left: 0.1em;
  153. }
  154. .mq-math-mode .mq-roman var.mq-f {
  155. margin: 0;
  156. }
  157. .mq-math-mode big {
  158. font-size: 125%;
  159. }
  160. .mq-math-mode .mq-roman {
  161. font-style: normal;
  162. }
  163. .mq-math-mode .mq-sans-serif {
  164. font-family: sans-serif, Symbola, serif;
  165. }
  166. .mq-math-mode .mq-monospace {
  167. font-family: monospace, Symbola, serif;
  168. }
  169. .mq-math-mode .mq-overline {
  170. border-top: 1px solid black;
  171. margin-top: 1px;
  172. }
  173. .mq-math-mode .mq-underline {
  174. border-bottom: 1px solid black;
  175. margin-bottom: 1px;
  176. }
  177. .mq-math-mode .mq-binary-operator {
  178. padding: 0 0.2em;
  179. display: -moz-inline-box;
  180. display: inline-block;
  181. }
  182. .mq-math-mode .mq-supsub {
  183. font-size: 90%;
  184. vertical-align: -0.5em;
  185. }
  186. .mq-math-mode .mq-supsub.mq-limit {
  187. font-size: 80%;
  188. vertical-align: -0.4em;
  189. }
  190. .mq-math-mode .mq-supsub.mq-sup-only {
  191. vertical-align: .5em;
  192. }
  193. .mq-math-mode .mq-supsub.mq-sup-only .mq-sup {
  194. display: inline-block;
  195. vertical-align: text-bottom;
  196. }
  197. .mq-math-mode .mq-supsub .mq-sup {
  198. display: block;
  199. }
  200. .mq-math-mode .mq-supsub .mq-sub {
  201. display: block;
  202. float: left;
  203. }
  204. .mq-math-mode .mq-supsub.mq-limit .mq-sub {
  205. margin-left: -0.25em;
  206. }
  207. .mq-math-mode .mq-supsub .mq-binary-operator {
  208. padding: 0 .1em;
  209. }
  210. .mq-math-mode .mq-supsub .mq-fraction {
  211. font-size: 70%;
  212. }
  213. .mq-math-mode sup.mq-nthroot {
  214. font-size: 80%;
  215. vertical-align: 0.8em;
  216. margin-right: -0.6em;
  217. margin-left: .2em;
  218. min-width: .5em;
  219. }
  220. .mq-math-mode .mq-paren {
  221. padding: 0 .1em;
  222. vertical-align: top;
  223. -webkit-transform-origin: center .06em;
  224. -moz-transform-origin: center .06em;
  225. -ms-transform-origin: center .06em;
  226. -o-transform-origin: center .06em;
  227. transform-origin: center .06em;
  228. }
  229. .mq-math-mode .mq-paren.mq-ghost {
  230. color: silver;
  231. }
  232. .mq-math-mode .mq-paren + span {
  233. margin-top: .1em;
  234. margin-bottom: .1em;
  235. }
  236. .mq-math-mode .mq-array {
  237. vertical-align: middle;
  238. text-align: center;
  239. }
  240. .mq-math-mode .mq-array > span {
  241. display: block;
  242. }
  243. .mq-math-mode .mq-operator-name {
  244. font-family: Symbola, "Times New Roman", serif;
  245. line-height: .9;
  246. font-style: normal;
  247. }
  248. .mq-math-mode var.mq-operator-name.mq-first {
  249. padding-left: .2em;
  250. }
  251. .mq-math-mode var.mq-operator-name.mq-last {
  252. padding-right: .2em;
  253. }
  254. .mq-math-mode .mq-fraction {
  255. font-size: 90%;
  256. text-align: center;
  257. vertical-align: -0.4em;
  258. padding: 0 .2em;
  259. }
  260. .mq-math-mode .mq-fraction,
  261. .mq-math-mode .mq-large-operator,
  262. .mq-math-mode x:-moz-any-link {
  263. display: -moz-groupbox;
  264. }
  265. .mq-math-mode .mq-fraction,
  266. .mq-math-mode .mq-large-operator,
  267. .mq-math-mode x:-moz-any-link,
  268. .mq-math-mode x:default {
  269. display: inline-block;
  270. }
  271. .mq-math-mode .mq-numerator,
  272. .mq-math-mode .mq-denominator {
  273. display: block;
  274. }
  275. .mq-math-mode .mq-numerator {
  276. padding: 0 0.1em;
  277. }
  278. .mq-math-mode .mq-denominator {
  279. border-top: 1px solid;
  280. float: right;
  281. width: 100%;
  282. padding: 0.1em;
  283. }
  284. .mq-math-mode .mq-sqrt-prefix {
  285. padding-top: 0;
  286. position: relative;
  287. top: 0.1em;
  288. vertical-align: top;
  289. -webkit-transform-origin: top;
  290. -moz-transform-origin: top;
  291. -ms-transform-origin: top;
  292. -o-transform-origin: top;
  293. transform-origin: top;
  294. }
  295. .mq-math-mode .mq-sqrt-stem {
  296. border-top: 1px solid;
  297. margin-top: 1px;
  298. padding-left: .15em;
  299. padding-right: .2em;
  300. margin-right: .1em;
  301. padding-top: 1px;
  302. }
  303. .mq-math-mode .mq-vector-prefix {
  304. display: block;
  305. text-align: center;
  306. line-height: .25em;
  307. margin-bottom: -0.1em;
  308. font-size: 0.75em;
  309. }
  310. .mq-math-mode .mq-vector-stem {
  311. display: block;
  312. }
  313. .mq-math-mode .mq-large-operator {
  314. text-align: center;
  315. }
  316. .mq-math-mode .mq-large-operator .mq-from,
  317. .mq-math-mode .mq-large-operator big,
  318. .mq-math-mode .mq-large-operator .mq-to {
  319. display: block;
  320. }
  321. .mq-math-mode .mq-large-operator .mq-from,
  322. .mq-math-mode .mq-large-operator .mq-to {
  323. font-size: 80%;
  324. }
  325. .mq-math-mode .mq-large-operator .mq-from {
  326. float: right;
  327. /* take out of normal flow to manipulate baseline */
  328. width: 100%;
  329. }
  330. .mq-math-mode,
  331. .mq-math-mode .mq-editable-field {
  332. cursor: text;
  333. font-family: Symbola, "Times New Roman", serif;
  334. }
  335. .mq-math-mode .mq-overarrow {
  336. border-top: 1px solid black;
  337. margin-top: 1px;
  338. padding-top: 0.2em;
  339. }
  340. .mq-math-mode .mq-overarrow:before {
  341. display: block;
  342. position: relative;
  343. top: -0.34em;
  344. font-size: 0.5em;
  345. line-height: 0em;
  346. content: '\27A4';
  347. text-align: right;
  348. }
  349. .mq-math-mode .mq-overarrow.mq-arrow-left:before {
  350. -moz-transform: scaleX(-1);
  351. -o-transform: scaleX(-1);
  352. -webkit-transform: scaleX(-1);
  353. transform: scaleX(-1);
  354. filter: FlipH;
  355. -ms-filter: "FlipH";
  356. }
  357. .mq-math-mode .mq-selection,
  358. .mq-editable-field .mq-selection,
  359. .mq-math-mode .mq-selection .mq-non-leaf,
  360. .mq-editable-field .mq-selection .mq-non-leaf,
  361. .mq-math-mode .mq-selection .mq-scaled,
  362. .mq-editable-field .mq-selection .mq-scaled {
  363. background: #B4D5FE !important;
  364. background: Highlight !important;
  365. color: HighlightText;
  366. border-color: HighlightText;
  367. }
  368. .mq-math-mode .mq-selection .mq-matrixed,
  369. .mq-editable-field .mq-selection .mq-matrixed {
  370. background: #39F !important;
  371. }
  372. .mq-math-mode .mq-selection .mq-matrixed-container,
  373. .mq-editable-field .mq-selection .mq-matrixed-container {
  374. filter: progid:DXImageTransform.Microsoft.Chroma(color='#3399FF') !important;
  375. }
  376. .mq-math-mode .mq-selection.mq-blur,
  377. .mq-editable-field .mq-selection.mq-blur,
  378. .mq-math-mode .mq-selection.mq-blur .mq-non-leaf,
  379. .mq-editable-field .mq-selection.mq-blur .mq-non-leaf,
  380. .mq-math-mode .mq-selection.mq-blur .mq-scaled,
  381. .mq-editable-field .mq-selection.mq-blur .mq-scaled,
  382. .mq-math-mode .mq-selection.mq-blur .mq-matrixed,
  383. .mq-editable-field .mq-selection.mq-blur .mq-matrixed {
  384. background: #D4D4D4 !important;
  385. color: black;
  386. border-color: black;
  387. }
  388. .mq-math-mode .mq-selection.mq-blur .mq-matrixed-container,
  389. .mq-editable-field .mq-selection.mq-blur .mq-matrixed-container {
  390. filter: progid:DXImageTransform.Microsoft.Chroma(color='#D4D4D4') !important;
  391. }
  392. .mq-editable-field .mq-textarea,
  393. .mq-math-mode .mq-textarea {
  394. position: relative;
  395. -webkit-user-select: text;
  396. -moz-user-select: text;
  397. user-select: text;
  398. }
  399. .mq-editable-field .mq-textarea *,
  400. .mq-math-mode .mq-textarea *,
  401. .mq-editable-field .mq-selectable,
  402. .mq-math-mode .mq-selectable {
  403. -webkit-user-select: text;
  404. -moz-user-select: text;
  405. user-select: text;
  406. position: absolute;
  407. clip: rect(1em 1em 1em 1em);
  408. -webkit-transform: scale(0);
  409. -moz-transform: scale(0);
  410. -ms-transform: scale(0);
  411. -o-transform: scale(0);
  412. transform: scale(0);
  413. resize: none;
  414. width: 1px;
  415. height: 1px;
  416. }
  417. .mq-math-mode .mq-matrixed {
  418. background: white;
  419. display: -moz-inline-box;
  420. display: inline-block;
  421. }
  422. .mq-math-mode .mq-matrixed-container {
  423. filter: progid:DXImageTransform.Microsoft.Chroma(color='white');
  424. margin-top: -0.1em;
  425. }