Problem/Motivation
When the submit button for the views bulk actions form is disabled it gets the grey text, but the background remains blue.
This is most apparent when using the Views Bulk Operations module as it has javascript which disables the button until content has been selected and an action has as well.
It seems that during the update to move the bulk actions into the floating bar at the bottom of the view, some CSS was missed/not removed. This was intentional in #3070558: Implement bulk operation designs
This line is setting the background colour, which overrides the disabled rule.

Steps to reproduce
- Install standard profile
- Add some content
- Visit admin/content, inspect the "Apply to selected items" button and add the
disabledattribute to it.
Proposed resolution
Copy disabled styling into tableselect.css?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3378091-disabled-primary-button-gray-text-blue-background-bad-contrast-12.patch | 1.27 KB | edmund.dunn |
| #5 | Screen Shot 2023-07-31 at 11.20.28 am.png | 40.26 KB | acbramley |
| #2 | Screen Shot 2023-07-31 at 9.54.27 am.png | 28.11 KB | acbramley |
Issue fork drupal-3378091
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
acbramley commentedComment #3
acbramley commentedIt seems like this colour was intentionally set in #3070558: Implement bulk operation designs - probably better to just add the :disabled classes into tableselect.css too?
Comment #5
acbramley commentedThis seems to do the trick (never done CSS changes in core so apologies if I've altered the files incorrectly 😅)
Comment #6
acbramley commentedComment #8
gauravvvv commentedThe
.views-bulk-actions__itemoverrides only the background color of the primary element; there is no need to modify the button's color.Comment #10
lauriiiI pushed alternative solution to the MR that avoids copying the disabled styles to the tableselect styles.
Comment #11
acbramley commentedThis is why I stay away from CSS 😂
Much nicer solution and works perfectly, thanks @lauriii!
Comment #12
edmund.dunn commentedPosting the static patch because using the MR doesn't allow pinning to a specific commit, so anyone can submit pretty much anything and inject it into our codebase IIRC. This also fixed our issue.
Comment #14
lauriiiRandom fail
Comment #16
acbramley commentedComment #17
larowlanUpdating credits
Comment #18
larowlanCommitted to 11.x and backported to 10.1.x
thanks!
Comment #21
idebr commented