Skip to content

Commit f7a9cc1

Browse files
ofriwclaude
andcommitted
Extract presentation system CSS to shared file
Move Reveal.js global overrides (typography, layout, dark mode CSS variables) from RevealSlideshow.module.css to dedicated /website/src/styles/presentation-system.css. This centralizes presentation styling and eliminates duplication. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6130928 commit f7a9cc1

File tree

3 files changed

+450
-128
lines changed

3 files changed

+450
-128
lines changed

website/src/components/PresentationMode/RevealSlideshow.module.css

Lines changed: 11 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
}
151151

152152
.caption {
153-
font-size: clamp(0.8rem, 1.5vw, 0.95em);
153+
font-size: clamp(0.75rem, 1vw, 0.85em);
154154
line-height: 1.4;
155155
color: #e0e0e0;
156156
margin-top: 0.5em;
@@ -299,11 +299,15 @@
299299
align-items: center;
300300
overflow: visible;
301301
width: 100%;
302+
height: 100%;
303+
max-height: 100%;
302304
transform-origin: center center;
303305
}
304306

305307
.visualContainer > * {
306308
object-fit: contain;
309+
max-width: 100%;
310+
max-height: 100%;
307311
}
308312

309313
.takeawayList {
@@ -478,130 +482,9 @@
478482
padding: 2em;
479483
}
480484

481-
/* Override Reveal.js theme colors to match course design */
482-
:global(.reveal) {
483-
font-family: var(--ifm-font-family-base);
484-
}
485-
486-
:global(.reveal h1),
487-
:global(.reveal h2),
488-
:global(.reveal h3),
489-
:global(.reveal h4) {
490-
font-family: var(--ifm-font-family-base);
491-
font-weight: 700;
492-
}
493-
494-
:global(.reveal h1) {
495-
font-size: clamp(2.5rem, 4.5vw, 3em);
496-
color: var(--ifm-color-primary);
497-
max-width: 90%;
498-
margin-left: auto;
499-
margin-right: auto;
500-
word-wrap: break-word;
501-
}
502-
503-
:global(.reveal h2) {
504-
font-size: clamp(1.2rem, 2.5vw, 1.5em);
505-
color: var(--ifm-color-primary);
506-
max-width: 90%;
507-
margin-left: auto;
508-
margin-right: auto;
509-
word-wrap: break-word;
510-
}
511-
512-
:global(.reveal h3) {
513-
font-size: clamp(1rem, 2vw, 1.3em);
514-
max-width: 90%;
515-
margin-left: auto;
516-
margin-right: auto;
517-
word-wrap: break-word;
518-
}
519-
520-
:global(.reveal .controls) {
521-
color: var(--ifm-color-primary);
522-
}
523-
524-
:global(.reveal .progress) {
525-
background: rgba(0, 0, 0, 0.2);
526-
}
527-
528-
:global(.reveal .progress span) {
529-
background: var(--ifm-color-primary);
530-
}
531-
532-
/* Enable dark mode CSS variables for all components in presentation mode */
533-
:global(.reveal) {
534-
--ifm-font-color-base: #c9d1d9;
535-
--ifm-heading-color: #e6edf3;
536-
--ifm-color-emphasis-700: #8b949e;
537-
--ifm-color-emphasis-600: #6e7681;
538-
--ifm-color-emphasis-300: #3d444d;
539-
--ifm-color-emphasis-200: #30363d;
540-
--ifm-background-color: #0d1117;
541-
--ifm-background-surface-color: #161b22;
542-
543-
/* Visual element colors - adjusted for dark mode */
544-
--visual-workflow: #a78bfa;
545-
--visual-capability: #22d3ee;
546-
--visual-limitation: #fb923c;
547-
--visual-decision: #c4b5fd;
548-
--visual-error: #fb7185;
549-
--visual-neutral: #94a3b8;
550-
551-
/* Visual element backgrounds */
552-
--visual-bg-workflow: rgba(167, 139, 250, 0.15);
553-
--visual-bg-capability: rgba(34, 211, 238, 0.15);
554-
--visual-bg-limitation: rgba(251, 146, 60, 0.15);
555-
--visual-bg-decision: rgba(196, 181, 253, 0.15);
556-
}
557-
558-
/* Fixed layout structure for consistent positioning across slides */
559-
:global(.reveal .slides section) {
560-
max-width: 95%;
561-
margin-left: auto;
562-
margin-right: auto;
563-
height: 100%;
564-
display: flex !important;
565-
flex-direction: column;
566-
justify-content: flex-start;
567-
padding: 1em 0 2.5em 0;
568-
box-sizing: border-box;
569-
}
570-
571-
/* Title area - fixed height and position */
572-
:global(.reveal .slides section > h2) {
573-
margin-top: 0;
574-
margin-bottom: 0.5em;
575-
flex-shrink: 0;
576-
}
577-
578-
/* Title slides have h1 instead */
579-
:global(.reveal .slides section > h1) {
580-
margin-top: 2em;
581-
margin-bottom: 0;
582-
flex-shrink: 0;
583-
}
584-
585-
/* Content area - fills remaining space with natural flow (safe by default) */
586-
:global(.reveal .slides section)
587-
> *:not(h1):not(h2):not(.slideCaption):not(.subtitle) {
588-
flex-grow: 1;
589-
min-height: 0;
590-
}
591-
592-
/* Caption area - fixed at bottom when present */
593-
:global(.reveal) .slideCaption {
594-
margin-top: auto;
595-
margin-bottom: 2em;
596-
flex-shrink: 0;
597-
padding-top: 0.5em;
598-
padding-bottom: 0;
599-
}
600-
601-
:global(.reveal p:not(.slideCaption)),
602-
:global(.reveal ul),
603-
:global(.reveal ol) {
604-
max-width: 90%;
605-
margin-left: auto;
606-
margin-right: auto;
607-
}
485+
/**
486+
* NOTE: Core Reveal.js overrides (typography, layout, dark mode CSS variables)
487+
* have been moved to /website/src/styles/presentation-system.css
488+
*
489+
* This file now contains only component-specific styles for RevealSlideshow.
490+
*/

website/src/css/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* work well for content-centric websites.
55
*/
66

7+
/* Import unified presentation system */
8+
@import '../styles/presentation-system.css';
9+
710
/* ========================================================================
811
AI CODING COURSE - COLOR SYSTEM (Single Source of Truth)
912
========================================================================
@@ -84,6 +87,7 @@
8487
--visual-bg-capability: rgba(6, 182, 212, 0.1); /* Cyan tint */
8588
--visual-bg-limitation: rgba(249, 115, 22, 0.1); /* Rose-orange tint */
8689
--visual-bg-decision: rgba(139, 92, 246, 0.1); /* Light purple tint */
90+
--visual-bg-error: rgba(225, 29, 72, 0.1); /* Rose-red tint */
8791

8892
/* === TYPOGRAPHY & CODE === */
8993
--ifm-code-font-size: 95%;
@@ -153,6 +157,7 @@
153157
--visual-bg-capability: rgba(34, 211, 238, 0.15); /* Cyan tint */
154158
--visual-bg-limitation: rgba(251, 146, 60, 0.15); /* Rose-orange tint */
155159
--visual-bg-decision: rgba(196, 181, 253, 0.15); /* Light purple tint */
160+
--visual-bg-error: rgba(251, 113, 133, 0.15); /* Rose-red tint */
156161

157162
/* === TYPOGRAPHY & CODE === */
158163
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);

0 commit comments

Comments
 (0)