@khanacademy/perseus-editor 2.4.1 → 2.5.1

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.
@@ -6,34 +6,34 @@
6
6
  // Should be consistent with webapp's variables.less
7
7
 
8
8
  // Colors
9
- @grayDarker: #333;
10
- @gray: #999;
11
- @grayExtraLight: #eee;
12
- @grayLighter: #ddd;
13
- @white: #fff;
9
+ @grayDarker: #333;
10
+ @gray: #999;
11
+ @grayExtraLight: #eee;
12
+ @grayLighter: #ddd;
13
+ @white: #fff;
14
14
 
15
15
  // Editor Style
16
- @editorBorderWidth: 1px;
17
- @editorBorder: @editorBorderWidth solid @grayLighter;
18
- @editorBorderRadius: 3px;
19
- @editorPadding: 10px;
16
+ @editorBorderWidth: 1px;
17
+ @editorBorder: @editorBorderWidth solid @grayLighter;
18
+ @editorBorderRadius: 3px;
19
+ @editorPadding: 10px;
20
20
 
21
- @widgetBorderWidth: 1px;
22
- @widgetBorderColor: #ccc;
23
- @widgetBorder: @widgetBorderWidth solid @widgetBorderColor;
24
- @widgetBorderRadius: 3px;
21
+ @widgetBorderWidth: 1px;
22
+ @widgetBorderColor: #ccc;
23
+ @widgetBorder: @widgetBorderWidth solid @widgetBorderColor;
24
+ @widgetBorderRadius: 3px;
25
25
 
26
26
  // Dimensions
27
- @leftCellWidth: 360px;
28
- @cellPadding: 30px;
27
+ @leftCellWidth: 360px;
28
+ @cellPadding: 30px;
29
29
 
30
30
  // Colors
31
- @wrongRed: #ffcccc;
32
- @correctGreen: #aaffaa;
33
- @ungradedBlue: #d9edf7;
31
+ @wrongRed: #ffcccc;
32
+ @correctGreen: #aaffaa;
33
+ @ungradedBlue: #d9edf7;
34
34
 
35
35
  .border-box-sizing() {
36
- box-sizing: border-box;
36
+ box-sizing: border-box;
37
37
  }
38
38
 
39
39
  .size(@width: auto, @height: auto) {
@@ -50,8 +50,8 @@
50
50
  }
51
51
 
52
52
  .user-select (@select) {
53
- -webkit-user-select: @select;
54
- user-select: @select;
53
+ -webkit-user-select: @select;
54
+ user-select: @select;
55
55
  }
56
56
 
57
57
  .pod-title {
@@ -209,7 +209,8 @@
209
209
  padding: @editorPadding;
210
210
  transition: all 0s;
211
211
 
212
- &.enter {}
212
+ &.enter {
213
+ }
213
214
  &.leave {
214
215
  display: none;
215
216
  }
@@ -219,7 +220,6 @@
219
220
  .categorizer-container {
220
221
  overflow-x: scroll;
221
222
  }
222
-
223
223
  }
224
224
 
225
225
  .perseus-widget-editor-title-id > svg {
@@ -235,7 +235,7 @@
235
235
  border-radius: 0 0 @editorBorderRadius @editorBorderRadius;
236
236
  display: flex;
237
237
  flex-wrap: wrap;
238
- padding: @editorPadding/2;
238
+ padding: @editorPadding / 2;
239
239
 
240
240
  select {
241
241
  margin: 2px;
@@ -294,7 +294,8 @@
294
294
  }
295
295
 
296
296
  // Space out the question, answer, and hint areas
297
- .perseus-question-container > div, .perseus-answer-container > div {
297
+ .perseus-question-container > div,
298
+ .perseus-answer-container > div {
298
299
  padding-bottom: 25px;
299
300
  }
300
301
 
@@ -341,7 +342,6 @@
341
342
  // Hint Editor
342
343
  //
343
344
 
344
-
345
345
  .perseus-hint-editor {
346
346
  padding-bottom: 20px;
347
347
 
@@ -352,7 +352,8 @@
352
352
  .reorder-hints button {
353
353
  font-size: 16px;
354
354
 
355
- &:hover, &:active {
355
+ &:hover,
356
+ &:active {
356
357
  color: #000;
357
358
  text-decoration: none;
358
359
  }
@@ -404,7 +405,8 @@
404
405
  margin-bottom: 10px;
405
406
  }
406
407
 
407
- .section-control-button, .step-control-button {
408
+ .section-control-button,
409
+ .step-control-button {
408
410
  font-size: 13px;
409
411
  padding: 2px 10px;
410
412
  margin: 0 2px;
@@ -414,8 +416,10 @@
414
416
  min-width: 360px;
415
417
  }
416
418
 
417
- .mobile-preview, .desktop-preview,
418
- .editor-preview, .standalone-preview {
419
+ .mobile-preview,
420
+ .desktop-preview,
421
+ .editor-preview,
422
+ .standalone-preview {
419
423
  box-sizing: border-box;
420
424
  }
421
425
 
@@ -447,7 +451,8 @@
447
451
  }
448
452
 
449
453
  .standalone-preview {
450
- .mobile-preview, .desktop-preview {
454
+ .mobile-preview,
455
+ .desktop-preview {
451
456
  margin-left: auto;
452
457
  margin-right: auto;
453
458
  }
@@ -469,7 +474,7 @@
469
474
  text-align: center;
470
475
  }
471
476
 
472
- .bibliotron-article.framework-perseus.perseus-article {
477
+ .framework-perseus.perseus-article {
473
478
  // Match Bibliotron's .box-sizing-border-box-reset, so that the Perseus
474
479
  // editor and webapp behave even more similarly.
475
480
  box-sizing: border-box;
@@ -484,7 +489,6 @@
484
489
  }
485
490
  }
486
491
 
487
-
488
492
  //
489
493
  // Expression editor
490
494
  //
@@ -520,12 +524,11 @@
520
524
  }
521
525
  }
522
526
 
523
-
524
527
  //
525
528
  // Dropdown editor
526
529
  //
527
530
  .perseus-widget-dropdown {
528
- input[type=text] {
531
+ input[type="text"] {
529
532
  border: 1px solid #ccc;
530
533
  border-radius: 5px;
531
534
  padding: 5px;
@@ -567,7 +570,8 @@
567
570
  .perseus-input-number-editor {
568
571
  font-size: 14px;
569
572
 
570
- .ui-title, .msg-title {
573
+ .ui-title,
574
+ .msg-title {
571
575
  display: inline-block;
572
576
  text-align: center;
573
577
  }
@@ -660,12 +664,12 @@
660
664
  }
661
665
 
662
666
  .answer-trash {
663
- background-color: #C04F03;
664
- background-image: linear-gradient(to bottom, #E35D04, #C04F03);
665
- color: #FFF;
667
+ background-color: #c04f03;
668
+ background-image: linear-gradient(to bottom, #e35d04, #c04f03);
669
+ color: #fff;
666
670
  &:hover {
667
- color: #FFF;
668
- background-image: linear-gradient(to bottom, #F46E15, #D16014);
671
+ color: #fff;
672
+ background-image: linear-gradient(to bottom, #f46e15, #d16014);
669
673
  }
670
674
  }
671
675
 
@@ -697,7 +701,7 @@
697
701
  background-color: @correctGreen;
698
702
  }
699
703
  &.enforced {
700
- background-color: @wrongRed;
704
+ background-color: @wrongRed;
701
705
  }
702
706
  }
703
707
 
@@ -725,8 +729,8 @@
725
729
  .input-answer-editor-message {
726
730
  margin-left: 5px;
727
731
 
728
- .perseus-single-editor{
729
- font-family: 'Lucida Grande';
732
+ .perseus-single-editor {
733
+ font-family: "Lucida Grande";
730
734
  width: 230px;
731
735
 
732
736
  .perseus-textarea-pair > textarea,
@@ -796,7 +800,9 @@
796
800
  vertical-align: top;
797
801
  width: 280px;
798
802
 
799
- p {margin: 0;}
803
+ p {
804
+ margin: 0;
805
+ }
800
806
  }
801
807
 
802
808
  .perseus-textarea-pair,
@@ -806,7 +812,8 @@
806
812
  }
807
813
 
808
814
  .perseus-widget-radio .perseus-textarea-pair {
809
- & > textarea, > .perseus-textarea-underlay {
815
+ & > textarea,
816
+ > .perseus-textarea-underlay {
810
817
  padding: 5px;
811
818
  }
812
819
  }
@@ -821,16 +828,16 @@
821
828
  .perseus-widget-radio {
822
829
  position: static;
823
830
 
824
- .checkbox, .delete-choice {
831
+ .checkbox,
832
+ .delete-choice {
825
833
  position: relative;
826
834
  top: -10px;
827
835
  }
828
836
  }
829
837
 
830
838
  .perseus-radio-option.none-of-above {
831
-
832
839
  &:before {
833
- content: 'None of the above';
840
+ content: "None of the above";
834
841
  display: block;
835
842
  font-style: italic;
836
843
  font-weight: bold;
@@ -879,7 +886,6 @@
879
886
  width: 81%;
880
887
  }
881
888
 
882
-
883
889
  .category {
884
890
  float: left;
885
891
  padding: 5px;
@@ -973,7 +979,8 @@
973
979
  //
974
980
 
975
981
  .perseus-widget-plotter-editor {
976
- .plotter-categories, .pic-url {
982
+ .plotter-categories,
983
+ .pic-url {
977
984
  width: 70%;
978
985
  }
979
986
  }
@@ -982,14 +989,14 @@
982
989
  // Text List Editors (Orderer, Matcher, Sorter)
983
990
  //
984
991
  .perseus-text-list-editor {
985
- input[type=text] {
992
+ input[type="text"] {
986
993
  padding: 3px;
987
994
  margin-right: 5px;
988
995
  min-width: 20px;
989
996
  max-width: 340px;
990
997
  }
991
998
 
992
- &.layout-horizontal input[type=text] {
999
+ &.layout-horizontal input[type="text"] {
993
1000
  float: left;
994
1001
  }
995
1002
  }
@@ -999,16 +1006,16 @@
999
1006
  float: left;
1000
1007
  max-width: 50%;
1001
1008
 
1002
- input[type=text] {
1009
+ input[type="text"] {
1003
1010
  max-width: 90%;
1004
1011
  }
1005
1012
  }
1006
1013
 
1007
- input[type=text] {
1014
+ input[type="text"] {
1008
1015
  width: 46%;
1009
1016
  }
1010
1017
 
1011
- input[type=text] + input[type=text] {
1018
+ input[type="text"] + input[type="text"] {
1012
1019
  margin-left: 2%;
1013
1020
  }
1014
1021
  }
@@ -1034,7 +1041,8 @@
1034
1041
 
1035
1042
  .answer-handle {
1036
1043
  // textured draggy handle
1037
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) no-repeat 50% 50%;
1044
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==)
1045
+ no-repeat 50% 50%;
1038
1046
  border-right: 1px solid #ddd;
1039
1047
  cursor: move;
1040
1048
  display: table-cell;
@@ -1070,7 +1078,7 @@
1070
1078
  }
1071
1079
  }
1072
1080
 
1073
- .perseus-math-input{
1081
+ .perseus-math-input {
1074
1082
  width: 236px;
1075
1083
 
1076
1084
  .mq-root-block {
@@ -1147,7 +1155,8 @@
1147
1155
  }
1148
1156
  }
1149
1157
 
1150
- &.enter {}
1158
+ &.enter {
1159
+ }
1151
1160
  &.leave {
1152
1161
  display: none;
1153
1162
  }
@@ -1198,11 +1207,11 @@
1198
1207
  }
1199
1208
 
1200
1209
  .marvel-device.iphone6.silver:after {
1201
- z-index: 1;
1210
+ z-index: 1;
1202
1211
  }
1203
1212
 
1204
1213
  .perseus-diff {
1205
- @borderColor: #E4E4E4;
1214
+ @borderColor: #e4e4e4;
1206
1215
  margin: 0 10px;
1207
1216
 
1208
1217
  .diff-header {
@@ -1270,18 +1279,17 @@
1270
1279
  visibility: hidden;
1271
1280
  }
1272
1281
 
1273
-
1274
1282
  .added {
1275
- background-color: #EEFFEE;
1283
+ background-color: #eeffee;
1276
1284
  &.dark {
1277
- background-color: #AAFFAA;
1285
+ background-color: #aaffaa;
1278
1286
  }
1279
1287
  }
1280
1288
 
1281
1289
  .removed {
1282
- background-color: #FFEEEE;
1290
+ background-color: #ffeeee;
1283
1291
  &.dark {
1284
- background-color: #FFAAAA;
1292
+ background-color: #ffaaaa;
1285
1293
  }
1286
1294
  }
1287
1295
 
@@ -1290,22 +1298,24 @@
1290
1298
  margin-left: 20px;
1291
1299
  margin-bottom: 10px;
1292
1300
 
1293
- &, > div, > img {
1301
+ &,
1302
+ > div,
1303
+ > img {
1294
1304
  max-height: 300px;
1295
1305
  max-width: 100%;
1296
1306
  }
1297
1307
  }
1298
1308
 
1299
1309
  .image-unchanged {
1300
- border: 1px solid #AAAAAA;
1310
+ border: 1px solid #aaaaaa;
1301
1311
  }
1302
1312
 
1303
1313
  .image-added {
1304
- border: 2px solid #AAFFAA;
1314
+ border: 2px solid #aaffaa;
1305
1315
  }
1306
1316
 
1307
1317
  .image-removed {
1308
- border: 2px solid #FFAAAA;
1318
+ border: 2px solid #ffaaaa;
1309
1319
  }
1310
1320
 
1311
1321
  .diff-separator {