Hi everyone,
I would like to propose adding support for Light, Dark, and System Theme preferences to the MIT App Inventor web interface.
Background & Motivation
Currently, while Blockly editor theming has seen improvements, the overall App Inventor web shell, navigation panels, and dialogs remain light-only. Many students, educators, and developers work in low-light conditions or have system-level dark mode enabled on their devices. Supporting automatic detection (prefers-color-scheme) along with an explicit UI toggle will greatly reduce eye strain and improve accessibility.
Proposed Approach
- CSS Custom Properties (
theme.css): Introduce centralized design tokens (--ai-*) on:rootthat adapt to@media (prefers-color-scheme: dark)and support manual overrides viadata-themeattributes. - Theme Manager & UI Toggle (
theme-toggle.js): A lightweight script to handlelocalStoragepersistence, live OS scheme changes, and a toggle button in the top navigation bar. - Entry Point Integration (
index.jsp): Add<meta name="color-scheme" content="light dark">and non-intrusively load the new theme assets.
Design Document
I have written a brief design document outlining the architecture, mockups, scope, and testing plan:
Read the Design Document Here
(Google Doc permissions are set to "Anyone with the link can comment")
I would really appreciate any feedback, suggestions, or concerns from the maintainers and the community before moving forward with the implementation.
Thank you!