Draft
Add multi-theme system with franchise-inspired themes and intro animations#8
Conversation
…tions Co-authored-by: hutoczky <5453461+hutoczky@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add multi-theme system to documentation site
Add multi-theme system with franchise-inspired themes and intro animations
Oct 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a comprehensive multi-theme system for the FormatX docs site, featuring four franchise-inspired themes with unique intro animations, persistent storage, and full accessibility support.
Features
🎨 Four Franchise Themes
Each theme includes carefully crafted color schemes inspired by popular sci-fi franchises:
LCARS (Default) - Star Trek inspired
Cyberpunk 2077 - Neon dystopia
Star Wars - Space opera elegance
Stargate - Ancient technology
🎬 Intro Animations
Each theme features a unique, franchise-appropriate intro animation:
prefers-reduced-motionuser preferences🎛️ Theme Selector UI
A persistent, user-friendly theme selector appears in the bottom-right corner:
♿ Accessibility
Fully accessible implementation:
role,aria-label,aria-checkedon all interactive elements💾 Persistence
Theme preferences are saved using localStorage:
fx-franchise-theme: Stores selected theme IDfx-theme-selector-minimized: Stores selector minimized state🔧 Developer API
Public JavaScript API for programmatic theme control:
Implementation Details
Architecture
The theme system uses a clean separation of concerns:
themes.css: Theme definitions, intro animations, and selector UI stylestheme-loader.js: Dynamic CSS injection, theme switching logic, and UI generationindex.html: Simple script inclusion in the headThemes are applied via a
data-franchise-themeattribute on the<html>element, allowing CSS custom properties to cascade throughout the document.Technical Approach
themes.cssis loaded via JavaScript to avoid blocking initial page renderTesting
All automated tests pass (23/23):
Browser Compatibility
Supports all modern browsers:
Files Changed
docs/themes.css(513 lines)docs/theme-loader.js(277 lines)docs/index.html(+1 line for script inclusion)Total addition: ~19 KB uncompressed, no breaking changes.
Screenshots
The theme selector appears in the bottom-right corner with visual theme previews. Each theme completely transforms the site's color scheme while maintaining readability and accessibility.
This implementation provides a delightful, accessible theming experience that respects user preferences while adding visual interest through franchise-inspired aesthetics.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.