Closed (fixed)
Project:
Drupal core
Version:
main
Component:
Admin theme
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
2 Apr 2026 at 12:38 UTC
Updated:
22 Apr 2026 at 18:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mherchelComment #3
mherchelWith Claude Code's help, I added the Sass partials back from the 6.x branch of Gin (these will be removed later), and got them to compile so that the difference in gin.css is minimal.
I then ran the visual regression testing tool against the theme, and all is good. Onto step 3!
Comment #5
mherchelUsed Claude Code's help to convert the Sass media queries to PostCSS. Burning through this!
Note I ran the visual regression testing again to ensure everything is good. I also added RTL support to the visual regression testing.
Comment #6
mherchelContinued progress with Claude Code doing the busy-work! Gin's custom Sass icon management is now refactored out.
As always, I'm running the visual regression tool to ensure no regressions.
Comment #7
mherchelComment #8
mherchelSass functions and variables removed. Visual regression good.
Comment #9
mherchelComment #10
mherchelComment #11
mherchelRefactored out the &-- and &__ from Sass. There was a decent diff in the compiled CSS. I verified that everything looked good in the visual regression testing.
Comment #12
mherchelGot the PostCSS RTL stuff out.
Comment #13
mherchelJust pushed the PostCSS and conversion commits. I want to review the diff in Gitlab, but its currently experiencing issues.
There appears to be some small regressions with the dropbutton that I'll resolve in this MR too.
Comment #14
mherchelThis is so close! I just gotta cleanup some of the visual diff stuff around the dropbutton. Quitting for the day though.
Comment #15
mherchelComment #16
mherchelOK. This is ready to go. There are some visual regressions, but after troubleshooting, I think the issue was caused when the theme was split off from Gin initially. An example of this is
.block-page-title-blockthat had various flex properties set on it, without being set todisplay: flex. This causes a slight margin issue for nested elements. But I believe that since the various flex properties existed, it was supposed to bedisplay: flex.That being said, this is ready to go. Note that the theme's CSS is still really messed up, and default_admin has significant visual regressions from Gin that existed before this MR. We can fix those when we get the CSS cleaned up.
Comment #17
mherchelAdding testing instructions.
Comment #18
nicxvan commentedI'll be honest 92 files +8571 −5663 is a massive MR to review.
As someone who has created massive MRs previously I've always provided steps to reproduce which are not in the issue summary.
I see mentions of "With Claude Code's help," but no real description of which part it did vs you, how would I go about verifying and reproducing your output? I've seen people post the chat log in other issues but I'm not sure if that helps if I'm being honest.
It's kind of hard to see which code is just reorganized, which is modified and what is changed.
What is the visual diff tool and how do I run it?
Why are all of the files called gin, I thought it was supposed to be default admin?
If I run the instructions here https://www.drupal.org/node/3084859 is it expected I would have no diff?
Comment #19
quietone commentedThe visual diff too is mentioned in the parent, comment #5. It is a DDEV add-on https://github.com/mherchel/ddev-drupal-admin-vrt
Comment #20
mherchelI cleared this with @lauriii before I started. I knew it was going to be massive. But there's no other way. TBH, this should have been done way before it was added to Core.
Comment #21
mherchelI had Claude code create individual plans for each step in the issue summary. These are in the git log at https://git.drupalcode.org/project/drupal/-/blob/21d1b1140bc58ac6b8c8d8f... and below
After it created the plan, I went through and reviewed it, modified it as necessary, and proceeded step by step.
After each step, I reviewed the output and diff very carefully, and manually applied fixes.
FWIW, manually doing this would have taken over a week, but with Claude doing the grunt-work, I was able to get through it in about a day. Its a massive undertaking.
Comment #22
mherchelPlease see the testing instructions in the IS. It's much easier to compare with the Sass files that were removed from Gin.
This is also in the IS. https://github.com/mherchel/ddev-drupal-admin-vrt
These files will eventually be removed and refactored. See the parent issue #3582351: [Meta] Clean up CSS
Correct. In fact, if there is a diff, tests would be failing.
Comment #23
nicxvan commentedOk, thank you, let me start with running the visual diff then I can look at the plans copied in.
Having the plans in each commit is nice for reviewing the actual commit, but is pretty painful for replicating since I have to copy the plan from each step.
Comment #24
nicxvan commentedThe visual regression test does not seem to be working.
I followed these steps:
I received this error:
Comment #25
nicxvan commentedHere are all of the plans:
Comment #26
nicxvan commentedI got the VRT command working. I had missed clearing cache after switching branches.
After clearing cache on this branch I ran:
I confirmed the regressions in #3582826-16: Untangle gin.css
I then got yarn installed and updated and removed the
display: flex;incore/themes/default_admin/migration/css/base/gin-regions.csssince that was identified as the cause.I then used watch:css and confirmed
display: flex;no longer was in the compiled css for.block-page-title-blockI cleared cache and ran the following commands again:
I then reviewed the report and the regression is still there. Attached a screenshot.
It's been a long time since I compiled pcss and I've never used the vrt tool before so I may be missing something.
Comment #27
nicxvan commentedI just had a long conversation with @mherchel on zoom.
There are two outstanding code related issues in the MR:
&.--is-processed theadseems to be invalid cssThere is a regression with radio button toggles (see the attached screenshot)
We figured out how to run the VRT in a way that produced more sane results.
We checked out main and added the missing display flex, generated the baseline images, then checked out this branch and ran the report.
That resulted in 37 failures we could manually review.
The failures fell into a few categories.
1. The aforementioned toggle button issue
2. A specificity issue where spacing from help text p tags disappears
3. Something with table spacing causing different wrapping
4. Drop button widths
5. Width of autocomplete boxes
6. Spacing around select boxes
2-6 do not seem like they need to be fixed here, but the toggle buttons need to be fixed as well as the invalid CSS.
We do probably need follow ups for it.
We also need follow ups to review some items in Gin that were not introduced here:
E.g. the use of !important in many places is probably no longer necessary
There are some sections of the copied claro code that cause empty rulesets:
E.g. core/themes/default_admin/css/components/tabs.css
We also noticed that in general buttons are broken, but they are broken on HEAD as well
In general I think some of this should have been resolved before it was merged into core, but it is experimental so larger changes are probably acceptable, @mherchel pointed out that there needs to be at least two more large MRsbeyond this MR to get it up to speed.
I think the above solves my technical concerns.
I do have a couple of other reservations which I am not sure are blocking, but wanted to voice them here.
1. It was fairly involved to find and sift through real regressions, noise and minor regressions that can be follow ups. The initial review had over 100 regressions and it was almost by accident I found the broken toggle buttons. Thankfully we realized if we backported one fix it would solve most of the noise.
2. Even though we have the plans written and the commit history, the output is not reproducible in the same way which means if we uncover something that requires regenerating this it forces retesting the full output and VRT again, we can't just verify the individual piece that needed updating.
3. How does this work with licensing, I'm not sure I've seen a discussion around that.
1 is mitigated by how we ended up testing
2 is mitigated by reviewing the commit history, most of them are fairly small, I reviewed over half, but did not review every commit.
3. I'm not sure this is the issue to answer that, but if someone has a link to a policy on it I'd appreciate it.
Comment #28
mherchelFWIW, the invalid CSS is in fact valid. There's nothing I can find that prevents a CSS class from starting with double dashes, and this was introduced in Gin, and migrated over correctly. See https://git.drupalcode.org/project/gin/-/blob/72fa62a9297696c3c9682e559f...
Whether its correct or not, is another question, But a bit out of scope for this issue.
Comment #29
mherchelThe main issue that we discovered is the toggle buttons. I'll work on those tonight.
Comment #30
mherchelFixed toggle buttons. Also commented out some CSS so that the visual regression testing gets closer.
Comment #31
nicxvan commentedI won't be able to test that fix tonight, but I wanted to comment that you are right the .- is valid https://www.w3.org/TR/CSS2/grammar.html
I think commenting out those changes to get a closer diff makes sense too.
Comment #32
dharizza commentedHi, I followed the test instructions and can report that:
Comment #33
dharizza commentedComment #34
jurgenhaasRTBC+1 from me on this. I used some AI tooling for consistency checks and verified that we haven't lost anything. LGTM.
Comment #35
bernardm28 commentedSo after getting both set up locally and using the DDEV addon.
Comment #36
pameeela commentedThere is one actual regression here compared with main, the hover on secondary buttons is broken:

I have a fix but not sure if I should bump this back now that it is RTBC :) @mherchel how would you prefer to handle this?
Comment #37
nicxvan commentedThat should be fixed I think.
It would be good to see if the vrt can handle hover states eventually.
Comment #38
pameeela commentedPushed my changes. The change to the height fixes an existing bug, but seemed like it was worth improving here.
Before:

After (default):


After (hover):
Comment #39
nicxvan commentedI think the button height was explicitly kept since it was not a regression and this issue is already massive so we could keep the vrt closer and fix the buttons in a follow up.
Comment #40
dharizza commentedI just tested this locally and found the issue of the disappearing text in other pages, after applying the latest changes I can see it back to normal. I think this is working fine, the buttons are all showing up again. Thanks @pameeela! :)
Comment #41
pameeela commentedNo problem @nicxvan, removed the height fix. Thanks @dharizza!
Comment #42
dharizza commentedActually, I just noticed I tested right before the removal of the height fix, when I test with the last commit the hover state is wrong (but it is not wrong in the Block Layout page). Should that be fixed as part of this one? It can be seen in the View and Form mode pages.
It is indeed a regression as I'm not able to reproduce it in the main branch.
Comment #43
pameeela commentedThat's weird, it's working for me on those pages?
Comment #44
dharizza commentedIt is very strange, when I clear the cache I see it working correctly but if I reload then it looks as in the screenshot I sent.
Comment #45
pameeela commentedThat is so strange, I just tested in a few other browsers (using Chrome, but checked FF and Safari which I never use) and it's looking OK in all of them.
Comment #46
mherchelThere's an issue where if you have aggregation on, and clear the cache, it doesn't always load the CSS.
Guess how I know this? 🙃
Anyway, do a
drush theme:dev onto disable aggregation and you're good.Comment #47
dharizza commentedThat makes sense, yes, after doing that it works like a charm! Thank you!
Comment #50
lauriiiThanks for all the manual testing!
Did quick sanity check over the files, ran a check with LLM for consistency, and did some manual testing to check high risk areas in the UI for regressions. I did find plenty of small bugs but none of them were caused by this change ✨
Comment #53
mherchel🙌
Yeah, there's plenty of bugs in here. We'll get to them.
I just went through and granted credit. FYI.