Problem/Motivation
The Display Builder UI uses Shoelace's own look: zinc neutrals, a sky blue accent, Bootstrap Icons and animated tooltips. Next to Drupal's Default Admin theme and the Navigation module it looks like a different product. That theme family uses Phosphor icons, its own semantic color variables (including a site's own accent color), its own button and tab styles, and tooltips that are not animated.
Some of the current styles also had accessibility problems:
- Shoelace's
--sl-color-primary-600on an active tab label gives a 4.10:1 contrast on the toolbar background. That is below WCAG AA, and axe reports it as a serious violation. - Contextual tabs inside a collapsed sidebar get scroll buttons. These are
aria-hiddenbut contain a focusable button (axe:aria-hidden-focus), and they keep the tab row overflowing after the sidebar opens.
Steps to reproduce
- Use Default Admin as the admin theme, with the Navigation module enabled.
- Open any display builder (entity view display, page layout or Views).
- Compare the toolbar, buttons, tabs, menus, icons and tooltips with the rest of the admin UI, in both light and dark mode.
Proposed resolution
- Shoelace theme mapped to Default Adminss/shoelace_admin_theme.css, attached to the
shoelacelibrary and loaded after Shoelace's lig- It rebuilds the neutral, primary and status scales, and maps the radius, elevation, spacing, motion, typography, focus ring, form control
and overlay tokens. - Every value reads a semantic
--admin-color-*variable first. If that variable is missing, it falls back to the admin theme's
own value throughlight-dark(). The fallback is r routes are not admin routes, so the admin theme's variablesare often not on the page. Only semantic variables are read, never primitives, as the admin theme's module compatibility guide asks. - Shoelace's named palettes (used as node identity coft unchanged.
- It rebuilds the neutral, primary and status scales, and maps the radius, elevation, spacing, motion, typography, focus ring, form control
- Phosphor icons: add a new
assets/js/shoelace_admin.jsthat registers Phosphor (@phosphor-icons/core
2.1.1) as Shoelace'sdefaultandsystem</c <ul> <li>Icon weights are set with a name suffix, for example>.</li> <li>Bootstrap Icons names the module used before are aliased to their Phosphor equivalents, so existing third-party island plugins still show an icon.</li> <li>All module icons (islands, twig templates, JS, storor names.</li> <li>The same script turns off Shoelace's tooltip show a Navigation module does.</li> </ul> </li> <li><strong>Component styling</strong>, following Default Admin: <ul> <li>Icon-only buttons are square and drawn as ghost butidebar toggle is.</li> <li>The main view tabs in the toolbar are pills, as Default Admin's primary tabs are. Other tabs are underlined secondary tabs.</li> <li>Menus, toggle menu items (always drawn with a checkanel, the summary hover chrome, dropzones, placeholders, layers and the sidebar are restyled.</li> </ul> </li> <li><strong>Accessibility</strong>: <ul> <li>The active tab label uses the admin accent: about<code>#015efe.
- Contextual tabs set
no-scroll-controls
- The Phosphor path is passed to the JS through
drupalSettings.displayBuilder.phosphorPath. It points to the CDN in_shoelace_cdnand to/libraries/phosphorin_shoelace_local. LibrariesSwitchernow handles its CDN/- GitLab CI and the GitHub Playwright workflow install Phosphor next to Shoelace and htmx-ext-sse, and the CI cache key includes its version.
docs/install.mddocuments the local in
Remaining tasks
- Review
- Manual testing in light and dark mode on admin routes (nd theme routes (entity view display, page layout)
- Check with a custom admin accent color
- Run the Playwright accessibility tests
- Default Admin is still experimental: check
core/themes/default_admin/css/_variables/variables-color-semantic.cssagain when core is updated
User interface changes
The builder now looks like the Default Admin theme, using its colors (including a site's own accent color), radii, shadows, spacing and typography. In detail:
- Icons change from Bootstrap Icons to Phosphor.
- Icon buttons are square ghost buttons.
- The main view tabs are pills.
- Tooltips are not animated.
- The active tab label meets the WCAG AA contrast ratio.
Screenshots: TBD
API changes
- The island plugin
iconproperty now takes a Phosphor icon name, with an optional weight suffix (-fill,-bold,-light,-thin,-duotone). The Bootstrap Icons names the module used before are aliased, so this is backwards compatible for them. Bootstrap-only names that are not aliased will no longer show an icon. - The default value of the
iconprop on the e> component changes fromwindowtobrowser. - New
drupalSettings.displayBuilder.phosphorPathsetting. - When local libraries are used (
_shoelace_local</cstalled in <code>web/libraries/phosphor. Seedocs/install.md.
Data model changes
None.
| Comment | File | Size | Author |
|---|
Issue fork display_builder-3627705
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
yannickooComment #3
yannickooComment #6
pdureau commentedA quick win:
Before:

After:

This is the kind of improvements we can get.
Once we remove the existing custom code, it is easy to tweak to reduce padding for example.
Comment #7
andres alvarez commentedComment #8
andres alvarez commentedThe pipeline was red because of two Playwright specs and now passes. "Move tests" failed on Chromium because the drag helper didn't reach the target when autoscroll fell short. In "Builder chrome in the iframe" the test compared the token's text instead of the resolved color, and fixing that exposed a real bug:
mirror()didn't copycolor-schemeto the iframe, so in dark mode its chrome stayed light. I added that line inbuilder_frame.js; side effect: with the iframe oncolor-scheme: dark, native page controls (a plain<button/>;, for example) also render dark, so if you'd rather scope it to the builder's chrome elements, that's an easy change.Comment #9
yannickooHey andres alvarez! Thanks for adding your commits to the MR!
I am wondering a bit about the iframe adjustments. I think site builders expect that the admin UI color scheme can be changed but that shouldn't affect the preview since that relies on other settings.
In future we might remove the theme switcher and rely on the Default Admin color scheme which is another reason to not pass the color scheme to the iframe itself.
Comment #10
yannickoo