Problem/Motivation
Parent issue #3582351: [Meta] Clean up CSS within Admin theme
In #3582833: Consolidate, refactor, remove and untangle Claro's CSS from Default Admin theme, we consolidated, removed, and refactored 41 Gin specific stylesheets from core/themes/default_admin/migration/css/base into Admin theme's default styles.
This issue is to tackle the rest of them.
Process
- Add a comment on what you're working on
- Do the work
- Verify that linting passes by running
yarn lint:cssfrom thecore/directory. Note you can pass in--fixto automatically fix some issues. - Verify there are no visual changes by using the visual regression tool https://github.com/mherchel/ddev-drupal-admin-vrt. You can also use the https://www.drupal.org/project/theming_tools module to test out specific components.
- Commit the changes to the MR. Be verbose and granular in your commit message
- When completed, add a comment and update the issue summary by marking the line item as completed by replacing the square (🔲) with a checkbox (✅)
Testing steps
This issue is the last mega MR to merge the two CSS codebases in default_admin.
Originally the goal was just to move over and combine the CSS (without fixing any issues). However, with the impending deadline of reaching beta by 11.4, we started fixing some issues including media library, and some dark mode issues. Note that there are still visual bugs remaining.
To test, open the site (with the applied MR) in various browsers, and navigate to various admin interfaces. There might be some remaining bugs, but there should be no regressions from the main branch. A couple spots to spend extra attention toward are media library, and modals, as well as tabledrag interfaces like menus and field UI.
Note that if bugs are found, they may be relegated to followup issues to meet the 11.4 beta deadline.
Migration components (migration/css/components/)
| Migration file | Merge target | Type | Complexity | Notes | |
|---|---|---|---|---|---|
| ✅ | autocomplete |
css/components/autocomplete-loading.module |
Override | Low | Autocomplete dropdown overrides. |
| ✅ | breadcrumb |
css/components/breadcrumb + css/layout/breadcrumb |
Override | Medium | Breadcrumb component + layout overrides. |
| ✅ | ckeditor5 |
css/components/ckeditor5 |
Override | Medium | CKEditor 5 overrides. |
| ✅ | contextual_links |
New: css/components/contextual-links |
Standalone | Low | Contextual links styling. No Claro equivalent. |
| ✅ | description_toggle |
New: css/components/description-toggle |
Standalone | Low | Help icon toggle. No Claro equivalent. |
| ✅ | dialog |
css/components/dialog |
Override | High | Dialog overrides. Must merge with both css/components/dialog and migration/css/theme/dialog. Three source files total. |
| ✅ | edit_form |
New: css/components/edit-form |
Standalone | Low | Edit form layout (sidebar/content regions). |
| ✅ | maintenance_page |
css/theme/maintenance-page |
Override | Medium | Maintenance page overrides. |
| ✅ | media_library |
css/components/media-library.ui + css/theme/media-library |
Override | High | Large file (~525 lines). Overlaps with two Claro files. Grid, modal, dark mode. |
| ✅ | node_preview |
css/components/node-preview |
Override | Medium | Node preview overrides. Backdrop blur, dark mode. |
| ✅ | revisions |
New: css/components/revisions |
Standalone | Low | Revisions page styling. |
| ✅ | settings |
New: css/components/settings |
Standalone | Low | Gin settings panel. |
| ✅ | sidebar |
New: css/components/sidebar |
Standalone | Medium | Sidebar component. Responsive, transitions. |
| ✅ | status |
New: css/components/status |
Standalone | Low | Status message enhancements. |
| ✅ | tableselect |
css/components/tableselect |
Override | Medium | Tableselect/VBO overrides. Sticky, animations. |
2d. Migration layout (migration/css/layout/)
| Migration file | Merge target | Type | Complexity | Notes | |
|---|---|---|---|---|---|
| ✅ | navigation |
New: css/layout/navigation |
Standalone | Medium | Navigation layout. Responsive, many breakpoints. |
| ✅ | top_bar |
New: css/layout/top-bar |
Standalone | Medium | Top bar layout. Responsive. |
| Comment | File | Size | Author |
|---|---|---|---|
| #57 | Screenshot 2026-06-04 at 9.51.49 AM.png | 79.49 KB | bernardm28 |
| #57 | Screenshot 2026-06-04 at 9.52.46 AM.png | 75.3 KB | bernardm28 |
Issue fork drupal-3590364
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:
- 3590364-part-2-of
changes, plain diff MR !15865
Comments
Comment #2
mherchelComment #3
mherchelPostponing this on #3582833: Consolidate, refactor, remove and untangle Claro's CSS from Default Admin theme
Comment #4
lauriiiComment #5
catchSettings tray is on its way out of core so I think the styling for that could be removed outright: #3576667: [meta] Tasks to deprecate Settings Tray
Edit: same for anything to do with toolbar module.
Comment #6
mherchelI'm going to grab dialog, which promises to be a pain in the ass :)
Comment #7
mherchelSome notes on dialog (for posterity)
There are three libraries and three CSS files.
Because css/components/dialog.css gets set to false in the info.yml, the only loaded CSS is below (verified by looking at source). Note the order below is the same as the source order (adjusted by the weight of the CSS within the libraries.yml file)
Comment #8
mherchelI added some in-dialog form elements to https://www.drupal.org/project/theming_tools for testing.
Comment #9
mherchelWhile going through the dialog styles, I went into autocomplete.pcss.css to move stuff over. I also noticed styles meant to override https://www.drupal.org/project/autocomplete_deluxe.
I'm going to yank these out, and I opened an issue in their queue at #3591908: Support Drupal 12 Default Admin (Gin-in-core) styling and add cross-version tests
Comment #10
mherchelCompleted dialog. Removed sooo much unneeded CSS. It looks like the entirety of the form styles were copied in there. I modified https://www.drupal.org/project/theming_tools to output a complex form inside of the modal to ensure that those styles were not needed.
Comment #12
mherchelMoving on to media-library next (doing the hard stuff first)
Comment #13
bernardm28 commentedgetting started on css/components/status
Comment #14
bernardm28 commentedComment #15
mherchelCompleted media-library.
It was so much work.
- The UI is now fixed (not 100% perfect, but definitely 99%)
- I consolidated all the files
- and then I split the files up again into logical subcomponents
- I removed a lot of 'dead' rules that weren't getting applied anywhere
Next up for me is tabs, which is another difficult one.
Comment #16
bernardm28 commentedComment #17
bernardm28 commentedmoving into a medium one, css/components/node-preview.
Comment #19
nitinkumar_7 commentedComment #20
nitinkumar_7 commentedComment #21
nitinkumar_7 commentedComment #22
mherchel@nitinkumar_7 Looking at your previous commit, it looks like you're just appending the one CSS file to the other.
We need a bit more than that. The selectors need to be manually verified within Drupal (to see if they still exist), and they need to be combined and simplified (many have too much specificity)
Comment #23
mherchel@nitinkumar_7 Also your git commit messages are looking like they're AI generated.
Note that the CSS refactoring is not something that AI has been great at (I've attempted to use Claude 4.7 in the previous issue, and it came up lacking). If you're either using AI or are not super familiar with CSS, you might want to refrain from working on this issue, as it could create more work than you're solving.
Comment #24
mherchelPushed up fixes for Tabs. Note that Gin's tabs CSS file also has rules for vertical tabs, as well as the field_group module.
I'm going to continue to work on consolidating the vertical tabs, and then will create an issue in the field_group module to move the code over there.
Comment #25
mherchelMoved the styles for details out of Gin's tabs file.
Still have to move over the vertical-tabs styles and then open an issue for field_group.
Comment #26
mherchelOpened up #3592716: Special styles for "Default Admin" theme in Drupal 12 for the Field Group module.
Comment #27
mherchelCompleted tabs, which took several days, because it involved so many different components. But its done, cleaned up, accessible, and awesome.
Comment #28
mherchelRemoved toolbar integration, since it will be removed for D12
Comment #29
mherchelMoving on to edit_form.pcss.css next
Comment #30
dharizza commentedWorking on maintenance_page.
Comment #31
dharizza commentedCompleted maintenance-page. Starting breadcrumbs.
Comment #32
dharizza commentedFixed pending issue with maintenance page.
Finished with breadcrumbs.
Starting sidebar.
Comment #33
mherchelCompleted edit-form.
Moving to more_actions
Comment #34
mherchelLooks like more actions was already completed.
Going to work on autocomplete
Comment #35
mherchelCompleted autocomplete. Working on ckeditor5
Comment #37
mukeysh commentedCompleted settings
Comment #38
mukeysh commentedComment #39
mukeysh commentedComment #40
mukeysh commentedCompleted sidebar
Comment #41
mherchel@mukeysh Thanks for the work on this!
A couple notes:
Anyway, I'll fix these right now, so no need to do anything.
Comment #42
mherchelRemoving the following items from the IS (since they're not in the migration directory)
Comment #43
mherchelRemoving Settings tray from the IS, since it's being handled in #3586951: Remove Settings Tray integration in Default Admin, keep in Stable 9
Comment #44
mherchelCompleted CKEditor refactor. I also fixed the focus styles to work with forced colors.
Comment #45
mukeysh commented@mherchel
Thank you for the suggestion. I will keep this in mind and make sure to take care of it the next time I make any changes.
Comment #46
mherchelRefactored contextual-links. Moving to description_toggle
Comment #47
mherchelCompleted description_toggle. Fixed issue where the library wasn't even being attached properly. I also fixed some a11y issues.
Comment #48
dharizza commentedWorking on node-preview.
Comment #49
dharizza commentedCompleted node-preview. Starting tableselect.
Btw: it seems like revisions was already done but wasn't marked as such in the ticket description.
Comment #50
dharizza commentedCompleted tableselect.
Comment #51
dharizza commentedCompleted navigation and top_bar.
Removed toolbar from layout section in IS.
Comment #52
mherchelThis is looking really good! I pushed up some fixes, and will come back to this later to fix CI
Comment #53
mherchelGetting settings tray test failures. Putting it back since it's not yet pulled out of core.
Comment #54
mherchelDug in. The settings tray test failures are unrelated. The test loads the stark theme, and the changes that we made to settings tray are just pulling out one styling selector.
Comment #55
mherchelPushed some fixes to Navigation (and removed a lot of dead code) for dark mode.
Tests are passing!
Comment #56
mherchelAdded testing steps.
Comment #57
bernardm28 commentedTwo issues i noticed in safari. That may out of scope and could be a later bug fix.
Other than that, it seems fine. I did not find any other issues.
Comment #58
bernardm28 commentedIt seems like the darkmode issue was already in main so probably out of scope here.
The scrolling toolbar on the Safari media pop up does not seem to be on the main branch though.
Comment #59
bernardm28 commentedThe media issue scroll issue is already addressed at https://www.drupal.org/project/drupal/issues/3590897 and since the other one is inherited this looks good to go.
Comment #60
bernardm28 commentedComment #61
jurgenhaasThis is RTBC +100 from my side. I've tested this extensively and manually. I went through all admin pages, compared everything to the unpatched version, and the only differences that I found have been literally bug fixes. Some of which had been captured in #3592061: List of visual differences between Gin & Admin theme and can now be marked completed.
I did find some issues, where the current rendering differs from Gin 5 on Drupal 11, but those are already broken in main and NOT caused by this MR. All those have been added to the linked issue above as well.
Also tested different screen sizes. Only found one additional issue, also not caused by this MR and added to the other issue. Same applies to dark mode as already mentioned by @bernardm28.
All in all, this MR is a masterpiece of work, and settles the foundation for all the other outstanding work in an outstanding way. Please get this merged asap.
Comment #62
mherchelComment #67
lauriiiThank you all for completing this refactor. What an effort! 👏