-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathworkshop-instructions.css
More file actions
685 lines (579 loc) · 20.4 KB
/
Copy pathworkshop-instructions.css
File metadata and controls
685 lines (579 loc) · 20.4 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
/*
* Tigera Labs theme — workshop-instructions surface stylesheet.
*
* Surface-specific styles only. Shared design tokens, dark-mode
* overrides, @font-face declarations, and the Slack support widget
* live in tigera-theme-core.css.
*
* Core is normally linked via workshop-instructions.html (injected by
* the renderer's content-page route). The Hugo-rendered home page
* (e.g. the "Renderer Failed" fallback) bypasses that injection, so
* we also pull core in via @import here to guarantee design tokens
* resolve on every page that loads this file. Browsers dedupe the
* duplicate load on content pages.
*/
@import url("/workshop/static/theme/tigera-theme-core.css");
/* ---------- self-hosted fonts ----------
The renderer iframe serves theme assets at /workshop/static/theme/<name>. */
/*
* workshop-instructions.css — Tigera Labs theme (corporate / light)
*
* Mirrors docs.tigera.io: white background, Tigera Black text, DM Sans
* prose, JetBrains Mono code blocks with a pale-grey background and an
* orange left-bar for executable actions. Inline links are cerulean blue
* (#1084BD). No editorial all-caps; sentence case throughout.
*/
/* ---------- dark mode ----------
Driven by the dashboard via postMessage in workshop-instructions.js,
which sets data-theme="dark" on <html>. */
html[data-theme="dark"] code {
background-color: #232328;
border-color: var(--doc-mercury);
}
html[data-theme="dark"] pre {
background-color: #16161a;
}
html[data-theme="dark"] .copyable-action,
html[data-theme="dark"] .execute-action,
html[data-theme="dark"] .execute-1-action,
html[data-theme="dark"] .execute-2-action,
html[data-theme="dark"] .execute-all-action {
background-color: #16161a;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.18);
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.32);
}
html, body {
background-color: var(--doc-bg);
color: var(--doc-fg);
font-family: var(--font-sans);
font-size: 18px;
line-height: 1.65;
-webkit-font-smoothing: antialiased;
}
::selection {
background-color: var(--doc-accent);
color: #fff;
}
/* ---------- headings ---------- */
h1, h2, h3, h4 {
font-family: var(--font-sans);
font-weight: 700;
letter-spacing: -0.01em;
color: var(--doc-fg);
}
h1 {
font-weight: 900;
font-size: 38px;
letter-spacing: -0.02em;
margin: 1.25rem 0 0.75rem;
line-height: 1.15;
}
h2 {
font-size: 28px;
margin: 2rem 0 0.75rem;
padding-bottom: 0.4rem;
border-bottom: 1px solid var(--doc-mercury);
}
h2::before { content: none; } /* reset the editorial slab from the obsidian theme */
h3 { font-size: 22px; margin: 1.5rem 0 0.5rem; }
h4 { font-size: 19px; margin: 1.25rem 0 0.4rem; }
/* ---------- text ---------- */
p {
color: var(--doc-fg);
max-width: 75ch;
}
a {
color: var(--doc-link);
text-decoration: underline;
text-underline-offset: 2px;
text-decoration-thickness: 1px;
font-weight: 500;
}
a:hover {
color: var(--doc-accent);
text-decoration-color: var(--doc-accent);
}
strong { color: var(--doc-fg); font-weight: 700; }
em { color: var(--doc-fg); }
hr {
border: none;
height: 1px;
background-color: var(--doc-mercury);
margin: 2rem 0;
}
/* ---------- inline + block code ---------- */
code, pre, kbd, samp {
font-family: var(--font-mono);
}
code {
background-color: var(--doc-bg-alt);
color: var(--doc-fg);
padding: 0.12em 0.4em;
border-radius: 3px;
font-size: 0.92em;
border: 1px solid var(--doc-mercury);
}
a code { color: var(--doc-link); border-color: rgba(16, 132, 189, 0.25); }
pre {
background-color: var(--doc-bg-elevated);
color: var(--doc-fg);
border: 1px solid var(--doc-mercury);
border-radius: var(--doc-radius);
padding: 0.85rem 1rem;
overflow-x: auto;
font-size: 15px;
line-height: 1.6;
}
pre code {
background: transparent;
padding: 0;
font-size: inherit;
border: none;
}
/* Educates "click-to-run" action blocks */
.copyable-action,
.execute-action,
.execute-1-action,
.execute-2-action,
.execute-all-action {
background-color: var(--doc-bg-elevated);
border: 1px solid var(--doc-mercury);
border-left: 3px solid var(--doc-accent);
border-radius: var(--doc-radius);
font-family: var(--font-mono);
position: relative;
}
.copyable-action::before,
.execute-action::before,
.execute-1-action::before,
.execute-2-action::before,
.execute-all-action::before {
content: 'EXECUTE';
position: absolute;
top: 6px;
right: 10px;
font-family: var(--font-sans);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
color: var(--doc-accent);
text-transform: uppercase;
}
/* ===========================================================================
Renderer chrome overrides — inner workshop iframe page-header & header buttons.
Mirrors the dashboard's #workarea-navbar-div so the inner navbar (Hugo's
.header.page-navbar) and the outer dashboard tab strip read as one
continuous toolbar instead of competing surfaces. All colours flow from the
--surface-* / --on-surface-* tokens so dark-mode follows the cascade with
no extra rules.
=========================================================================== */
.header.page-navbar,
.header.page-navbar.bg-primary,
.bg-primary {
background: var(--surface-card) !important;
background-image: none !important;
border-bottom: 1px solid var(--surface-mercury) !important;
padding: 0 16px !important;
color: var(--on-surface) !important;
}
/* Match #workarea-navbar-div's row height (~48px) and force the home button
to the left, the prev/toc/print/next group to the right. */
.header.page-navbar .row,
.header.page-navbar .row > .col-sm-12 {
display: flex !important;
align-items: center !important;
min-height: 48px !important;
}
.header.page-navbar .row > .col-sm-12 {
justify-content: space-between !important;
}
.header,
.header a,
.header .logo {
color: var(--on-surface) !important;
font-family: var(--font-sans);
}
.header a:hover { color: var(--on-surface) !important; }
/* Mirror #workarea-controls .btn — transparent square buttons, muted glyph,
--surface-alt on hover. Includes .btn-group-sm so the inner Bootstrap
group doesn't shrink the icons. */
.header .btn,
.header button.btn-transparent,
.header .btn-group-sm > .btn {
background: transparent !important;
color: var(--on-surface-muted) !important;
border: none !important;
border-radius: var(--radius) !important;
padding: 8px 10px !important;
font-size: 14px !important;
line-height: 1 !important;
transition: color 120ms ease, background-color 120ms ease !important;
}
.header .btn:hover,
.header button.btn-transparent:hover,
.header .btn-group-sm > .btn:hover {
background-color: var(--surface-alt) !important;
color: var(--on-surface) !important;
}
.header .btn:focus,
.header button.btn-transparent:focus {
outline: none !important;
box-shadow: none !important;
}
.header .btn:disabled,
.header .btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.header .fa-inverse,
.header span.fas { color: inherit !important; }
/* Home button rebranded as Tigera wordmark — pure-CSS swap (no JS, no
flash). Hugo renders <button id="header-goto-home"> with a child
<span class="fas fa-home"> glyph; we hide that glyph and paint the
Tigera logo on the button itself via background-image. Longhand
properties so the .header .btn-group-sm > .btn:hover surface-alt
background-color still applies on hover. */
#header-goto-home {
padding: 4px 10px !important;
}
/* Render the Tigera logo as image *content* on the home glyph instead of a
background on the button. A content: url() image is a replaced element
with intrinsic size, so the button grows to fit it — no clipping like the
background approach, and it scales crisply. */
#header-goto-home > .fas {
content: url(/workshop/static/theme/Tigera-logo.svg) !important;
display: inline-block !important;
height: 36px !important;
width: auto !important;
vertical-align: middle !important;
/* Logo is taller than the toolbar row; negative vertical margin lets it
render big while the nav bar keeps its original height (no reflow). */
margin: -9px 0 !important;
}
html[data-theme="dark"] #header-goto-home {
filter: brightness(0) invert(1);
}
/* ---------- Bootstrap utilities used by Hugo / failure pages ---------- */
.btn-primary {
background: linear-gradient(135deg, var(--tigera-orange-start) 0%, var(--tigera-orange-end) 100%) !important;
border: none !important;
color: #fff !important;
font-family: var(--font-sans);
font-weight: 700;
border-radius: var(--doc-radius) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
filter: brightness(1.05);
background: linear-gradient(135deg, var(--tigera-orange-start) 0%, var(--tigera-orange-end) 100%) !important;
box-shadow: 0 6px 18px rgba(231, 109, 43, 0.25) !important;
}
.btn-secondary {
background-color: transparent !important;
border: 2px solid var(--on-surface) !important;
color: var(--on-surface) !important;
border-radius: var(--doc-radius) !important;
}
.text-primary { color: var(--doc-accent) !important; }
.border-primary { border-color: var(--doc-accent) !important; }
/* ---------- Dark-mode rescue for renderer wrappers ----------
Educates' executable-code runtime wraps each <pre> in a <div> at runtime
(e.g. .execute-action, .copyable-action), and Hugo's chroma can wrap code
in <div class="highlight">. Some default Bootstrap utility backgrounds
(.bg-info / .bg-light / .alert-info) or default chroma class colours leak
through and read as a light-blue slab in dark mode. Force every wrapper-div
under .rendered-content to use our --surface-elevated token so code blocks
stay dark and legible. */
html[data-theme="dark"] .rendered-content > div,
html[data-theme="dark"] .rendered-content .highlight,
html[data-theme="dark"] .rendered-content .execute-action,
html[data-theme="dark"] .rendered-content .copyable-action,
html[data-theme="dark"] .rendered-content [class*="execute-"],
html[data-theme="dark"] .rendered-content .bg-info,
html[data-theme="dark"] .rendered-content .bg-light,
html[data-theme="dark"] .rendered-content .alert-info,
html[data-theme="dark"] .rendered-content .alert-light {
background-color: var(--surface-elevated) !important;
color: var(--on-surface) !important;
border-color: var(--surface-mercury) !important;
}
html[data-theme="dark"] .rendered-content > div pre,
html[data-theme="dark"] .rendered-content > div code {
background-color: var(--surface-elevated) !important;
color: var(--on-surface) !important;
}
/* ---------- Admonitions (light corporate variants) ---------- */
.admonition.note,
.admonition.info {
background-color: var(--doc-callout-info-bg) !important;
color: var(--doc-fg) !important;
border: 1px solid rgba(16, 132, 189, 0.20) !important;
border-left: 4px solid var(--doc-callout-info) !important;
border-radius: var(--doc-radius) !important;
padding: 14px 18px !important;
}
.admonition.warning {
background-color: var(--doc-callout-warn-bg) !important;
color: var(--doc-fg) !important;
border: 1px solid rgba(217, 119, 6, 0.20) !important;
border-left: 4px solid var(--doc-callout-warn) !important;
border-radius: var(--doc-radius) !important;
padding: 14px 18px !important;
}
.admonition.danger,
.admonition.error {
background-color: var(--doc-callout-danger-bg) !important;
color: var(--doc-fg) !important;
border: 1px solid rgba(220, 38, 38, 0.20) !important;
border-left: 4px solid var(--doc-callout-danger) !important;
border-radius: var(--doc-radius) !important;
padding: 14px 18px !important;
}
.admonition .admonition-title {
font-family: var(--font-sans) !important;
font-size: 15px !important;
font-weight: 700 !important;
letter-spacing: 0.02em !important;
text-transform: none !important;
color: var(--doc-callout-info) !important;
margin-bottom: 0.4rem !important;
}
.admonition.warning .admonition-title { color: var(--doc-callout-warn) !important; }
.admonition.danger .admonition-title,
.admonition.error .admonition-title { color: var(--doc-callout-danger) !important; }
/* ---------- Hugo theme menu / table of contents ---------- */
.menu,
.menu .modules {
font-family: var(--font-sans);
color: var(--doc-fg);
}
.menu .category-title {
font-family: var(--font-sans) !important;
font-size: 14px !important;
font-weight: 700 !important;
letter-spacing: 0.02em !important;
text-transform: none !important;
color: var(--doc-muted) !important;
}
.menu .category.active .category-title {
color: var(--doc-accent) !important;
}
.menu a {
color: var(--doc-soft) !important;
text-decoration: none !important;
}
.menu a:hover,
.menu .active > a {
color: var(--doc-accent) !important;
}
/* ---------- Modals (table-of-contents dialog, image preview, etc.) ---------- */
.modal-content {
background: var(--doc-bg-card) !important; /* white modals against cream body */
color: var(--doc-fg) !important;
border: 1px solid var(--doc-mercury) !important;
border-radius: var(--doc-radius) !important;
}
.modal-header,
.modal-footer {
background: var(--doc-bg-alt) !important;
border-color: var(--doc-mercury) !important;
}
.modal-title {
font-family: var(--font-sans);
font-weight: 700;
letter-spacing: -0.01em;
color: var(--doc-fg);
}
.modal .btn-close { opacity: 0.5; }
.modal .btn-close:hover { opacity: 1; }
/* ---------- Page-meta footer ---------- */
.page-meta,
.page-meta.clearfix {
background-color: transparent;
border: none;
padding: 1rem 0;
}
/* ---------- lists ---------- */
ul, ol { color: var(--doc-fg); }
li::marker { color: var(--doc-accent); }
li + li { margin-top: 0.25rem; }
/* ---------- tables ---------- */
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
border-radius: var(--doc-radius);
overflow: hidden;
border: 1px solid var(--doc-mercury);
}
th {
background-color: var(--doc-bg-alt);
color: var(--doc-fg);
font-family: var(--font-sans);
font-size: 15px;
font-weight: 700;
letter-spacing: 0;
text-transform: none;
text-align: left;
padding: 10px 14px;
border-bottom: 1px solid var(--doc-mercury);
}
td {
background-color: var(--doc-bg-card); /* white rows on cream body */
color: var(--doc-fg);
padding: 10px 14px;
border-top: 1px solid var(--doc-mercury);
}
/* ---------- images ---------- */
img {
max-width: 100%;
height: auto;
border-radius: var(--doc-radius);
}
/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(35, 31, 31, 0.18); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(35, 31, 31, 0.32); }
/* ===========================================================================
.page-content panel — Educates' renderer ships its own hard-coded
colour scheme for this wrapper (background #FAFAFA, lightyellow code
blocks, #222 headings, #999 meta-link border). Out-of-the-box that
reads as a glaring near-white slab on our cream body, and it doesn't
flip in dark mode. Override every hard-coded value to use our theme
variables — keeps the visual frame (Notion / Stripe Docs feel) but
colours adapt to light/dark.
Source: workshop-images/base-environment/opt/renderer/src/frontend/styles/educates.css
=========================================================================== */
.page-content {
background-color: var(--doc-bg-card) !important;
color: var(--doc-fg) !important;
border: 1px solid var(--doc-mercury) !important;
border-radius: var(--doc-radius);
box-shadow: 0 4px 20px rgba(35, 31, 31, 0.08) !important;
padding: 28px !important;
margin: 12px 0 !important;
}
html[data-theme="dark"] .page-content {
border-color: rgba(255, 255, 255, 0.06) !important;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.40) !important;
}
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
color: var(--doc-fg) !important;
}
/* Inline code — drop the lightyellow + use our theme bg. */
.page-content code {
color: var(--doc-fg) !important;
background-color: var(--doc-bg-alt) !important;
border: 1px solid var(--doc-mercury) !important;
}
/* Block code — drop the lightyellow + match our pre styling. */
.page-content pre {
background: var(--doc-bg-elevated) !important;
color: var(--doc-fg) !important;
border: 1px solid var(--doc-mercury) !important;
padding: 0.85rem 1rem !important;
border-radius: var(--doc-radius) !important;
white-space: pre-wrap;
word-break: keep-all;
}
html[data-theme="dark"] .page-content pre {
background-color: #16161a !important;
}
.page-content pre code {
color: var(--doc-fg) !important;
background: transparent !important;
border: none !important;
}
/* Inline images inside the panel — drop the white wrapper-square. */
.page-content img {
background: transparent !important;
border: 1px solid var(--doc-mercury) !important;
}
/* Page meta (prev/next nav) */
.page-content .page-meta {
color: var(--doc-muted) !important;
}
.page-content .page-meta a {
color: var(--doc-muted) !important;
border-bottom-color: var(--doc-muted) !important;
}
.page-content .page-meta a:hover {
color: var(--doc-accent) !important;
border-bottom-color: var(--doc-accent) !important;
}
/* ===========================================================================
OS-preference dark fallback — eliminates the FOUC on the workshop-
instructions iframe.
The iframe's core JS only runs at end-of-body (Hugo footer partial
doesn't inject workshop-instructions.html into <head>), so on first
paint there is no `data-theme` attribute on <html> yet. The CSS
variables in tigera-theme-core.css already flip via a sibling
`prefers-color-scheme: dark` media block, but the hardcoded
overrides above (`html[data-theme="dark"] X`) wouldn't activate
without the attribute — leaving code blocks, scrollbars, page-
content shadow, etc. light until JS runs.
This block mirrors every dark-mode rule above with
:root:not([data-theme="light"]) so the styles apply when OS prefers
dark AND the user hasn't explicitly cookied/localStorage'd "light".
When JS finally sets data-theme="dark" the original rules continue
to match — no visible change. When JS sets "light", the :not()
guard fails here and these rules drop out cleanly.
=========================================================================== */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) code {
background-color: #232328;
border-color: var(--doc-mercury);
}
:root:not([data-theme="light"]) pre {
background-color: #16161a;
}
:root:not([data-theme="light"]) .copyable-action,
:root:not([data-theme="light"]) .execute-action,
:root:not([data-theme="light"]) .execute-1-action,
:root:not([data-theme="light"]) .execute-2-action,
:root:not([data-theme="light"]) .execute-all-action {
background-color: #16161a;
}
:root:not([data-theme="light"]) ::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.18);
}
:root:not([data-theme="light"]) ::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.32);
}
:root:not([data-theme="light"]) #header-goto-home {
filter: brightness(0) invert(1);
}
:root:not([data-theme="light"]) .rendered-content > div,
:root:not([data-theme="light"]) .rendered-content .highlight,
:root:not([data-theme="light"]) .rendered-content .execute-action,
:root:not([data-theme="light"]) .rendered-content .copyable-action,
:root:not([data-theme="light"]) .rendered-content [class*="execute-"],
:root:not([data-theme="light"]) .rendered-content .bg-info,
:root:not([data-theme="light"]) .rendered-content .bg-light,
:root:not([data-theme="light"]) .rendered-content .alert-info,
:root:not([data-theme="light"]) .rendered-content .alert-light {
background-color: var(--surface-elevated) !important;
color: var(--on-surface) !important;
border-color: var(--surface-mercury) !important;
}
:root:not([data-theme="light"]) .rendered-content > div pre,
:root:not([data-theme="light"]) .rendered-content > div code {
background-color: var(--surface-elevated) !important;
color: var(--on-surface) !important;
}
:root:not([data-theme="light"]) .page-content {
border-color: rgba(255, 255, 255, 0.06) !important;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.40) !important;
}
:root:not([data-theme="light"]) .page-content pre {
background-color: #16161a !important;
}
}