Bugfix: Why did 15+ widget preview components render with invisible/...

Documentation for Sessions

🐛 Bugfix: Why did 15+ widget preview components render with invisible/...

Date: 2026-03-24
Time: 17:37:04 UTC
Session: gspace1-131.3
Agent: angular
Confidence: 97%
Status: ✅ Documented


📋 Decision Context

Question:

Why did 15+ widget preview components render with invisible/broken colors on the white page builder canvas?

Task: Page builder production readiness — widget theme fixes


🎯 Decision Made

Chosen:

Systematically converted all rgba(255, 255, 255, *) patterns in widget preview stylesheets to rgba(0, 0, 0, *) equivalents, plus set canvas area color: #1f2937 to override inherited dark-theme white text

Options Considered:

  1. Convert all widgets to use CSS variables for theming
  2. Add a dark/light mode toggle to the canvas
  3. Override at the canvas level with CSS specificity
  4. Systematically convert each widget's hardcoded colors

💭 Reasoning

Root cause: All widget preview components were authored for a dark-themed parent UI (the GoGrab Space app shell uses dark backgrounds). They used white-based rgba colors for text, borders, backgrounds, and accents — e.g., rgba(255, 255, 255, 0.8) for text, rgba(255, 255, 255, 0.1) for borders. When the page builder canvas was white (#ffffff), this produced invisible white-on-white text, invisible borders, and ghost elements. Additionally, widgets inherited color: white from the parent dark-themed container through CSS inheritance. The fix was two-pronged: (1) canvas-level: set color: #1f2937 on .page-canvas__area to reset inherited text color for all child widgets, and (2) widget-level: convert each widget's preview stylesheet from dark-theme to light-canvas-compatible colors. Files affected: table, image, input, select, textarea, checkbox, radio, alert, accordion, tabs, container, section, badge, progress, spacer preview components (15 files total). Careful analysis ensured white text on intentionally colored backgrounds (buttons, checkmarks, progress bars) was preserved.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation