Lessons from the Default Admin SVG revision

These are review lessons from the 2026-11-25 revision, not general proofs. Each item points to evidence in this repository.

  1. An external SVG background does not inherit the element’s currentColor. A currentColor master used as background-image renders its own default paint. Masks take paint from the consuming element; inline SVG inherits CSS colour; pretints are fixed. Classify each consumer before choosing a technique. Evidence: the autocomplete and loader fixes.
  2. <input type="submit"> cannot host a pseudo-element. The sticky action controls are inputs. The historical ::after mask could not render. Use a real wrapper element or, for native controls, a tested pretint. Check the rendered tag, not the CSS intent. Evidence: loader.json records tagName: INPUT and ::after: none.
  3. Theme specificity can invert a sensible cascade. The :is(#extra-specificity-hack, [data-drupal-admin-styles]) wrapper and dark-mode selectors can beat later rules. Dark artwork must be scoped to @media (forced-colors: none), and loading-state padding must match the winning specificity. Compute styles and inspect matched rules; do not rely on source order alone.
  4. A mask’s paint is its background-color, and forced colours can erase it. Setting background-color: CanvasText on the masked pseudo-element kept the status icons visible in Chromium forced-colours emulation. Narrow scope was enough; forced-color-adjust: none was not needed. Test both palettes and record that emulation is not native Windows High Contrast.
  5. Do not measure RTL by toggling dir on a loaded page. The input’s logical padding transitioned through mid-animation values and produced a false 12 px/36 px reading. Serve a fresh document with dir="rtl" and measure physical left and right padding. Evidence: autocomplete-rtl.json.
  6. Pixel-identical SVGO output can still be larger. tabledrag-handle.svg grew by 30 bytes because arc-flag spacing was expanded, despite unchanged pixels. menu.svg grew by 16 bytes from intentional ARIA metadata. Gate optimisation on both pixels and bytes, and report exceptions. Evidence: per-file size changes.
  7. “Adopted”, “smaller” and “new” are different counts. The first summary said 45 SVGs were adopted. Only 41 existing SVGs are smaller; two adopted files are larger and two are new pretints. Define the denominator before quoting a percentage.
  8. A definition is not a consumer. Registry properties must be resolved through alias chains to files, and a literal-reference scan must be separated from rendered use. The audit found zero undefined, missing or unused references only after alias resolution and literal CSS URL handling. Absence of a source reference still does not prove absence of runtime use.
  9. Static harnesses cannot accept interaction-dependent icons. The sticky loader needed Drupal’s real progress markup; the media edit control needed the theme’s real class inside a real selected media item. Record where the fixture or markup was injected. Evidence: loader.json, media.json, component-coverage.md.
  10. GitHub Pages does not list directories. A screenshot directory returns 404 until it has an index.html. Publish galleries as real pages, not bare folders.
  11. Drupal.org issue-fork write access is account-specific. SSH authentication can succeed while the project rejects the push. Preserve both branches, prepare a bundle and the exact push command, and do not rewrite the existing MR branch.
  12. Regenerate published claims when counts change. The revision report, README, handoff, optimization summary and Core Lab summary all carried the old “45 adopted” framing. Keep one per-file source of truth and regenerate every summary that quotes it.
  13. Drupal CSpell enforces US spelling in code comments. colour, colours and grey failed the commit check even though they were only comments. Use color, colors and gray, and run CSpell on changed CSS and Twig before pushing.
  14. Fetch an issue fork before pushing a follow-up. The remote branch already contained an equivalent spelling-fix commit from the lab automation. The push was rejected as non-fast-forward. Compare the content, adopt the remote commit, and never force-push over automated work. Evidence: d4728a2a.