-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathSVG.nb
5561 lines (5247 loc) · 215 KB
/
SVG.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Notebook[{
Cell[CellGroupData[{
Cell["SVG Exporter", \
"CodeSection",ExpressionUUID->"3bb1128e-9a5e-489f-8a55-bcc024fcf01b"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"BeginPackage", "[", "\"\<SVG`\>\"", "]"}], ";"}]], "InputSection",
CellLabel->"In[61]:=",ExpressionUUID->"5f4a54db-ee82-4950-a14a-bd2cf86f546a"],
Cell["\<\
\[LeftCeiling]
\tSimple SVG primitive support
\[RightFloor]\
\>", "Text",
Evaluatable->True,
CellLabel->"In[62]:=",ExpressionUUID->"b9e366b5-f37b-4133-abde-fa94f5e3c89a"],
Cell[BoxData[
RowBox[{
RowBox[{"ToSVG", "::", "usage"}], "=", "\n", "\t",
"\"\<Export to an SVG XMLObject\>\""}]], \
"CodeInput",ExpressionUUID->"00373aa6-993e-4987-85cc-1e406c567f73"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"BeginPackage", "[", "\"\<SVG`Package`\>\"", "]"}],
";"}]], "InputSection",ExpressionUUID->"8919a578-50d4-47de-9e42-\
ce2f3b7a1544"],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"toXML", "::", "usage"}], "=", "\n", "\t",
"\"\<Turns svgElement structures into XML\>\""}],
";"}]], "CodeInput",ExpressionUUID->"7498b6da-f625-4cff-bdfb-2c56f36c836b"],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"toEl", "::", "usage"}], "=", "\n", "\t",
"\"\<Turns aliases and standard SVG into svgElement data\>\""}],
";"}]], "CodeInput",ExpressionUUID->"fe536d3c-44cc-4cd5-a90d-34fac26a5b95"],
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"register", "::", "usage"}], "=", "\n", "\t",
"\"\<Registers a new transformable SVG element\>\""}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"alias", "::", "usage"}], "=", "\n", "\t",
"\"\<Registers a new alias for toplevel elements in terms of SVG \
elements\>\""}],
";"}]}], "CodeInput",ExpressionUUID->"ecb1d7d5-d86f-4203-8b5f-706bc19eec44"],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"CSSGenerate", "::", "usage"}], "=", "\n", "\t",
"\"\<Copped from BTools. Just there to support style elements\>\""}],
";"}]], "CodeInput",ExpressionUUID->"c52ff99a-cf74-4240-bdde-a32fbb30da31"],
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"prepareSVGGraphics", "::", "usage"}], "=", "\"\<\>\""}],
";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"getViewBox", "::", "usage"}], "=", "\"\<\>\""}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"getPlotRange", "::", "usage"}], "=", "\"\<\>\""}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"getImSize", "::", "usage"}], "=", "\"\<\>\""}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"getAspRat", "::", "usage"}], "=", "\"\<\>\""}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"getPlotRangePad", "::", "usage"}], "=", "\"\<\>\""}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"axesAndFrame", "::", "usage"}], "=", "\"\<\>\""}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"toSVGCore", "::", "usage"}], "=", "\"\<\>\""}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"exportGraphics", "::", "usage"}], "=", "\"\<\>\""}],
";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"canonicalizeDirectives", "::", "usage"}], "=", "\"\<\>\""}],
";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"splitGraphicsList", "::", "usage"}], "=", "\"\<\>\""}],
";"}]}], "CodeInput",ExpressionUUID->"67c83411-aa1e-491d-bb40-03be3ecb7c48"]\
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{"EndPackage", "[", "]"}],
";"}]], "InputSection",ExpressionUUID->"7ea50f08-13f5-4d70-8cca-\
a7dc98e13e01"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"Begin", "[", "\"\<`Private`\>\"", "]"}], ";"}]], "InputSection",
CellLabel->"In[63]:=",ExpressionUUID->"dfab3ef6-67c6-4736-bd6c-189c211902ff"],
Cell[CellGroupData[{
Cell["\[LeftCeiling]CSSGenerate\[RightFloor]", "CodeSubsubsection",
Evaluatable->True,
CellChangeTimes->{{3.733027747343328*^9,
3.7330277487754803`*^9}},ExpressionUUID->"24f5c81e-8949-4fc0-b514-\
fdae8d404cb4"],
Cell["\<\
\[LeftCeiling]
\tUsed for styling things
\[RightFloor]\
\>", "Text",
Evaluatable->True,ExpressionUUID->"579b147a-6fb8-4c7f-899f-9afb4edc56d8"],
Cell[CellGroupData[{
Cell["\[LeftCeiling]AllowedProperties\[RightFloor]", "CodeSubsubsubsection",
Evaluatable->True,
CellChangeTimes->{{3.7330291688658257`*^9, 3.7330291903133183`*^9}, {
3.733029264250448*^9,
3.733029267751775*^9}},ExpressionUUID->"2c1a1944-2641-45f5-824d-\
b1bd996e1609"],
Cell[BoxData[
RowBox[{
RowBox[{"$CSSDefaultAllowedProperties", "=", "\n", "\t",
RowBox[{"Alternatives", "@@", "\n", "\t\t",
RowBox[{"{", "\n", "\t\t\t",
RowBox[{
"\"\<align-content\>\"", ",", "\"\<align-items\>\"", ",",
"\"\<align-self\>\"", ",", "\n", "\t", "\t", "\t", "\"\<all\>\"", ",",
"\"\<animation\>\"", ",", "\"\<animation-delay\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<animation-direction\>\"", ",",
"\"\<animation-duration\>\"", ",", "\"\<animation-fill-mode\>\"", ",",
"\n", "\t", "\t", "\t", "\"\<animation-iteration-count\>\"", ",",
"\"\<animation-name\>\"", ",", "\"\<animation-play-state\>\"", ",",
"\n", "\t", "\t", "\t", "\"\<animation-timing-function\>\"", ",",
"\"\<backface-visibility\>\"", ",", "\"\<background\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<background-attachment\>\"", ",",
"\"\<background-blend-mode\>\"", ",", "\"\<background-clip\>\"", ",",
"\n", "\t", "\t", "\t", "\"\<background-color\>\"", ",",
"\"\<background-image\>\"", ",", "\"\<background-origin\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<background-position\>\"", ",",
"\"\<background-repeat\>\"", ",", "\"\<background-size\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<border\>\"", ",", "\"\<border-bottom\>\"", ",",
"\"\<border-bottom-color\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-bottom-left-radius\>\"", ",",
"\"\<border-bottom-right-radius\>\"", ",",
"\"\<border-bottom-style\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-bottom-width\>\"", ",", "\"\<border-collapse\>\"", ",",
"\"\<border-color\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-image\>\"", ",", "\"\<border-image-outset\>\"", ",",
"\"\<border-image-repeat\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-image-slice\>\"", ",", "\"\<border-image-source\>\"", ",",
"\"\<border-image-width\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-left\>\"", ",", "\"\<border-left-color\>\"", ",",
"\"\<border-left-style\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-left-width\>\"", ",", "\"\<border-radius\>\"", ",",
"\"\<border-right\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-right-color\>\"", ",", "\"\<border-right-style\>\"", ",",
"\"\<border-right-width\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-spacing\>\"", ",", "\"\<border-style\>\"", ",",
"\"\<border-top\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-top-color\>\"", ",", "\"\<border-top-left-radius\>\"", ",",
"\"\<border-top-right-radius\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-top-style\>\"", ",", "\"\<border-top-width\>\"", ",",
"\"\<border-width\>\"", ",", "\n", "\t", "\t", "\t", "\"\<bottom\>\"",
",", "\"\<box-shadow\>\"", ",", "\"\<box-sizing\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<caption-side\>\"", ",", "\"\<clear\>\"", ",",
"\"\<clip\>\"", ",", "\n", "\t", "\t", "\t", "\"\<color\>\"", ",",
"\"\<column-count\>\"", ",", "\"\<column-fill\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<column-gap\>\"", ",", "\"\<column-rule\>\"", ",",
"\"\<column-rule-color\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<column-rule-style\>\"", ",", "\"\<column-rule-width\>\"", ",",
"\"\<column-span\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<column-width\>\"", ",", "\"\<columns\>\"", ",", "\"\<content\>\"",
",", "\n", "\t", "\t", "\t", "\"\<counter-increment\>\"", ",",
"\"\<counter-reset\>\"", ",", "\"\<cursor\>\"", ",", "\n", "\t", "\t",
"\t", "\"\<direction\>\"", ",", "\"\<display\>\"", ",",
"\"\<empty-cells\>\"", ",", "\n", "\t", "\t", "\t", "\"\<filter\>\"",
",", "\"\<flex\>\"", ",", "\"\<flex-basis\>\"", ",", "\n", "\t", "\t",
"\t", "\"\<flex-direction\>\"", ",", "\"\<flex-flow\>\"", ",",
"\"\<flex-grow\>\"", ",", "\n", "\t", "\t", "\t", "\"\<flex-shrink\>\"",
",", "\"\<flex-wrap\>\"", ",", "\"\<float\>\"", ",", "\n", "\t", "\t",
"\t", "\"\<font\>\"", ",", "\"\<@font-face\>\"", ",",
"\"\<font-family\>\"", ",", "\n", "\t", "\t", "\t", "\"\<font-size\>\"",
",", "\"\<font-size-adjust\>\"", ",", "\"\<font-stretch\>\"", ",",
"\n", "\t", "\t", "\t", "\"\<font-style\>\"", ",",
"\"\<font-variant\>\"", ",", "\"\<font-weight\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<hanging-punctuation\>\"", ",", "\"\<height\>\"", ",",
"\"\<justify-content\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<@keyframes\>\"", ",", "\"\<left\>\"", ",",
"\"\<letter-spacing\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<line-height\>\"", ",", "\"\<list-style\>\"", ",",
"\"\<list-style-image\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<list-style-position\>\"", ",", "\"\<list-style-type\>\"", ",",
"\"\<margin\>\"", ",", "\n", "\t", "\t", "\t", "\"\<margin-bottom\>\"",
",", "\"\<margin-left\>\"", ",", "\"\<margin-right\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<margin-top\>\"", ",", "\"\<max-height\>\"", ",",
"\"\<max-width\>\"", ",", "\n", "\t", "\t", "\t", "\"\<@media\>\"",
",", "\"\<min-height\>\"", ",", "\"\<min-width\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<nav-down\>\"", ",", "\"\<nav-index\>\"", ",",
"\"\<nav-left\>\"", ",", "\n", "\t", "\t", "\t", "\"\<nav-right\>\"",
",", "\"\<nav-up\>\"", ",", "\"\<opacity\>\"", ",", "\n", "\t", "\t",
"\t", "\"\<order\>\"", ",", "\"\<outline\>\"", ",",
"\"\<outline-color\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<outline-offset\>\"", ",", "\"\<outline-style\>\"", ",",
"\"\<outline-width\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<overflow\>\"", ",", "\"\<overflow-x\>\"", ",",
"\"\<overflow-y\>\"", ",", "\n", "\t", "\t", "\t", "\"\<padding\>\"",
",", "\"\<padding-bottom\>\"", ",", "\"\<padding-left\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<padding-right\>\"", ",", "\"\<padding-top\>\"",
",", "\"\<page-break-after\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<page-break-before\>\"", ",", "\"\<page-break-inside\>\"", ",",
"\"\<perspective\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<perspective-origin\>\"", ",", "\"\<position\>\"", ",",
"\"\<quotes\>\"", ",", "\n", "\t", "\t", "\t", "\"\<resize\>\"", ",",
"\"\<right\>\"", ",", "\"\<tab-size\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<table-layout\>\"", ",", "\"\<text-align\>\"", ",",
"\"\<text-align-last\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<text-decoration\>\"", ",", "\"\<text-decoration-color\>\"", ",",
"\"\<text-decoration-line\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<text-decoration-style\>\"", ",", "\"\<text-indent\>\"", ",",
"\"\<text-justify\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<text-overflow\>\"", ",", "\"\<text-shadow\>\"", ",",
"\"\<text-transform\>\"", ",", "\n", "\t", "\t", "\t", "\"\<top\>\"",
",", "\"\<transform\>\"", ",", "\"\<transform-origin\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<transform-style\>\"", ",", "\"\<transition\>\"",
",", "\"\<transition-delay\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<transition-duration\>\"", ",", "\"\<transition-property\>\"", ",",
"\"\<transition-timing-function\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<unicode-bidi\>\"", ",", "\"\<user-select\>\"", ",",
"\"\<vertical-align\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<visibility\>\"", ",", "\"\<white-space\>\"", ",", "\"\<width\>\"",
",", "\n", "\t", "\t", "\t", "\"\<word-break\>\"", ",",
"\"\<word-spacing\>\"", ",", "\"\<word-wrap\>\"", ",", "\n", "\t", "\t",
"\t", "\"\<z-index\>\"", ",", "\"\<color\>\"", ",", "\"\<opacity\>\"",
",", "\n", "\t", "\t", "\t", "\"\<background\>\"", ",",
"\"\<background-attachment\>\"", ",", "\"\<background-blend-mode\>\"",
",", "\n", "\t", "\t", "\t", "\"\<background-color\>\"", ",",
"\"\<background-image\>\"", ",", "\"\<background-position\>\"", ",",
"\n", "\t", "\t", "\t", "\"\<background-repeat\>\"", ",",
"\"\<background-clip\>\"", ",", "\"\<background-origin\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<background-size\>\"", ",", "\"\<border\>\"",
",", "\"\<border-bottom\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-bottom-color\>\"", ",", "\"\<border-bottom-left-radius\>\"",
",", "\"\<border-bottom-right-radius\>\"", ",", "\n", "\t", "\t",
"\t", "\"\<border-bottom-style\>\"", ",", "\"\<border-bottom-width\>\"",
",", "\"\<border-color\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-image\>\"", ",", "\"\<border-image-outset\>\"", ",",
"\"\<border-image-repeat\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-image-slice\>\"", ",", "\"\<border-image-source\>\"", ",",
"\"\<border-image-width\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-left\>\"", ",", "\"\<border-left-color\>\"", ",",
"\"\<border-left-style\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-left-width\>\"", ",", "\"\<border-radius\>\"", ",",
"\"\<border-right\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-right-color\>\"", ",", "\"\<border-right-style\>\"", ",",
"\"\<border-right-width\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-style\>\"", ",", "\"\<border-top\>\"", ",",
"\"\<border-top-color\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-top-left-radius\>\"", ",",
"\"\<border-top-right-radius\>\"", ",", "\"\<border-top-style\>\"", ",",
"\n", "\t", "\t", "\t", "\"\<border-top-width\>\"", ",",
"\"\<border-width\>\"", ",", "\"\<box-shadow\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<bottom\>\"", ",", "\"\<clear\>\"", ",", "\"\<clip\>\"",
",", "\n", "\t", "\t", "\t", "\"\<display\>\"", ",", "\"\<float\>\"",
",", "\"\<height\>\"", ",", "\n", "\t", "\t", "\t", "\"\<left\>\"",
",", "\"\<margin\>\"", ",", "\"\<margin-bottom\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<margin-left\>\"", ",", "\"\<margin-right\>\"", ",",
"\"\<margin-top\>\"", ",", "\n", "\t", "\t", "\t", "\"\<max-height\>\"",
",", "\"\<max-width\>\"", ",", "\"\<min-height\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<min-width\>\"", ",", "\"\<overflow\>\"", ",",
"\"\<overflow-x\>\"", ",", "\n", "\t", "\t", "\t", "\"\<overflow-y\>\"",
",", "\"\<padding\>\"", ",", "\"\<padding-bottom\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<padding-left\>\"", ",", "\"\<padding-right\>\"", ",",
"\"\<padding-top\>\"", ",", "\n", "\t", "\t", "\t", "\"\<position\>\"",
",", "\"\<right\>\"", ",", "\"\<top\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<visibility\>\"", ",", "\"\<width\>\"", ",",
"\"\<vertical-align\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<z-index\>\"", ",", "\"\<align-content\>\"", ",",
"\"\<align-items\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<align-self\>\"", ",", "\"\<flex\>\"", ",", "\"\<flex-basis\>\"",
",", "\n", "\t", "\t", "\t", "\"\<flex-direction\>\"", ",",
"\"\<flex-flow\>\"", ",", "\"\<flex-grow\>\"", ",", "\n", "\t", "\t",
"\t", "\"\<flex-shrink\>\"", ",", "\"\<flex-wrap\>\"", ",",
"\"\<justify-content\>\"", ",", "\n", "\t", "\t", "\t", "\"\<order\>\"",
",", "\"\<hanging-punctuation\>\"", ",", "\"\<letter-spacing\>\"", ",",
"\n", "\t", "\t", "\t", "\"\<line-height\>\"", ",", "\"\<tab-size\>\"",
",", "\"\<text-align\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<text-align-last\>\"", ",", "\"\<text-indent\>\"", ",",
"\"\<text-justify\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<text-transform\>\"", ",", "\"\<white-space\>\"", ",",
"\"\<word-break\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<word-spacing\>\"", ",", "\"\<word-wrap\>\"", ",",
"\"\<text-decoration\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<text-decoration-color\>\"", ",", "\"\<text-decoration-line\>\"",
",", "\"\<text-decoration-style\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<text-shadow\>\"", ",", "\"\<@font-face\>\"", ",", "\"\<font\>\"",
",", "\n", "\t", "\t", "\t", "\"\<font-family\>\"", ",",
"\"\<font-size\>\"", ",", "\"\<font-size-adjust\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<font-stretch\>\"", ",", "\"\<font-style\>\"", ",",
"\"\<font-variant\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<font-weight\>\"", ",", "\"\<direction\>\"", ",",
"\"\<unicode-bidi\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<direction\>\"", ",", "\"\<user-select\>\"", ",",
"\"\<border-collapse\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<border-spacing\>\"", ",", "\"\<caption-side\>\"", ",",
"\"\<empty-cells\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<table-layout\>\"", ",", "\"\<counter-increment\>\"", ",",
"\"\<counter-reset\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<list-style\>\"", ",", "\"\<list-style-image\>\"", ",",
"\"\<list-style-position\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<list-style-type\>\"", ",", "\"\<@keyframes\>\"", ",",
"\"\<animation\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<animation-delay\>\"", ",", "\"\<animation-direction\>\"", ",",
"\"\<animation-duration\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<animation-fill-mode\>\"", ",", "\"\<animation-iteration-count\>\"",
",", "\"\<animation-name\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<animation-play-state\>\"", ",",
"\"\<animation-timing-function\>\"", ",", "\"\<backface-visibility\>\"",
",", "\n", "\t", "\t", "\t", "\"\<perspective\>\"", ",",
"\"\<perspective-origin\>\"", ",", "\"\<transform\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<transform-origin\>\"", ",", "\"\<transform-style\>\"",
",", "\"\<transition\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<transition-property\>\"", ",", "\"\<transition-duration\>\"", ",",
"\"\<transition-timing-function\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<transition-delay\>\"", ",", "\"\<box-sizing\>\"", ",",
"\"\<content\>\"", ",", "\n", "\t", "\t", "\t", "\"\<cursor\>\"", ",",
"\"\<nav-down\>\"", ",", "\"\<nav-index\>\"", ",", "\n", "\t", "\t",
"\t", "\"\<nav-left\>\"", ",", "\"\<nav-right\>\"", ",",
"\"\<nav-up\>\"", ",", "\n", "\t", "\t", "\t", "\"\<outline\>\"", ",",
"\"\<outline-color\>\"", ",", "\"\<outline-offset\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<outline-style\>\"", ",", "\"\<outline-width\>\"",
",", "\"\<resize\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<text-overflow\>\"", ",", "\"\<column-count\>\"", ",",
"\"\<column-fill\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<column-gap\>\"", ",", "\"\<column-rule\>\"", ",",
"\"\<column-rule-color\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<column-rule-style\>\"", ",", "\"\<column-rule-width\>\"", ",",
"\"\<column-span\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<column-width\>\"", ",", "\"\<columns\>\"", ",",
"\"\<page-break-after\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<page-break-before\>\"", ",", "\"\<page-break-inside\>\"", ",",
"\"\<quotes\>\"", ",", "\n", "\t", "\t", "\t", "\"\<filter\>\""}], "\n",
"\t", "\t\t", "}"}]}]}], ";"}]], "CodeInput",
CellChangeTimes->{{3.733029174726426*^9, 3.733029182953493*^9}, {
3.7330292686833887`*^9,
3.733029277278213*^9}},ExpressionUUID->"7b919bdc-76c1-4e32-bb3e-\
809205d70a99"]
}, Closed]],
Cell[CellGroupData[{
Cell["\[LeftCeiling]AllowedTypes\[RightFloor]", "CodeSubsubsubsection",
Evaluatable->True,
CellChangeTimes->{{3.7330291688658257`*^9, 3.7330291903133183`*^9}, {
3.733029264250448*^9, 3.733029267751775*^9}, {3.733029897601782*^9,
3.7330298984526377`*^9}, {3.733030034901659*^9,
3.733030035453197*^9}},ExpressionUUID->"7d47557d-b030-4702-8bca-\
8ef551395a24"],
Cell[BoxData[
RowBox[{
RowBox[{"$CSSDefaultAllowedTypes", "=", "\n", "\t",
RowBox[{"Alternatives", "@@", "\n", "\t\t",
RowBox[{"{", "\n", "\t\t\t",
RowBox[{
"\"\<a\>\"", ",", "\"\<abbr\>\"", ",", "\"\<acronym\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<address\>\"", ",", "\"\<applet\>\"", ",",
"\"\<area\>\"", ",", "\n", "\t", "\t", "\t", "\"\<article\>\"", ",",
"\"\<aside\>\"", ",", "\"\<audio\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<b\>\"", ",", "\"\<base\>\"", ",", "\"\<basefont\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<bdi\>\"", ",", "\"\<bdo\>\"", ",", "\"\<big\>\"",
",", "\n", "\t", "\t", "\t", "\"\<blockquote\>\"", ",", "\"\<body\>\"",
",", "\n", "\t\t\t", "\"\<br\>\"", ",", "\"\<button\>\"", ",",
"\"\<buildto\>\"", ",", "\n", "\t", "\t", "\t", "\"\<canvas\>\"", ",",
"\"\<caption\>\"", ",", "\"\<center\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<cite\>\"", ",", "\"\<code\>\"", ",", "\"\<col\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<colgroup\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<data\>\"", ",", "\"\<datalist\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<dd\>\"", ",", "\"\<del\>\"", ",", "\"\<details\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<dfn\>\"", ",", "\"\<dialog\>\"", ",",
"\"\<dir\>\"", ",", "\n", "\t", "\t", "\t", "\"\<div\>\"", ",",
"\"\<dl\>\"", ",", "\"\<dt\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<em\>\"", ",", "\"\<embed\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<fieldset\>\"", ",", "\"\<figcaption\>\"", ",", "\"\<figure\>\"",
",", "\n", "\t", "\t", "\t", "\"\<font\>\"", ",", "\"\<footer\>\"",
",", "\"\<form\>\"", ",", "\n", "\t", "\t", "\t", "\"\<frame\>\"", ",",
"\"\<frameset\>\"", ",", "\n", "\t", "\t", "\t", "\"\<header\>\"", ",",
"\"\<hr\>\"", ",", "\n", "\t", "\t\t", "\"\<h1\>\"", ",", "\"\<h2\>\"",
",", "\"\<h3\>\"", ",", "\n", "\t", "\t\t", "\"\<h4\>\"", ",",
"\"\<h5\>\"", ",", "\"\<h6\>\"", ",", "\n", "\t", "\t\t", "\"\<i\>\"",
",", "\"\<iframe\>\"", ",", "\"\<img\>\"", ",", "\n", "\t", "\t\t",
"\"\<inputcell\>\"", ",", "\n", "\t", "\t\t", "\"\<input\>\"", ",",
"\"\<ins\>\"", ",", "\n", "\t", "\t", "\t", "\"\<kbd\>\"", ",",
"\"\<keygen\>\"", ",", "\n", "\t", "\t", "\t", "\"\<label\>\"", ",",
"\"\<legend\>\"", ",", "\"\<li\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<link\>\"", ",", "\n", "\t", "\t", "\t", "\"\<main\>\"", ",",
"\"\<map\>\"", ",", "\"\<mark\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<menu\>\"", ",", "\"\<menuitem\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<meta\>\"", ",", "\"\<meter\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<nav\>\"", ",", "\"\<noframes\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<noscript\>\"", ",", "\n", "\t", "\t", "\t", "\"\<object\>\"", ",",
"\"\<ol\>\"", ",", "\n", "\t", "\t", "\t", "\"\<optgroup\>\"", ",",
"\"\<option\>\"", ",", "\n", "\t", "\t", "\t", "\"\<output\>\"", ",",
"\n", "\t", "\t", "\t", "\"\<p\>\"", ",", "\"\<param\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<picture\>\"", ",", "\"\<pre\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<progress\>\"", ",", "\n", "\t", "\t\t",
"\"\<q\>\"", ",", "\n", "\t", "\t", "\t", "\"\<rp\>\"", ",",
"\"\<rt\>\"", ",", "\"\<ruby\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<s\>\"", ",", "\"\<samp\>\"", ",", "\"\<script\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<section\>\"", ",", "\"\<select\>\"", ",",
"\"\<small\>\"", ",", "\n", "\t", "\t", "\t", "\"\<source\>\"", ",",
"\"\<span\>\"", ",", "\"\<strike\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<strong\>\"", ",", "\"\<style\>\"", ",", "\"\<sub\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<summary\>\"", ",", "\"\<sup\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<table\>\"", ",", "\"\<tbody\>\"", ",",
"\"\<td\>\"", ",", "\n", "\t", "\t", "\t", "\"\<textarea\>\"", ",",
"\"\<tfoot\>\"", ",", "\"\<th\>\"", ",", "\n", "\t", "\t", "\t",
"\"\<thead\>\"", ",", "\"\<time\>\"", ",", "\"\<title\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<tr\>\"", ",", "\"\<track\>\"", ",", "\"\<tt\>\"",
",", "\n", "\t", "\t", "\t", "\"\<u\>\"", ",", "\"\<ul\>\"", ",", "\n",
"\t", "\t", "\t", "\"\<var\>\"", ",", "\"\<video\>\"", ",", "\n", "\t",
"\t", "\t", "\"\<wbr\>\""}], "\n", "\t", "\t\t", "}"}]}]}],
";"}]], "CodeInput",
CellChangeTimes->{{3.7330299001025763`*^9, 3.733029914719771*^9}, {
3.733029971203589*^9, 3.733029989665352*^9}, {3.733030031946465*^9,
3.733030032472371*^9}, {3.733033385995122*^9,
3.733033392511209*^9}},ExpressionUUID->"1f625943-69f3-4190-926a-\
2f96022f2951"]
}, Closed]],
Cell[CellGroupData[{
Cell["\[LeftCeiling]$CSSPropertyRules\[RightFloor]", "CodeSubsubsubsection",
Evaluatable->True,
CellChangeTimes->{3.73302765996661*^9,
3.733027905355218*^9},ExpressionUUID->"50a47a30-9a31-4770-badd-\
98cef2b998c5"],
Cell[BoxData[
RowBox[{
RowBox[{"$CSSDefaultPropertyRules", "=", "\n", "\t",
RowBox[{"{", "\n", "\t\t",
RowBox[{
RowBox[{"FontColor", "\[Rule]", "\"\<color\>\""}], ",", "\n", "\t\t",
RowBox[{"FrameStyle", "\[Rule]", "\"\<border\>\""}], ",", "\n", "\t\t",
RowBox[{"FrameMargins", "\[Rule]", "\"\<margin\>\""}], ",", "\n", "\t\t",
RowBox[{"TextAlignment", "\[Rule]", "\"\<text-align\>\""}], ",", "\n",
"\t\t",
RowBox[{"TabSpacings", "\[Rule]", "\"\<tab-size\>\""}], ",", "\n",
"\t\t",
RowBox[{"SourceLink", "\[Rule]", "\"\<src\>\""}], ",", "\n", "\t\t",
RowBox[{"ButtonFunction", "->", "\n", "\t\t\t", "\"\<onclick\>\""}], ",",
"\n", "\t\t",
RowBox[{"Annotation", "\[Rule]", "\"\<alt\>\""}], ",", "\n", "\t\t",
RowBox[{"Hyperlink", "\[Rule]", "\"\<href\>\""}], ",", "\n", "\t\t",
RowBox[{"RoundingRadius", "\[Rule]", "\"\<border-radius\>\""}], ",",
"\n", "\t\t",
RowBox[{"LineSpacing", "\[Rule]", "\"\<line-height\>\""}], ",", "\n",
"\t\t",
RowBox[{"ImageSize", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<width\>\"", ",", "\"\<height\>\""}], "}"}]}], ",", "\n",
"\t\t",
RowBox[{"CellSize", "\[Rule]",
RowBox[{"{",
RowBox[{"\"\<width\>\"", ",", " ", "\"\<height\>\""}], "}"}]}], ",",
"\n", "\t\t",
RowBox[{"e_", "\[RuleDelayed]", "\n", "\t\t\t",
RowBox[{"(", "\n", "\t\t\t\t",
RowBox[{"ToLowerCase", "[", "\n", "\t\t\t\t\t",
RowBox[{
RowBox[{
RowBox[{"StringJoin", "@",
RowBox[{"{", "\n", "\t", "\t\t\t\t\t",
RowBox[{
RowBox[{"StringTake", "[",
RowBox[{"#", ",", "1"}], "]"}], ",", "\n", "\t", "\t",
"\t\t\t\t",
RowBox[{"StringReplace", "[",
RowBox[{
RowBox[{"StringDrop", "[",
RowBox[{"#", ",", "1"}], "]"}], ",", "\n", "\t", "\t", "\t",
"\t\t\t\t",
RowBox[{
RowBox[{"l", ":",
RowBox[{"LetterCharacter", "?",
RowBox[{"(",
RowBox[{"Not", "@*", "LowerCaseQ"}], ")"}]}]}], ":>",
RowBox[{"\"\<-\>\"", "<>", "l"}]}]}], "]"}]}], "\n", "\t",
"\t\t\t\t\t", "}"}]}], "&"}], "@",
RowBox[{"ToString", "[", "e", "]"}]}], "\n", "\t\t\t\t\t", "]"}],
"\n", "\t\t\t\t", ")"}]}]}], "\n", "\t\t", "}"}]}], ";"}]], "CodeInput",
CellChangeTimes->{{3.701742376486145*^9, 3.701742390262436*^9}, {
3.701742542122346*^9, 3.70174254644563*^9}, {3.701742579226017*^9,
3.701742763243984*^9}, {3.701743489135323*^9, 3.701743494159808*^9}, {
3.701747750199545*^9, 3.701747757407359*^9}, {3.7017779741339703`*^9,
3.701777974309288*^9}, {3.701778007534182*^9, 3.7017780175553617`*^9}, {
3.701778646899786*^9, 3.70177864982447*^9}, {3.7017790649227133`*^9,
3.7017790755720863`*^9}, {3.7017798427423143`*^9, 3.701779852690042*^9}, {
3.7017824620460567`*^9, 3.7017824648262243`*^9}, {3.701782502845847*^9,
3.701782511425811*^9}, {3.70179470421922*^9, 3.701794742734206*^9}, {
3.704570604225387*^9, 3.704570608451426*^9}, {3.70457064762927*^9,
3.7045706486213293`*^9}, 3.733027905371779*^9, {3.7330279837840433`*^9,
3.733027984626937*^9}, {3.7330288379143887`*^9, 3.733028851143744*^9}, {
3.73302888733778*^9, 3.733028919030015*^9}, {3.733028956624175*^9,
3.733028969607233*^9}, {3.733029289401211*^9,
3.733029307335341*^9}},ExpressionUUID->"c277f4df-d032-4855-809b-\
4602b97e47e3"]
}, Closed]],
Cell[CellGroupData[{
Cell["\[LeftCeiling]$CSSValueRules\[RightFloor]", "CodeSubsubsubsection",
Evaluatable->True,
CellChangeTimes->{3.733027739308865*^9,
3.733027921911899*^9},ExpressionUUID->"28abb202-8c40-4f7f-b48d-\
a14eb759ee36"],
Cell[BoxData[
RowBox[{
RowBox[{"$CSSDefaultValueRules", "=", "\n", "\t",
RowBox[{"Join", "[", "\n", "\t\t",
RowBox[{
RowBox[{"Map", "[", "\n", "\t\t\t",
RowBox[{
RowBox[{
RowBox[{"Replace", "[",
RowBox[{"#", ",", "\n", "\t\t\t\t",
RowBox[{
RowBox[{"Hold", "[", "c_", "]"}], ":>", "\n", "\t\t\t\t\t",
RowBox[{"(",
RowBox[{"c", "\[Rule]",
RowBox[{"ToLowerCase", "@",
RowBox[{"ToString", "[",
RowBox[{"Unevaluated", "[", "c", "]"}], "]"}]}]}], ")"}]}]}],
"\n", "\t\t\t\t", "]"}], "&"}], ",", "\n", "\t\t\t",
RowBox[{"Thread", "@",
RowBox[{"Hold", "@",
RowBox[{"{", "\n", "\t\t\t\t",
RowBox[{
"Red", ",", "White", ",", "Blue", ",", "Black", ",", "Yellow", ",",
"\n", "\t\t\t\t", "Green", ",", "Orange", ",", "Purple", ",",
"Pink", ",", "Gray", ",", "\n", "\t\t\t\t", "LightBlue", ",",
"LightRed", ",", "LightGray", ",", "LightYellow", ",", "\n",
"\t\t\t\t", "LightGreen", ",", "LightOrange", ",", "LightPurple",
",", "LightPink", ",", "\n", "\t\t\t\t", "Thick", ",", "Dotted",
",", "Thin", ",", "Dashed"}], "\n", "\t\t\t\t", "}"}]}]}]}], "]"}],
",",
RowBox[{"{", "\n", "\t\t",
RowBox[{
RowBox[{
RowBox[{"c_", "?", "ColorQ"}], ":>", "\n", "\t\t\t",
RowBox[{"\"\<#\>\"", "<>",
RowBox[{"Map", "[", "\n", "\t\t\t\t",
RowBox[{
RowBox[{
RowBox[{"StringPadLeft", "[", "\n", "\t\t\t\t\t",
RowBox[{
RowBox[{"IntegerString", "[",
RowBox[{"#", ",", "16"}], "]"}], ",", "\n", "\t\t\t\t\t", "2",
",", "\n", "\t\t\t\t\t", "\"\<0\>\""}], "\n", "\t\t\t\t\t",
"]"}], "&"}], ",", "\n", "\t\t\t\t",
RowBox[{"Floor", "[",
RowBox[{"255", "*",
RowBox[{"Apply", "[",
RowBox[{"List", ",",
RowBox[{"ColorConvert", "[",
RowBox[{"c", ",", "RGBColor"}], "]"}]}], "]"}]}], "]"}]}],
"\n", "\t\t\t\t", "]"}]}]}], ",", "\n", "\t\t",
RowBox[{"i_Integer", ":>", "\n", "\t\t\t",
RowBox[{
RowBox[{"ToString", "[", "i", "]"}], "<>", "\"\<px\>\""}]}], ",",
"\n", "\t\t",
RowBox[{"q_Quantity", ":>", "\n", "\t\t\t",
RowBox[{"StringReplace", "[", "\n", "\t\t\t\t",
RowBox[{
RowBox[{"ToString", "[", "q", "]"}], ",", "\n", "\t\t\t\t",
RowBox[{"\"\< \>\"", "\[Rule]", "\"\<\>\""}]}], "\n", "\t\t\t\t",
"]"}]}], ",", "\n", "\t\t",
RowBox[{
RowBox[{"Scaled", "[", "i_", "]"}], ":>", "\n", "\t\t\t",
RowBox[{
RowBox[{"ToString", "@",
RowBox[{"Floor", "[",
RowBox[{"i", "*", "100"}], "]"}]}], "<>", "\"\<%\>\""}]}], ",",
"\n", "\t\t",
RowBox[{"r_Rule", ":>", "\n", "\t\t\t",
RowBox[{"(",
RowBox[{"cssGenerate", "[", "r", "]"}], ")"}]}], ",", "\n", "\t\t",
RowBox[{
RowBox[{
RowBox[{"{", "l__", "}"}], "|",
RowBox[{"Directive", "[", "l__", "]"}]}], "\[RuleDelayed]", "\n",
"\t\t\t",
RowBox[{"StringRiffle", "@",
RowBox[{"Map", "[",
RowBox[{
RowBox[{
RowBox[{"#", "/.", "$CSSValueRules"}], "&"}], ",",
RowBox[{"{", "l", "}"}]}], "]"}]}]}], ",", "\n", "\t\t",
RowBox[{"d_Dynamic", ":>", "\n", "\t\t\t",
RowBox[{"(",
RowBox[{
RowBox[{"Setting", "[", "d", "]"}], "/.", "$CSSValueRules"}],
")"}]}], ",", "\n", "\t\t",
RowBox[{"i_", "\[RuleDelayed]",
RowBox[{"ToLowerCase", "@",
RowBox[{"ToString", "[", "i", "]"}]}]}]}], "\n", "\t\t", "}"}]}],
"\n", "\t", "]"}]}], ";"}]], "CodeInput",
CellChangeTimes->{{3.70174235905682*^9, 3.7017425345349073`*^9}, {
3.7017778433576117`*^9, 3.7017779310901613`*^9}, {3.701778050186521*^9,
3.7017780784270906`*^9}, {3.701778210375092*^9, 3.701778250270299*^9}, {
3.701778403605918*^9, 3.7017784264749393`*^9}, {3.701778590922645*^9,
3.7017786045549583`*^9}, {3.701779618522738*^9, 3.701779639969715*^9}, {
3.701781457484383*^9, 3.701781459979834*^9}, {3.701787025864047*^9,
3.70178704508114*^9}, {3.702348677302252*^9, 3.702348714911435*^9}, {
3.7330279181098003`*^9, 3.7330279181234217`*^9}, {3.7330279669102907`*^9,
3.733027978091425*^9}, {3.733029843900152*^9,
3.73302986314715*^9}},ExpressionUUID->"db7005c1-03fb-49d2-a7e9-9651feac46e4"]
}, Closed]],
Cell[CellGroupData[{
Cell["\[LeftCeiling]$CSSTypeRules\[RightFloor]", "CodeSubsubsubsection",
Evaluatable->True,
CellChangeTimes->{{3.7330277297951612`*^9, 3.7330277322573853`*^9},
3.733027936089677*^9},ExpressionUUID->"00f9b9ff-5a24-4e1a-970a-\
101f36909ff4"],
Cell[BoxData[
RowBox[{
RowBox[{"$CSSDefaultTypeRules", "=", "\n", "\t",
RowBox[{"{", "\n", "\t\t",
RowBox[{
RowBox[{"\"\<Title\>\"", "\[Rule]", "\"\<h1\>\""}], ",", "\n", "\t",
"\t",
RowBox[{"\"\<Subtitle\>\"", "\[Rule]", "\"\<h2\>\""}], ",", "\n", "\t",
"\t",
RowBox[{"\"\<Section\>\"", "\[Rule]", "\"\<h3\>\""}], ",", "\n", "\t",
"\t",
RowBox[{"\"\<Subsection\>\"", "\[Rule]", "\"\<h4\>\""}], ",", "\n", "\t",
"\t",
RowBox[{"\"\<Subsubsection\>\"", "\[Rule]", "\"\<h5\>\""}], ",", "\n",
"\t", "\t",
RowBox[{"\"\<Subsubsubsection\>\"", "\[Rule]", "\"\<h6\>\""}], ",", "\n",
"\t", "\t",
RowBox[{"\"\<Hyperlink\>\"", "\[Rule]", "\"\<a\>\""}], ",", "\n", "\t",
"\t",
RowBox[{"\"\<HyperlinkActive\>\"", "\[Rule]", "\"\<a:hover\>\""}], ",",
"\n", "\t", "\t",
RowBox[{"\"\<Graphics\>\"", "\[Rule]", "\"\<img\>\""}], ",", "\n", "\t",
"\t",
RowBox[{"\"\<Text\>\"", "\[Rule]", "\"\<p\>\""}], ",", "\n", "\t", "\t",
RowBox[{"s_String", "\[RuleDelayed]",
RowBox[{"(",
RowBox[{"ToLowerCase", "[", "s", "]"}], ")"}]}]}], "\n", "\t", "\t",
"}"}]}], ";"}]], "CodeInput",
CellChangeTimes->{{3.7017495165486298`*^9, 3.7017495607749147`*^9}, {
3.701781896320071*^9, 3.7017819041800327`*^9}, {3.7017865298120403`*^9,
3.701786538840781*^9}, {3.701786706801643*^9, 3.701786709589716*^9}, {
3.706720539780176*^9, 3.7067205498410587`*^9}, 3.7330279316698437`*^9, {
3.733027991630755*^9,
3.733027996151807*^9}},ExpressionUUID->"9f6a8485-b2be-4eac-b17f-\
1aa178c50f2e"]
}, Closed]],
Cell[CellGroupData[{
Cell["\[LeftCeiling]cssThreadedOptions\[RightFloor]", "CodeSubsubsubsection",
Evaluatable->True,
CellChangeTimes->{
3.733027724981748*^9},ExpressionUUID->"53ae5516-879b-41fe-a61a-\
efb9fac81d52"],
Cell[BoxData[
RowBox[{
RowBox[{"cssThreadedOptions", "[",
RowBox[{"propBase_", ",", "propOps_", ",", "vals_"}], "]"}], ":=", "\n",
"\t",
RowBox[{"MapThread", "[", "\n", "\t\t",
RowBox[{
RowBox[{
RowBox[{"If", "[",
RowBox[{
RowBox[{"!",
RowBox[{"MatchQ", "[",
RowBox[{"#2", ",",
RowBox[{"Inherited", "|", "None"}]}], "]"}]}], ",", "\n", "\t\t\t",
RowBox[{"If", "[",
RowBox[{
RowBox[{"StringContainsQ", "[",
RowBox[{"propBase", ",", "\"\<-\>\""}], "]"}], ",", "\n",
"\t\t\t\t",
RowBox[{
RowBox[{"StringReplace", "[",
RowBox[{"propBase", ",",
RowBox[{"{", "\n", "\t\t\t\t\t",
RowBox[{"\"\<-\>\"", "\[Rule]",
RowBox[{"(",
RowBox[{"\"\<-\>\"", "<>", "#", "<>", "\"\<-\>\""}], ")"}]}],
"\n", "\t\t\t\t\t", "}"}]}], "]"}], "\[Rule]",
RowBox[{"(",
RowBox[{"#2", "/.", "$CSSValueRules"}], ")"}]}], ",", "\n",
"\t\t\t\t",
RowBox[{
RowBox[{"StringJoin", "[",
RowBox[{"propBase", ",",
RowBox[{"\"\<-\>\"", "<>", "#"}]}], "]"}], "\[Rule]",
RowBox[{"(",
RowBox[{"#2", "/.", "$CSSValueRules"}], ")"}]}]}], "\n",
"\t\t\t\t", "]"}], ",", "\n", "\t\t\t", "Nothing"}], "\n", "\t\t\t",
"]"}], "&"}], ",",
RowBox[{"{", "\n", "\t\t",
RowBox[{"propOps", ",", "\n", "\t\t", "vals"}], "\n", "\t\t", "}"}]}],
"]"}]}]], "CodeInput",
CellChangeTimes->{{3.7017769364278183`*^9, 3.701777003676669*^9}, {
3.7017772335524397`*^9, 3.7017772357767477`*^9}, {3.701777488214386*^9,
3.701777492557832*^9}, {3.7017860505563087`*^9, 3.701786056345842*^9}, {
3.7330279181286173`*^9,
3.7330279181339197`*^9}},ExpressionUUID->"663866fb-5434-4f47-b601-\
5993ba58e82f"]
}, Closed]],
Cell[CellGroupData[{
Cell["\[LeftCeiling]cssGenerate\[RightFloor]", "CodeSubsubsubsection",
Evaluatable->True,
CellChangeTimes->{{3.733027700697241*^9,
3.7330277182878323`*^9}},ExpressionUUID->"9df6a114-ff17-4f07-9856-\
8b84c5fcc37d"],
Cell[BoxData[{
RowBox[{
RowBox[{"cssGenerate", "//", "Clear"}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"cssGenerate", "[", "\n", "\t",
RowBox[{"prop_", "\[Rule]",
RowBox[{"val", ":",
RowBox[{"Except", "[",
RowBox[{"{", "__Rule", "}"}], "]"}]}]}], "\n", "\t", "]"}], ":=", "\n",
"\t",
RowBox[{"With", "[",
RowBox[{
RowBox[{"{", "\n", "\t\t",
RowBox[{"propBase", "=", "\n", "\t\t\t",
RowBox[{"prop", "/.", "$CSSPropertyRules"}]}], "\n", "\t\t", "}"}],
",", "\n", "\t\t",
RowBox[{"If", "[",
RowBox[{
RowBox[{"!",
RowBox[{"MatchQ", "[",
RowBox[{"propBase", ",", " ", "$CSSAllowedProperties"}], "]"}]}],
",", "\n", "\t\t\t", "Nothing", ",", "\n", "\t\t\t",
RowBox[{"If", "[",
RowBox[{
RowBox[{"Not", "@",
RowBox[{"ListQ", "@", "propBase"}]}], ",", "\n", "\t\t\t\t",
RowBox[{"Sequence", "@@", "\n", "\t\t\t\t\t\t",
RowBox[{"Replace", "[",
RowBox[{"val", ",", "\n", "\t\t\t\t\t\t\t",
RowBox[{"{", "\n", "\t\t\t\t\t\t\t\t",
RowBox[{
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"l_", ",", "r_"}], "}"}], ",",
RowBox[{"{",
RowBox[{"b_", ",", "h_"}], "}"}]}], "}"}], ":>", "\n", "\t",
"\t", "\t", "\t\t\t\t\t\t",
RowBox[{"If", "[",
RowBox[{
RowBox[{"StringContainsQ", "[",
RowBox[{"propBase", ",", "\"\<radius\>\""}], "]"}], ",",
"\n", "\t", "\t", "\t", "\t\t\t\t\t\t\t",
RowBox[{
"cssThreadedOptions", "[", "\n", "\t", "\t", "\t",
"\t\t\t\t\t\t\t\t",
RowBox[{
"propBase", ",", "\n", "\t", "\t", "\t", "\t",
"\t\t\t\t\t\t\t",
RowBox[{"{",
RowBox[{
"\"\<left-bottom\>\"", ",", "\"\<right-bottom\>\"", ",",
"\"\<left-top\>\"", ",", "\"\<right-top\>\""}], "}"}],
",", "\n", "\t", "\t", "\t", "\t", "\t", "\t",
"\t\t\t\t\t",
RowBox[{"{",
RowBox[{"l", ",", "r", ",", "b", ",", "h"}], "}"}]}],
"\n", "\t", "\t", "\t", "\t\t\t\t\t\t\t\t", "]"}], ",",
"\n", "\t", "\t", "\t", "\t\t\t\t\t\t\t",
RowBox[{
"cssThreadedOptions", "[", "\n", "\t", "\t", "\t",
"\t\t\t\t\t\t\t\t",
RowBox[{
"propBase", ",", "\n", "\t", "\t", "\t", "\t",
"\t\t\t\t\t\t\t",
RowBox[{"{",
RowBox[{
"\"\<left\>\"", ",", "\"\<right\>\"", ",",
"\"\<bottom\>\"", ",", "\"\<top\>\""}], "}"}], ",", "\n",
"\t", "\t", "\t", "\t", "\t", "\t", "\t\t\t\t\t",
RowBox[{"{",
RowBox[{"l", ",", "r", ",", "b", ",", "h"}], "}"}]}],
"\n", "\t", "\t", "\t", "\t\t\t\t\t\t\t\t", "]"}]}], "\n",
"\t", "\t", "\t", "\t\t\t\t\t\t\t", "]"}]}], ",", "\n", "\t",
"\t", "\t", "\t\t\t\t\t",
RowBox[{
RowBox[{"{",
RowBox[{"l_", ",", "r_"}], "}"}], ":>", "\n", "\t", "\t",
"\t", "\t\t\t\t\t\t",
RowBox[{
"cssThreadedOptions", "[", "\n", "\t", "\t", "\t",
"\t\t\t\t\t\t\t",
RowBox[{
"propBase", ",", "\n", "\t", "\t", "\t", "\t\t\t\t\t\t\t",
RowBox[{"{",
RowBox[{"\"\<left\>\"", ",", "\"\<right\>\""}], "}"}], ",",
"\n", "\t", "\t", "\t", "\t\t\t\t\t\t\t",
RowBox[{"{",
RowBox[{"l", ",", "r"}], "}"}]}], "\n", "\t", "\t", "\t",
"\t\t\t\t\t\t\t", "]"}]}], ",", "\n", "\t", "\t", "\t",
"\t\t\t\t\t",
RowBox[{"v_", ":>", "\n", "\t", "\t", "\t", "\t\t\t\t\t\t",
RowBox[{"{",
RowBox[{"propBase", "\[Rule]",
RowBox[{"(",
RowBox[{"v", "/.", "$CSSValueRules"}], ")"}]}], "}"}]}]}],
"\n", "\t\t\t\t\t\t\t\t", "}"}]}], "\n", "\t\t\t\t\t\t\t",
"]"}]}], ",", "\n", "\t\t\t\t",
RowBox[{"If", "[",
RowBox[{
RowBox[{"ListQ", "@", "val"}], ",", "\n", "\t", "\t\t\t\t",
RowBox[{"Sequence", "@@",
RowBox[{"cssGenerate", "[",
RowBox[{"Thread", "[",
RowBox[{"propBase", "\[Rule]", "val"}], "]"}], "]"}]}], ",",
"\n", "\t\t\t\t\t",
RowBox[{"cssGenerate", "[",
RowBox[{
RowBox[{"First", "@", "propBase"}], "\[Rule]", "val"}], "]"}]}],
"\n", "\t\t\t\t\t", "]"}]}], "\n", "\t\t\t\t", "]"}]}], "\n",
"\t\t\t", "]"}]}], "\n", "\t\t", "]"}]}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"cssGenerate", "[", "\n", "\t",
RowBox[{
RowBox[{"type", ":",
RowBox[{"_String", "|", "_Symbol"}]}], "->",
RowBox[{"spec", ":",
RowBox[{"{", "__Rule", "}"}]}]}], "\n", "\t", "]"}], ":=", "\n", "\t",
RowBox[{"With", "[",
RowBox[{
RowBox[{"{",
RowBox[{"tp", "=",
RowBox[{
RowBox[{"ToString", "[", "type", "]"}], "/.", "$CSSTypeRules"}]}],
"}"}], ",", "\n", "\t\t",
RowBox[{"If", "[",
RowBox[{
RowBox[{"!",
RowBox[{"MatchQ", "[",
RowBox[{"tp", ",", " ", "$CSSAllowedProperties"}], "]"}]}], ",",
"\n", "\t\t\t", "Nothing", ",", "\n", "\t\t\t",
RowBox[{"tp", "\[Rule]",
RowBox[{"Map", "[",
RowBox[{"cssGenerate", ",", " ", "spec"}], "]"}]}]}], "\n", "\t\t\t",
"]"}]}], "\n", "\t\t", "]"}]}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"cssGenerate", "[",
RowBox[{"r", ":",
RowBox[{"{", "__Rule", "}"}]}], "]"}], ":=", "\n", "\t",
RowBox[{"cssGenerate", "/@", "r"}]}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"cssGenerate", "[", "a_Association", "]"}], ":=", "\n", "\t",
RowBox[{"KeyValueMap", "[",
RowBox[{"cssGenerate", ",", "a"}], "]"}]}], ";"}], "\n",
RowBox[{
RowBox[{
RowBox[{"cssGenerate", "[",
RowBox[{
RowBox[{"{", "}"}], ",",
RowBox[{"Optional", "[",
RowBox[{"_", ",", "_"}], "]"}]}], "]"}], ":=",
RowBox[{"{", "}"}]}], ";"}]}], "CodeInput",
CellChangeTimes->{{3.701741625510021*^9, 3.701741627028345*^9}, {
3.701741705948105*^9, 3.701741708589278*^9}, {3.701741763622472*^9,
3.701741900150556*^9}, {3.701741940014846*^9, 3.701741984736967*^9}, {
3.7017420242368593`*^9, 3.701742104433015*^9}, {3.70174221673208*^9,
3.7017422449650793`*^9}, {3.701742281366375*^9, 3.7017423829610767`*^9}, {
3.701742781263833*^9, 3.701742803204671*^9}, {3.701743515444727*^9,
3.7017435784361897`*^9}, {3.701744589694929*^9, 3.701744602685816*^9}, {
3.7017495654176617`*^9, 3.7017495696395807`*^9}, {3.701749660869115*^9,
3.70174967390064*^9}, 3.7017497658161592`*^9, {3.701749888616754*^9,
3.701749897561047*^9}, {3.701750015413636*^9, 3.701750020686413*^9}, {
3.7017500607020473`*^9, 3.701750083195094*^9}, {3.7017501459243717`*^9,
3.701750163350892*^9}, {3.701750204964576*^9, 3.701750214701816*^9}, {
3.701750380631542*^9, 3.701750381128127*^9}, {3.701750419800441*^9,
3.701750426840554*^9}, {3.701750470623146*^9, 3.701750480413599*^9},
3.701750599414249*^9, {3.7017762482344303`*^9, 3.701776287630517*^9}, {
3.7017763232671547`*^9, 3.7017763338156*^9}, {3.701776688190473*^9,
3.701776935244144*^9}, {3.701776985590233*^9, 3.701777035012838*^9}, {
3.701777083771212*^9, 3.70177718299815*^9}, {3.7017772401720123`*^9,
3.701777248082369*^9}, {3.701777373195477*^9, 3.701777468625947*^9}, {
3.7017775833046293`*^9, 3.701777587586152*^9}, {3.701777622664774*^9,
3.7017776272409277`*^9}, {3.701777660863597*^9, 3.7017776804380207`*^9}, {
3.701779101758329*^9, 3.701779126490542*^9}, {3.701779219752219*^9,
3.701779245439249*^9}, {3.701779284700718*^9, 3.7017793930283422`*^9}, {
3.7017794564263687`*^9, 3.701779463370623*^9}, {3.701782522031039*^9,
3.701782630027092*^9}, {3.7017830124956503`*^9, 3.7017830138522797`*^9}, {
3.701787406411532*^9, 3.7017874175854473`*^9}, {3.73302790538536*^9,
3.7330279316814528`*^9}, {3.7330289856597757`*^9, 3.733029006079143*^9}, {
3.733029323217971*^9, 3.733029335046502*^9}, {3.733029598271516*^9,
3.733029628094508*^9}, {3.733029677012439*^9,
3.733029797325038*^9}},ExpressionUUID->"c025e549-bf1b-41a7-919d-\
7db169ba4a42"]
}, Closed]],
Cell[CellGroupData[{
Cell["\[LeftCeiling]generateCSSString\[RightFloor]", "CodeSubsubsubsection",
Evaluatable->True,
CellChangeTimes->{{3.73302835471618*^9,
3.7330283627021227`*^9}},ExpressionUUID->"09c991c9-f128-4740-8dba-\
57066e2a9149"],
Cell[BoxData[
RowBox[{
RowBox[{"generateCSSString", "[",
RowBox[{
RowBox[{"{", "}"}], ",", " ", "_"}], "]"}], ":=",
"\"\<\>\""}]], "CodeInput",
CellChangeTimes->{{3.7330344555261374`*^9,
3.7330344594922867`*^9}},ExpressionUUID->"999da9b4-1041-47a0-82bd-\
aa4e8bea867d"],
Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"generateCSSString", "[",
RowBox[{
RowBox[{"r", ":",
RowBox[{"{", "__Rule", "}"}]}], ",", " ",
RowBox[{"riffle", ":", "_String", ":", "\"\< \>\""}]}], "]"}], ":=",
"\n", "\t",
RowBox[{"StringRiffle", "[", "\n", "\t\t",
RowBox[{
RowBox[{"KeyValueMap", "[",
RowBox[{
RowBox[{
RowBox[{"#", "<>", "\"\<: \>\"", "<>", "#2", "<>", "\"\<;\>\""}],
"&"}], ",", " ",
RowBox[{"Association", "[", "r", "]"}]}], "]"}], ",", "\n", "\t\t",
"riffle"}], "\n", "\t\t", "]"}]}], ";"}], "\n",
RowBox[{
RowBox[{"generateCSSString", "[",
RowBox[{
RowBox[{"r", ":",
RowBox[{"{", "__Rule", "}"}]}], ",", " ",
RowBox[{"{",
RowBox[{"riffle_String", ",", " ", "_"}], "}"}]}], "]"}], ":=", "\n",
"\t",
RowBox[{"generateCSSString", "[",
RowBox[{"r", ",", " ", "riffle"}], "]"}]}]}], "CodeInput",
CellChangeTimes->{{3.733028346168064*^9, 3.7330284373534813`*^9},
3.73302992929797*^9, {3.7330313960452538`*^9,
3.733031416506465*^9}},ExpressionUUID->"297a5980-3e42-4ed5-8611-\
8ea8dc65359d"],