-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.css
More file actions
712 lines (574 loc) · 18.7 KB
/
Copy pathglobal.css
File metadata and controls
712 lines (574 loc) · 18.7 KB
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
/* This file contains CSS rules that extend/overwrite the default rules set in the ximeraServer
*
* As of 2024-11
* - this works only on the new (KULeuven-adapted) ximeraServer
* - this file (re-)translates labels into English
*
* In the (near?) future, this file should
* - be renamed xmHtmlStyle.css (to sync with xmPreamble.tex and xmPrintStyle.sty)
* - become (almost) empty by default, because the ximeraServer default settings will becom English again
*/
/* *************************** Save, then use Ctrl F5 on the webpage whenever you make changes to this file. ********** */
/* ************************************** Changing the Font! *********************************************** */
/* Adjust overall page sizing and color to match PDF proportions. Change font size here. */
.main-activity {
font-size: 22px !important;
line-height: 1.75 !important;
color: hsl(0, 0%, 10%) !important;
}
/* Keep paragraphs produced inside problems and theorem-like blocks at the normal lesson size. */
p.noindent,
.problem-environment p,
.problem-environment .noindent,
.theorem-like p,
.theorem-like .noindent {
font-size: inherit !important;
line-height: 1.55 !important;
}
/* *********************************** Done changing the font ****************************************** */
.xmhint::before {
content: "Show hint" counter(hint_number, notfirst);
}
.xmhint.ui-state-active::before {
content: "Hide hint " counter(hint_number, notfirst);
}
.xmoplossing::before {
content: "Show solution";
}
.xmoplossing.ui-state-active::before {
content: "Hide solution";
}
.xmoplossing-content::before {
content: "Solution: ";
font-weight: bold;
}
.xmuitkomst::before {
content: "Show answer";
}
.xmuitkomst.ui-state-active::before {
content: "Hide answer";
}
.xmuitkomst-content::before {
content: "Answer: ";
font-weight: bold;
}
.exercise::before {
content: "exercise" attr(numbered) ".";
}
.definition::before {
content: "definition" attr(numbered) ".";
}
.remark::before {
content: "remark" attr(numbered) ".";
}
.proposition::before {
content: "proposition" attr(numbered) ".";
}
.example::before {
content: "example" attr(numbered) ".";
}
.warning::before {
content: "warning" attr(numbered) ".";
}
.theorem::before {
content: "theorem" attr(numbered) ".";
}
.explanation::before {
content: "explanation" attr(numbered) ".";
}
.exploration::before {
content: "exploration" attr(numbered) ".";
}
.formula::before {
content: "formula" attr(numbered) ".";
}
.problem::before {
content: "problem" attr(numbered) ".";
}
.notation::before {
content: "notation" attr(numbered) ".";
}
/* Overwrite labels */
span.hint-text {
display: none;
}
button.btn-reveal-hint::after {
content: "Show hint";
}
button.btn-reveal-hint.oplossing::after {
content: "Show solution";
}
.xmerase a span.xmhidden-small {
display: none;
}
.xmerase a::after {
content: "Clear";
}
span.show-check-text {
display: none !important;
}
button.btn-ximera-check::after {
content: "Check answer";
}
span.show-answer-text {
display: none !important;
}
span.show-answer-large button.btn-ximera-show-answer::after {
content: "Reveal answer";
}
#math-edit-button span {
display: none;
}
button#math-edit-button::before {
content: "Math Editor";
}
/* Vorige/volgende */
a.next-activity::before {
content: "Next";
}
span#next-activity-label {
display: none;
}
a.prev-activity::after {
content: "Previous";
}
span#prev-activity-label {
display: none;
}
.en-text {
display: initial;
}
.nl-text {
display: none;
}
/* Multi-Lingual Formatting */
.multiple-choice[titletext]::before {
/* Numbered everything in CSS is causing trouble. TeX should decide the numbering. */
/* content:"${nameOfClass} " counter($counterToIncrement) ". ";*/
content:attr(titletext);
}
/*
We setup the problem-environment(s) default display/title text next.
*/
/* Set the problem-environment default(s):
Note that, because there are a number of types, we need a "default" for each type - I don't know how to do this other than hard-code.
Also note: We may want to decide, as a team, what the default text should *actually* be, e.g. capitalize or not, spacing, etc.
*/
.problem::before {
content:"problem" attr(numbered) ".";
}
.exploration::before {
content:"exploration" attr(numbered) ".";
}
.exercise::before {
content:"exercise" attr(numbered) ".";
}
.question::before {
content:"question" attr(numbered) ".";
}
/*
If the problem environment(s) have the "titletext" attribute defined, then overwrite the above default with the newly defined default text.
Note: This is used to do automatic translation, but could also be used to change the default text in *any* way we would want,
e.g. use "P1", "Problem 1", "Prob 1", "Exciting Problem 1", etc.
*/
.problem-environment[titletext]::before {
/* Numbered everything in CSS is causing trouble. TeX should decide the numbering. */
/* content:"${nameOfClass} " counter($counterToIncrement) ". ";*/
content:attr(titletext) attr(numbered) ".";
}
.theorem-like[titletext]::before {
content:attr(titletext);
}
.feedback[titletext]::before {
content:attr(titletext) ": ";
}
/* Outcome Formatting */
.outcomeContent {
/* display: none; */
color: rgb(51, 0, 181);
}
.outcomeHead {
text-align: center;
font-weight: bold;
}
/*
.outcomeHead:hover + .outcomeContent {
display: block;
} */
/* **************************** Modifications made with the help of AI. ***************************** */
/* **************************** Save, then use CTRL F5 in HTML to apply changes. ***************************** */
/* ==========================================================================
1. CORE MATH ENVIRONMENT PACING & SIZING
========================================================================= */
/* Removes default lavender background for Problem and uses Glaucous Blue */
div[titletext*="Problem"] {
background-color: #fdfdfd !important;
border-left: 8px solid #9fb4d3 !important;
padding: 1.5em !important;
color: #333 !important;
}
/* Explicit layout container block spacing before and after textbook elements */
.main-activity .problem-environment,
.main-activity .theorem, .main-activity .definition, .main-activity .procedure,
.main-activity .exercise, .main-activity .remark, .main-activity .warning,
.main-activity .example, .main-activity .lemma, .main-activity .corollary, .main-activity .note,
.main-activity .theorem-environment, .main-activity .definition-environment,
.main-activity .procedure-environment, .main-activity .warning-environment,
.main-activity .example-environment, .main-activity .note-environment {
margin-top: 2.5rem !important;
margin-bottom: 2.5rem !important;
}
/* Safely push content down after titles without touching global navigation or headings */
.main-activity .theorem > p:first-of-type,
.main-activity .definition > p:first-of-type,
.main-activity .procedure > p:first-of-type,
.main-activity .remark > p:first-of-type,
.main-activity .warning > p:first-of-type,
.main-activity .example > p:first-of-type,
.main-activity .note > p:first-of-type,
.main-activity .theorem-environment > p:first-of-type,
.main-activity .definition-environment > p:first-of-type,
.main-activity .procedure-environment > p:first-of-type {
margin-top: 1.5rem !important;
clear: both !important;
}
/* Keep all content at the normal lesson size even when it wraps or uses line breaks */
.problem-environment,
.problem-environment p,
.problem-environment .noindent,
.problem-environment strong,
.problem-environment em,
.problem-environment a,
.problem-environment li {
font-size: 22px !important;
line-height: 1.55 !important;
}
/* Let MathJax handle superscripts and degree symbols without clipping them */
.problem-environment .mathjax-inline,
.problem-environment .mathjax-env,
.problem-environment .MathJax,
.problem-environment .MathJax span,
.problem-environment .mjx-chtml,
.problem-environment .mjx-container,
.problem-environment .mjx-math {
overflow: visible !important;
}
/* Adds consistent spacing AFTER paragraphs globally to keep text readable */
.main-activity p,
.problem-environment p,
.problem-environment .noindent {
margin-top: 0 !important;
margin-bottom: 1.5rem !important; /* Space after each paragraph */
}
/* CRITICAL: Ensures the VERY FIRST paragraph inside a Problem stays tight to the title */
.problem-environment > p:first-of-type,
.problem-environment > .noindent:first-of-type {
margin-top: 0 !important;
}
/* ==========================================================================
2. NESTED LISTS & ENUMERATIONS (ALPHA AND INDENTS)
========================================================================== */
/* Spacing before and after full lists inside the activity */
.main-activity ol,
.main-activity ul {
margin-top: 1.5rem !important;
margin-bottom: 1.5rem !important;
}
/* Standard vertical breathing room between normal list items */
.main-activity li {
margin-top: 0.75rem !important;
margin-bottom: 0.75rem !important;
}
/* Force first level of lists inside a problem to use alpha labels: (a), (b), (c) */
.main-activity .problem ol {
list-style-type: lower-alpha !important;
}
.main-activity .problem ol > li::marker {
content: "(" counter(list-item, lower-alpha) ") " !important;
}
/* Dedicated vertical spacing separation between sub-parts of a problem (a, b, c...) */
.main-activity .problem ol > li {
margin-bottom: 2.5rem !important;
}
/* Unstyled indent structures (Removes bullets from itemize nested in enumerations) */
.main-activity ol li ul {
list-style-type: none !important;
}
/* Remove bullets from itemize lists inside a description environment */
.main-activity .description ul {
list-style-type: none !important;
list-style: none !important;
padding-left: 1.5rem !important;
margin-top: 0 !important;
}
.main-activity .description ul li {
list-style-type: none !important;
display: block !important;
}
/* Remove bullets from itemize lists inside any Problem environment */
.main-activity .problem ul {
list-style-type: none !important;
list-style: none !important;
padding-left: 1.5rem !important;
}
.main-activity .problem ul li {
list-style-type: none !important;
}
/* ==========================================================================
3. MULTIPLE-CHOICE & SELECT-ALL LAYOUT FIXES (SAFE SELECTORS)
========================================================================== */
/* Target ONLY the true block container for multiple choice, leaving inline answers alone */
div.multiple-choice,
div.select-all {
margin-top: 2.5rem !important;
margin-bottom: 2.5rem !important;
display: block !important;
clear: both !important;
text-align: left !important;
}
/* Format the header label inside the actual multiple choice blocks to be bold and small */
div.multiple-choice::before,
div.select-all::before {
content: "Multiple Choice" !important;
font-weight: bold !important;
font-size: 1rem !important;
display: block !important;
text-align: left !important;
margin-bottom: 0.75rem !important;
}
/* For select-all question blocks, make the label match */
div.select-all::before {
content: "Select All That Apply" !important;
font-size: 1rem !important;
}
/* Target ONLY the spans that are direct children of the multiple choice block container */
div.multiple-choice > span.choice,
div.select-all > span.choice {
display: inline-block !important;
margin-right: 0.5rem !important;
margin-bottom: 0.5rem !important;
text-align: left !important;
}
/* Ensure inline verification answer layouts retain their native flexible positioning */
.problem-environment .form-inline,
.problem-environment .answer-container {
display: inline-flex !important;
vertical-align: middle !important;
}
/* ==========================================================================
4. MISC LAYOUT MODULES
========================================================================== */
/* Adds spacing to anything inside a center environment */
.main-activity .center {
margin-top: 2rem !important;
margin-bottom: 2rem !important;
display: block !important;
}
/* Adds vertical space before and after TikZ/Image environments */
.main-activity .image-environment {
margin-top: 2rem !important;
margin-bottom: 2rem !important;
display: block !important;
}
/* Keep the title items inline on the same line */
.definition h5, .theorem h5, .procedure h5,
.environment-title, [class*="-title"] {
display: inline !important;
}
/* Safely push content down after titles without touching global navigation or headings */
.main-activity .theorem > p:first-of-type,
.main-activity .definition > p:first-of-type,
.main-activity .procedure > p:first-of-type,
.main-activity .remark > p:first-of-type,
.main-activity .warning > p:first-of-type,
.main-activity .example > p:first-of-type,
.main-activity .note > p:first-of-type,
.main-activity .theorem-environment > p:first-of-type,
.main-activity .definition-environment > p:first-of-type,
.main-activity .procedure-environment > p:first-of-type {
margin-top: 1.5rem !important;
clear: both !important;
}
/* Adds consistent spacing AFTER paragraphs globally to keep text readable */
.main-activity p,
.problem-environment p,
.problem-environment .noindent {
margin-top: 0 !important;
margin-bottom: 1.8rem !important; /* Space after each paragraph */
}
/* TOC CHANGES */
/* Changing color of TOC */
/* 1. THE PART BAR: Simple solid block */
.activity-card.part {
background-color: #6082b6 !important;
color: white !important;
padding: 0.5rem 1.5rem !important; /* Shorter top/bottom padding, keeps wide side padding */
}
/* 2. THE SECTIONS: Glaucous and Orange on Click */
.activity-card.section {
background-color: #9fb4d3 !important;
}
.activity-card.section.active,
.activity-card.section:active {
background-color: #DD8A2E !important;
}
/* 3. THE SUBSECTIONS: White and Orange on Click */
.activity-card.activity {
background-color: #ffffff !important;
border: 2px solid #6082b6 !important;
}
.activity-card.activity.active,
.activity-card.activity:active {
background-color: #DD8A2E !important;
}
/* 4. THE SIDEBAR: Tiered Blue (No teal) */
.sidebar, .nav-sidebar {
background-color: #cfd9e9 !important;
}
.nav-sidebar ul.nav, .nav-sidebar .nav-second-level {
background-color: #9fb4d3 !important;
}
.nav-sidebar li.active > a {
background-color: #DD8A2E !important;
}
/* Removes the automatic number (1, 2, 3) from Part tiles */
.activity-card.part::before,
.card-sectionheading.part::before,
.part::before {
content: none !important;
display: none !important;
}
/* If the '1' is inside the tile text itself */
.activity-card.part .part-counter,
.activity-card.part [data-part-counter] {
display: none !important;
}
/* ******** TOC Changes (Font and Spacing) ******************* */
/* ==========================================================================
TARGET THE ACTIVE ACTIVITY-CARDS TO INCREASE TOC FONT SIZE
========================================================================== */
/* 1. Scale up the text size for all structural activity cards in the TOC */
.activity-card,
.activity-card * {
font-size: 17px !important; /* Forces the text inside the TOC cards up to 18px */
}
/* 2. Re-scale the part labels to match or sit slightly larger if desired */
.activity-card.part,
.activity-card.part * {
font-size: 22px !important;
}
/* ==========================================================================
FORCE SPACE BETWEEN SUBSECTION NUMBERS AND TITLES
========================================================================== */
/* 1. Add horizontal padding inside the title anchor tags to separate numbers and text */
.activity-card a {
padding-left: 12px !important; /* Creates a clean, protective gap between the 1.5.1 numbers and titles */
display: inline-block !important;
}
/* 2. Alternative fix if the template uses a hidden inline separator span */
.activity-card span {
margin-right: 10px !important;
}
.activity-title-center {
width: 100% !important;
text-align: center !important;
display: block !important;
margin: 0 auto !important;
}
.activity-title-center .title {
display: inline-block !important;
padding: 0.5rem 2rem !important;
}
/* Turn the entire header into a flexbox */
.main-title {
display: flex !important;
align-items: center !important;
justify-content: flex-end !important;
gap: 1rem !important;
}
/* Keep the logo/title on the left */
.main-title > a,
.main-title > span.title-xourse {
margin-right: auto !important;
}
/* Order the header tools */
.xmdownload {
order: 1 !important;
}
.xmsettings {
order: 2 !important;
}
#math-edit-button {
order: 3 !important;
}
.xmhelp {
order: 4 !important; /* Contact LAST */
}
/* Put the arrows on the left and right of the orange bar */
.activity-title-wrapper {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
width: 100% !important;
}
/* Keep the orange bar centered */
.activity-title-center {
flex-grow: 1 !important;
text-align: center !important;
}
/* Prevent arrows from stacking */
.activity-nav {
flex-shrink: 0 !important;
display: flex !important;
align-items: center !important;
}
/* Turn the entire activity title area into a horizontal flexbox */
.activity-title {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
width: 100% !important;
}
/* Center the orange bar */
.activity-title-center {
flex-grow: 1 !important;
text-align: center !important;
order: 2 !important;
}
/* Make the whole activity title area a flexbox */
.activity-title {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
width: 100% !important;
}
/* Make the activity title container relative */
.activity-title {
position: relative !important;
}
/* Center the orange bar */
.activity-title-center {
text-align: center !important;
}
/* Make the orange bar the positioning container */
.activity-title-center {
position: relative !important;
text-align: center !important;
padding: 0 40px !important; /* space for arrows */
}
/* LEFT ARROW */
.xmprev {
position: absolute !important;
left: 0 !important; /* now relative to the orange bar */
top: 50% !important;
transform: translateY(-50%) !important;
}
/* RIGHT ARROW */
.xmnext {
position: absolute !important;
right: 0 !important; /* now relative to the orange bar */
top: 50% !important;
transform: translateY(-50%) !important;
}
/* ******** Done with changes ******************************** */
/* ******** Save file, then use Ctrl F5 on webpage whenever you modify this file. **** */