RCA-2026-04-01-001: Analysis
Root Cause
5 Whys Analysis
| Why # | Question and Answer |
|---|---|
1 |
Why did white containers appear despite having a dark theme CSS? |
2 |
Why were those elements missed? |
3 |
Why wasn’t the full DOM tree mapped? |
4 |
Why didn’t the initial developer inspect the full element hierarchy? |
5 |
Why is there no reference for the Antora default UI DOM tree? |
|
Root Cause Statement: The supplemental dark theme CSS targeted AsciiDoc content elements and high-level layout components without covering the intermediate wrapper elements generated by the Antora default UI bundle. Additionally, AsciiDoc renders admonitions as |
Technical Deep Dive
Antora Default UI DOM Hierarchy
The Antora default UI generates the following nesting structure. Bold elements were missing dark-theme rules:
<html> β .dark-theme applied here
<body> β styled β
<nav class="navbar"> β styled β
<div class="body"> β MISSING
<div class="nav-container"> β styled β
<div class="nav-panel-explore"> β MISSING
<div class="main"> β MISSING
<div class="toolbar"> β MISSING
<nav class="breadcrumbs"> β MISSING
<div class="edit-this-page"> β MISSING
<div class="content"> β MISSING
<article class="doc"> β styled β
<aside class="toc"> β styled β
<footer> β styled β
Admonition Table Inheritance
AsciiDoc admonitions render as:
<div class="admonitionblock note"> <!-- styled β -->
<table> <!-- inherited general table bg -->
<tbody>
<tr> <!-- inherited tr:nth-child bg -->
<td class="icon"> <!-- styled β -->
<td class="content"> <!-- styled β -->
The general .dark-theme table rule set background-color: var(--domus-mantle) and .dark-theme table tr:nth-child(even) set background-color: var(--domus-crust). These applied inside admonitions, creating visible color differences against the admonition’s own var(--domus-mantle) background.
FOUC (Flash of Unstyled Content)
The theme toggle JavaScript lived exclusively in footer-scripts.hbs, executing after the full page rendered. On dark-preference systems, the page briefly displayed in white before the script added .dark-theme to <html>.
Contributing Factors
| Factor | Description | Preventable? |
|---|---|---|
No DOM tree reference |
Antora does not document its full CSS class hierarchy |
No (upstream) |
Content-first CSS authoring |
CSS targeted AsciiDoc semantic classes instead of UI bundle structural classes |
Yes |
Admonition table reuse |
AsciiDoc’s |
Yes |
Footer-only theme script |
No |
Yes |