Problem/Motivation
Dropbuttons on forms in conjunction with regular buttons can be misaligned due to discrepancy on the margins top and bottom.
Steps to reproduce
An example is a Feed Channel entity as provided by the Feeds module on a Drupal 9 install with Gin theme active.
The Feed Channel entity features a dropbutton + a regular button.
This can reproduced both using Claro and Gin, who depends on Claro:
![]()

Proposed resolution
The .dropbutton-wrapper CSS that sets margin top and bottom to 0.5rem is provided by Claro
/core/themes/claro/css/components/dropbutton.css?rq2mag
The 1rem margin for .form-actions .action-link is also provided by Claro on core/themes/claro/css/components/form.css
They should be normalized.
Remaining tasks
Decide a solution and implement it.
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | dropButtonFix.png | 16.2 KB | ohjoz |
| #25 | after-patch-claro.png | 17.27 KB | jennakoo |
| #19 | AfterPtach.png | 4.98 KB | nishant |
| #19 | BeforePatch.png | 5.17 KB | nishant |
| #18 | 3341669_18.patch | 1.18 KB | athyamvidyasagar |
Issue fork drupal-3341669
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
royalpinto007Comment #4
royalpinto007I updated the margin values of .form-actions .action-link to match the 0.5rem margin used for .dropbutton-wrapper in the Claro theme's dropbutton.css file. This will ensure that the margins are consistent across both types of buttons.
We can even think of updating the margin values of the .dropbutton-wrapper CSS to match the 1rem margin used for .form-actions .action-link in the Claro theme's form.css file.
Comment #5
nayana_mvr commentedVerified the MR!3470 of #3 and tested it on Drupal version 9.5.x. The patch works fine and I have added the before and after screenshots for reference.
Comment #6
royalpinto007Comment #7
smustgrave commentedChange does seem to fix the issue.
Comment #8
rohan-sinha commentedVerified the merge request on #3, issue has been fixed.
Comment #9
gauravvvv commentedAttached patch for 10.1.x
Comment #10
nayana_mvr commentedVerified the patch #9 and tested it on Drupal version 10.1.x. The patch works fine and I can confirm that the issue is resolved in Drupal 10 version also. Screenshots are same as in #5.
Comment #11
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #12
nod_Patch ans issue version mismatch
Comment #13
smustgrave commentedPutting back to RTBC then.
Comment #15
kunal_sahu commentedHi I tested the above patch 3341669-9-10.1.x.patch , on gin theme. It applied successfully.
I verified it on Gin theme , it works perfectly fine as per the issuefix.
But when i verified it on Claro , seems the patch doesn't work for Claro (Directly). Attaching Screenshots for both.
After some research , i could find that , the patch if applied properly can work in give us the solution , but it seems that the aggregated css which is generated by drupal is not having the changes from the patch which are applied in form.css file.
And after a certain amount of research , i could understand that while clearing the cache from config/development/performance we get and option which is by default ticked to have Aggregated css and JS. So we have to untick both the option and let the css aggregate again.
Attaching ss for all .
The patch LGTM.
But just the part of aggregation needs to be taken care of else. Everything looks good to me.
RTBC +1 for #9
Thanks
Comment #16
gauravvvv commentedUnrelated failure, restoring status
Comment #18
athyamvidyasagar commentedI have created this patch for 10.1.x-dev and its working as expected. Please verify
Comment #19
nishantApplied #18 patch on Drupal 10.1.x-dev with Claro theme and It's working fine.
Comment #21
thomwilhelm commentedSupplying a 9.5.x version of the patch for anyone upgrading to Claro before the Drupal 10 upgrade.
Edit: Apologies the same fix doesn't work on 9.5.x for me, apologies for the noise.
Comment #22
thomwilhelm commentedComment #25
jennakoo commentedCopied the fixing lines from MR!3470 of #3 and reapplied on Drupal 11.x.
Comment #26
jennakoo commentedComment #27
ohjoz commentedReviewed the code and tested the latest patch against 11.x, text is now aligned.
Comment #28
lauriiiNice work here! I posted a minor comment on the MR regarding duplicate properties.
Comment #29
jennakoo commentedFixed the change requested by laurii.
Comment #30
laurielim commentedTested change and reviewed code, duplicate margin property removed.
Comment #33
lauriiiCommitted 33b9689 and pushed to 11.x. Also cherry-picked to 10.2.x. Thanks!