@khanacademy/math-input 16.5.0 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -78,26 +78,46 @@
78
78
  color: white !important;
79
79
  display: inline-block !important;
80
80
  }
81
- /*
82
- * MathQuill v0.10.1 http://mathquill.com
83
- * by Han, Jeanine, and Mary maintainers@mathquill.com
81
+ /**
82
+ * @license
83
+ * MathQuill v0.10.1, by Han, Jeanine, and Mary
84
+ * http://mathquill.com | maintainers@mathquill.com
84
85
  *
85
86
  * This Source Code Form is subject to the terms of the
86
87
  * Mozilla Public License, v. 2.0. If a copy of the MPL
87
88
  * was not distributed with this file, You can obtain
88
89
  * one at http://mozilla.org/MPL/2.0/.
89
90
  */
91
+
92
+ .mq-aria-alert {
93
+ position: absolute;
94
+ left: -1000px;
95
+ top: -1000px;
96
+ width: 0px;
97
+ height: 0px;
98
+ text-align: left;
99
+ overflow: hidden;
100
+ }
101
+ .mq-mathspeak {
102
+ position: absolute;
103
+ left: -1000px;
104
+ top: -1000px;
105
+ width: 0px;
106
+ height: 0px;
107
+ text-align: left;
108
+ overflow: hidden;
109
+ }
90
110
  @font-face {
91
111
  font-family: Symbola;
92
112
  src: url(/fonts/Symbola.eot);
93
- src: local("Symbola Regular"), local("Symbola"), url(/fonts/Symbola.woff2) format("woff2"), url(/fonts/Symbola.woff) format("woff"), url(/fonts/Symbola.ttf) format("truetype"), url(/fonts/Symbola.otf) format("opentype"), url(/fonts/Symbola.svg#Symbola) format("svg");
113
+ src: local('Symbola Regular'), local('Symbola'), url(/fonts/Symbola.woff2) format('woff2'), url(/fonts/Symbola.woff) format('woff'), url(/fonts/Symbola.ttf) format('truetype'), url(/fonts/Symbola.otf) format('opentype'), url(/fonts/Symbola.svg#Symbola) format('svg');
94
114
  }
95
115
  .mq-editable-field {
96
116
  display: -moz-inline-box;
97
117
  display: inline-block;
98
118
  }
99
119
  .mq-editable-field .mq-cursor {
100
- border-left: 1px solid black;
120
+ border-left: 1px solid currentColor;
101
121
  margin-left: -1px;
102
122
  position: relative;
103
123
  z-index: 1;
@@ -117,15 +137,14 @@
117
137
  -webkit-box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
118
138
  -moz-box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
119
139
  box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
120
- border-color: #709AC0;
121
- border-radius: 1px;
140
+ border-color: #709ac0;
122
141
  }
123
142
  .mq-math-mode .mq-editable-field {
124
143
  margin: 1px;
125
144
  }
126
145
  .mq-editable-field .mq-latex-command-input {
127
146
  color: inherit;
128
- font-family: "Courier New", monospace;
147
+ font-family: 'Courier New', monospace;
129
148
  border: 1px solid gray;
130
149
  padding-right: 1px;
131
150
  margin-right: 1px;
@@ -168,6 +187,46 @@
168
187
  overflow: hidden;
169
188
  vertical-align: middle;
170
189
  }
190
+ .mq-root-block .mq-digit,
191
+ .mq-math-mode .mq-root-block .mq-digit {
192
+ margin-left: 0.009em;
193
+ margin-right: 0.009em;
194
+ }
195
+ .mq-root-block .mq-group-start,
196
+ .mq-math-mode .mq-root-block .mq-group-start {
197
+ margin-left: 0.11em;
198
+ margin-right: -0.01em;
199
+ }
200
+ .mq-root-block .mq-group-other,
201
+ .mq-math-mode .mq-root-block .mq-group-other {
202
+ margin-left: -0.01em;
203
+ margin-right: -0.01em;
204
+ }
205
+ .mq-root-block .mq-group-leading-1,
206
+ .mq-math-mode .mq-root-block .mq-group-leading-1,
207
+ .mq-root-block .mq-group-leading-2,
208
+ .mq-math-mode .mq-root-block .mq-group-leading-2 {
209
+ margin-left: 0;
210
+ margin-right: -0.01em;
211
+ }
212
+ .mq-root-block .mq-group-leading-3,
213
+ .mq-math-mode .mq-root-block .mq-group-leading-3 {
214
+ margin-left: 0.036em;
215
+ margin-right: -0.01em;
216
+ }
217
+ .mq-root-block.mq-suppress-grouping .mq-group-start,
218
+ .mq-math-mode .mq-root-block.mq-suppress-grouping .mq-group-start,
219
+ .mq-root-block.mq-suppress-grouping .mq-group-other,
220
+ .mq-math-mode .mq-root-block.mq-suppress-grouping .mq-group-other,
221
+ .mq-root-block.mq-suppress-grouping .mq-group-leading-1,
222
+ .mq-math-mode .mq-root-block.mq-suppress-grouping .mq-group-leading-1,
223
+ .mq-root-block.mq-suppress-grouping .mq-group-leading-2,
224
+ .mq-math-mode .mq-root-block.mq-suppress-grouping .mq-group-leading-2,
225
+ .mq-root-block.mq-suppress-grouping .mq-group-leading-3,
226
+ .mq-math-mode .mq-root-block.mq-suppress-grouping .mq-group-leading-3 {
227
+ margin-left: 0.009em;
228
+ margin-right: 0.009em;
229
+ }
171
230
  .mq-math-mode {
172
231
  font-variant: normal;
173
232
  font-weight: normal;
@@ -185,8 +244,16 @@
185
244
  .mq-math-mode var,
186
245
  .mq-math-mode .mq-text-mode,
187
246
  .mq-math-mode .mq-nonSymbola {
188
- font-family: "Times New Roman", Symbola, serif;
189
- line-height: .9;
247
+ font-family: 'Times New Roman', Symbola, serif;
248
+ line-height: 0.9;
249
+ }
250
+ .mq-math-mode svg {
251
+ fill: currentColor;
252
+ position: absolute;
253
+ top: 0;
254
+ left: 0;
255
+ width: 100%;
256
+ height: 100%;
190
257
  }
191
258
  .mq-math-mode * {
192
259
  font-size: inherit;
@@ -200,25 +267,29 @@
200
267
  box-sizing: border-box;
201
268
  }
202
269
  .mq-math-mode .mq-empty {
203
- background: #ccc;
270
+ background: rgba(0, 0, 0, 0.2);
204
271
  }
205
272
  .mq-math-mode .mq-empty.mq-root-block {
206
273
  background: transparent;
207
274
  }
275
+ .mq-math-mode .mq-empty.mq-quiet-delimiter {
276
+ background: transparent;
277
+ }
208
278
  .mq-math-mode.mq-empty {
209
279
  background: transparent;
210
280
  }
211
281
  .mq-math-mode .mq-text-mode {
212
282
  display: inline-block;
283
+ white-space: pre;
213
284
  }
214
285
  .mq-math-mode .mq-text-mode.mq-hasCursor {
215
- box-shadow: inset darkgray 0 .1em .2em;
216
- padding: 0 .1em;
286
+ box-shadow: inset darkgray 0 0.1em 0.2em;
287
+ padding: 0 0.1em;
217
288
  margin: 0 -0.1em;
218
289
  min-width: 1ex;
219
290
  }
220
291
  .mq-math-mode .mq-font {
221
- font: 1em "Times New Roman", Symbola, serif;
292
+ font: 1em 'Times New Roman', Symbola, serif;
222
293
  }
223
294
  .mq-math-mode .mq-font * {
224
295
  font-family: inherit;
@@ -243,6 +314,26 @@
243
314
  .mq-math-mode big {
244
315
  font-size: 200%;
245
316
  }
317
+ .mq-math-mode .mq-int > big {
318
+ display: inline-block;
319
+ -webkit-transform: scaleX(0.7);
320
+ -moz-transform: scaleX(0.7);
321
+ -ms-transform: scaleX(0.7);
322
+ -o-transform: scaleX(0.7);
323
+ transform: scaleX(0.7);
324
+ vertical-align: -0.16em;
325
+ }
326
+ .mq-math-mode .mq-int > .mq-supsub {
327
+ font-size: 80%;
328
+ vertical-align: -1.1em;
329
+ padding-right: 0.2em;
330
+ }
331
+ .mq-math-mode .mq-int > .mq-supsub > .mq-sup > .mq-sup-inner {
332
+ vertical-align: 1.3em;
333
+ }
334
+ .mq-math-mode .mq-int > .mq-supsub > .mq-sub {
335
+ margin-left: -0.35em;
336
+ }
246
337
  .mq-math-mode .mq-roman {
247
338
  font-style: normal;
248
339
  }
@@ -253,11 +344,11 @@
253
344
  font-family: monospace, Symbola, serif;
254
345
  }
255
346
  .mq-math-mode .mq-overline {
256
- border-top: 1px solid black;
347
+ border-top: 1px solid;
257
348
  margin-top: 1px;
258
349
  }
259
350
  .mq-math-mode .mq-underline {
260
- border-bottom: 1px solid black;
351
+ border-bottom: 1px solid;
261
352
  margin-bottom: 1px;
262
353
  }
263
354
  .mq-math-mode .mq-binary-operator {
@@ -270,14 +361,10 @@
270
361
  font-size: 90%;
271
362
  vertical-align: -0.5em;
272
363
  }
273
- .mq-math-mode .mq-supsub.mq-limit {
274
- font-size: 80%;
275
- vertical-align: -0.4em;
276
- }
277
364
  .mq-math-mode .mq-supsub.mq-sup-only {
278
- vertical-align: .5em;
365
+ vertical-align: 0.5em;
279
366
  }
280
- .mq-math-mode .mq-supsub.mq-sup-only .mq-sup {
367
+ .mq-math-mode .mq-supsub.mq-sup-only > .mq-sup {
281
368
  display: inline-block;
282
369
  vertical-align: text-bottom;
283
370
  }
@@ -288,11 +375,8 @@
288
375
  display: block;
289
376
  float: left;
290
377
  }
291
- .mq-math-mode .mq-supsub.mq-limit .mq-sub {
292
- margin-left: -0.25em;
293
- }
294
378
  .mq-math-mode .mq-supsub .mq-binary-operator {
295
- padding: 0 .1em;
379
+ padding: 0 0.1em;
296
380
  }
297
381
  .mq-math-mode .mq-supsub .mq-fraction {
298
382
  font-size: 70%;
@@ -301,24 +385,30 @@
301
385
  font-size: 80%;
302
386
  vertical-align: 0.8em;
303
387
  margin-right: -0.6em;
304
- margin-left: .2em;
305
- min-width: .5em;
388
+ margin-left: 0.2em;
389
+ min-width: 0.5em;
306
390
  }
307
- .mq-math-mode .mq-paren {
308
- padding: 0 .1em;
309
- vertical-align: top;
310
- -webkit-transform-origin: center .06em;
311
- -moz-transform-origin: center .06em;
312
- -ms-transform-origin: center .06em;
313
- -o-transform-origin: center .06em;
314
- transform-origin: center .06em;
391
+ .mq-math-mode .mq-ghost svg {
392
+ opacity: 0.2;
315
393
  }
316
- .mq-math-mode .mq-paren.mq-ghost {
317
- color: silver;
394
+ .mq-math-mode .mq-bracket-middle {
395
+ margin-top: 0.1em;
396
+ margin-bottom: 0.1em;
318
397
  }
319
- .mq-math-mode .mq-paren + span {
320
- margin-top: .1em;
321
- margin-bottom: .1em;
398
+ .mq-math-mode .mq-bracket-l,
399
+ .mq-math-mode .mq-bracket-r {
400
+ position: absolute;
401
+ top: 0;
402
+ bottom: 2px;
403
+ }
404
+ .mq-math-mode .mq-bracket-l {
405
+ left: 0;
406
+ }
407
+ .mq-math-mode .mq-bracket-r {
408
+ right: 0;
409
+ }
410
+ .mq-math-mode .mq-bracket-container {
411
+ position: relative;
322
412
  }
323
413
  .mq-math-mode .mq-array {
324
414
  vertical-align: middle;
@@ -328,22 +418,22 @@
328
418
  display: block;
329
419
  }
330
420
  .mq-math-mode .mq-operator-name {
331
- font-family: Symbola, "Times New Roman", serif;
332
- line-height: .9;
421
+ font-family: Symbola, 'Times New Roman', serif;
422
+ line-height: 0.9;
333
423
  font-style: normal;
334
424
  }
335
425
  .mq-math-mode var.mq-operator-name.mq-first {
336
- padding-left: .2em;
426
+ padding-left: 0.2em;
337
427
  }
338
428
  .mq-math-mode var.mq-operator-name.mq-last,
339
429
  .mq-math-mode .mq-supsub.mq-after-operator-name {
340
- padding-right: .2em;
430
+ padding-right: 0.2em;
341
431
  }
342
432
  .mq-math-mode .mq-fraction {
343
433
  font-size: 90%;
344
434
  text-align: center;
345
435
  vertical-align: -0.4em;
346
- padding: 0 .2em;
436
+ padding: 0 0.2em;
347
437
  }
348
438
  .mq-math-mode .mq-fraction,
349
439
  .mq-math-mode .mq-large-operator,
@@ -357,7 +447,8 @@
357
447
  display: inline-block;
358
448
  }
359
449
  .mq-math-mode .mq-numerator,
360
- .mq-math-mode .mq-denominator {
450
+ .mq-math-mode .mq-denominator,
451
+ .mq-math-mode .mq-dot-recurring {
361
452
  display: block;
362
453
  }
363
454
  .mq-math-mode .mq-numerator {
@@ -369,38 +460,53 @@
369
460
  width: 100%;
370
461
  padding: 0.1em;
371
462
  }
463
+ .mq-math-mode .mq-dot-recurring {
464
+ text-align: center;
465
+ height: 0.3em;
466
+ }
372
467
  .mq-math-mode .mq-sqrt-prefix {
373
- padding-top: 0;
468
+ position: absolute;
469
+ top: 1px;
470
+ bottom: 0.15em;
471
+ width: 0.95em;
472
+ }
473
+ .mq-math-mode .mq-sqrt-container {
374
474
  position: relative;
375
- top: 0.1em;
376
- vertical-align: top;
377
- -webkit-transform-origin: top;
378
- -moz-transform-origin: top;
379
- -ms-transform-origin: top;
380
- -o-transform-origin: top;
381
- transform-origin: top;
382
475
  }
383
476
  .mq-math-mode .mq-sqrt-stem {
384
477
  border-top: 1px solid;
385
478
  margin-top: 1px;
386
- padding-left: .15em;
387
- padding-right: .2em;
388
- margin-right: .1em;
479
+ margin-left: 0.9em;
480
+ padding-left: 0.15em;
481
+ padding-right: 0.2em;
482
+ margin-right: 0.1em;
389
483
  padding-top: 1px;
390
484
  }
391
- .mq-math-mode .mq-vector-prefix {
485
+ .mq-math-mode .mq-diacritic-above {
486
+ display: block;
487
+ text-align: center;
488
+ line-height: 0.4em;
489
+ }
490
+ .mq-math-mode .mq-diacritic-stem {
392
491
  display: block;
393
492
  text-align: center;
394
- line-height: .25em;
395
- margin-bottom: -0.1em;
396
- font-size: 0.75em;
397
493
  }
398
- .mq-math-mode .mq-vector-stem {
494
+ .mq-math-mode .mq-hat-prefix {
495
+ display: block;
496
+ text-align: center;
497
+ line-height: 0.95em;
498
+ margin-bottom: -0.7em;
499
+ transform: scaleX(1.5);
500
+ -moz-transform: scaleX(1.5);
501
+ -o-transform: scaleX(1.5);
502
+ -webkit-transform: scaleX(1.5);
503
+ }
504
+ .mq-math-mode .mq-hat-stem {
399
505
  display: block;
400
506
  }
401
507
  .mq-math-mode .mq-large-operator {
402
508
  vertical-align: -0.2em;
403
- padding: .2em;
509
+ padding: 0.2em;
404
510
  text-align: center;
405
511
  }
406
512
  .mq-math-mode .mq-large-operator .mq-from,
@@ -420,29 +526,51 @@
420
526
  .mq-math-mode,
421
527
  .mq-math-mode .mq-editable-field {
422
528
  cursor: text;
423
- font-family: Symbola, "Times New Roman", serif;
529
+ font-family: Symbola, 'Times New Roman', serif;
530
+ }
531
+ .mq-math-mode .mq-overarc {
532
+ border-top: 1px solid black;
533
+ -webkit-border-top-right-radius: 50% 0.3em;
534
+ -moz-border-radius-topright: 50% 0.3em;
535
+ border-top-right-radius: 50% 0.3em;
536
+ -webkit-border-top-left-radius: 50% 0.3em;
537
+ -moz-border-radius-topleft: 50% 0.3em;
538
+ border-top-left-radius: 50% 0.3em;
539
+ margin-top: 1px;
540
+ padding-top: 0.15em;
424
541
  }
425
542
  .mq-math-mode .mq-overarrow {
543
+ min-width: 0.5em;
426
544
  border-top: 1px solid black;
427
545
  margin-top: 1px;
428
546
  padding-top: 0.2em;
429
- }
430
- .mq-math-mode .mq-overarrow:before {
431
- display: block;
547
+ text-align: center;
432
548
  position: relative;
433
- top: -0.34em;
549
+ }
550
+ .mq-math-mode .mq-overarrow:after {
551
+ position: absolute;
552
+ right: -0.1em;
553
+ top: -0.48em;
434
554
  font-size: 0.5em;
435
- line-height: 0em;
436
555
  content: '\27A4';
437
- text-align: right;
438
556
  }
439
- .mq-math-mode .mq-overarrow.mq-arrow-left:before {
557
+ .mq-math-mode .mq-overarrow.mq-arrow-left:after {
558
+ content: '';
559
+ display: none;
560
+ }
561
+ .mq-math-mode .mq-overarrow.mq-arrow-left:before,
562
+ .mq-math-mode .mq-overarrow.mq-arrow-leftright:before {
563
+ position: absolute;
564
+ top: -0.48em;
565
+ left: -0.1em;
566
+ font-size: 0.5em;
567
+ content: '\27A4';
440
568
  -moz-transform: scaleX(-1);
441
569
  -o-transform: scaleX(-1);
442
570
  -webkit-transform: scaleX(-1);
443
571
  transform: scaleX(-1);
444
572
  filter: FlipH;
445
- -ms-filter: "FlipH";
573
+ -ms-filter: 'FlipH';
446
574
  }
447
575
  .mq-math-mode .mq-selection,
448
576
  .mq-editable-field .mq-selection,
@@ -450,34 +578,21 @@
450
578
  .mq-editable-field .mq-selection .mq-non-leaf,
451
579
  .mq-math-mode .mq-selection .mq-scaled,
452
580
  .mq-editable-field .mq-selection .mq-scaled {
453
- background: #B4D5FE !important;
454
- background: Highlight !important;
455
- color: HighlightText;
456
- border-color: HighlightText;
457
- }
458
- .mq-math-mode .mq-selection .mq-matrixed,
459
- .mq-editable-field .mq-selection .mq-matrixed {
460
- background: #39F !important;
461
- }
462
- .mq-math-mode .mq-selection .mq-matrixed-container,
463
- .mq-editable-field .mq-selection .mq-matrixed-container {
464
- filter: progid:DXImageTransform.Microsoft.Chroma(color='#3399FF') !important;
581
+ background: #b4d5fe !important;
465
582
  }
466
583
  .mq-math-mode .mq-selection.mq-blur,
467
584
  .mq-editable-field .mq-selection.mq-blur,
468
585
  .mq-math-mode .mq-selection.mq-blur .mq-non-leaf,
469
586
  .mq-editable-field .mq-selection.mq-blur .mq-non-leaf,
470
587
  .mq-math-mode .mq-selection.mq-blur .mq-scaled,
471
- .mq-editable-field .mq-selection.mq-blur .mq-scaled,
472
- .mq-math-mode .mq-selection.mq-blur .mq-matrixed,
473
- .mq-editable-field .mq-selection.mq-blur .mq-matrixed {
474
- background: #D4D4D4 !important;
588
+ .mq-editable-field .mq-selection.mq-blur .mq-scaled {
589
+ background: #d4d4d4 !important;
475
590
  color: black;
476
591
  border-color: black;
477
592
  }
478
- .mq-math-mode .mq-selection.mq-blur .mq-matrixed-container,
479
- .mq-editable-field .mq-selection.mq-blur .mq-matrixed-container {
480
- filter: progid:DXImageTransform.Microsoft.Chroma(color='#D4D4D4') !important;
593
+ html body .mq-math-mode .mq-selection .mq-nthroot-container *,
594
+ html body .mq-editable-field .mq-selection .mq-nthroot-container * {
595
+ background: transparent !important;
481
596
  }
482
597
  .mq-editable-field .mq-textarea,
483
598
  .mq-math-mode .mq-textarea {
@@ -487,9 +602,7 @@
487
602
  user-select: text;
488
603
  }
489
604
  .mq-editable-field .mq-textarea *,
490
- .mq-math-mode .mq-textarea *,
491
- .mq-editable-field .mq-selectable,
492
- .mq-math-mode .mq-selectable {
605
+ .mq-math-mode .mq-textarea * {
493
606
  -webkit-user-select: text;
494
607
  -moz-user-select: text;
495
608
  user-select: text;
@@ -503,14 +616,6 @@
503
616
  resize: none;
504
617
  width: 1px;
505
618
  height: 1px;
506
- }
507
- .mq-math-mode .mq-matrixed {
508
- background: white;
509
- display: -moz-inline-box;
510
- display: inline-block;
511
- }
512
- .mq-math-mode .mq-matrixed-container {
513
- filter: progid:DXImageTransform.Microsoft.Chroma(color='white');
514
- margin-top: -0.1em;
619
+ box-sizing: content-box;
515
620
  }
516
621