Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I was about to write documentation on buttons in Drupal when I noticed quite a number of inconsistencies, for one that we introduced a .div somewhere which resulted in the removal of our last blue button.
Comment | File | Size | Author |
---|---|---|---|
#11 | unblue-1238124-11.patch | 573 bytes | David_Rothstein |
#2 | save_button_blue_again.png | 12.87 KB | Bojhan |
bringing.back_.the_.blue_.patch | 464 bytes | Bojhan | |
Comments
Comment #1
Bojhan CreditAttribution: Bojhan commentedMy first d8 patch, lets see.
Comment #2
Bojhan CreditAttribution: Bojhan commentedComment #3
aspilicious CreditAttribution: aspilicious commentedVery strange that you find this now. I never saw these blue buttons and I'm looking at drupal 7 since januar 2010. Code wise this looks ok but I wondering why someone removed the blue.
Bohjan checked the contrast and it was ok.
Strange... very strange...
Comment #4
chx CreditAttribution: chx commentedYay blue buttons.
Comment #5
ksenzeeI had forgotten about the blue button! Looks great.
Comment #6
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedI've never seen these blue buttons before in D7, but they look good to me.
Comment #7
Dave ReidWow I had never seen that before in D7...
I'm a little sad we can't make this CSS re-usable for the 'default' button on any form.
Comment #8
Dries CreditAttribution: Dries commentedCommitted to 7.x and 8.x. Thanks.
Comment #9
Bojhan CreditAttribution: Bojhan commented@Dries Angie said it should probably not be committed to D7 for the sake of freaking out users(mostly content editors) with their buttons suddenly changing.
I don't mind either way, most probably won't notice anyway.
Comment #10
xmacinfoThank you for bringing in the blue button. I like it very much.
However, it have a side effect:
We are under the impression that the Preview button is disabled. :-)
Comment #11
David_Rothstein CreditAttribution: David_Rothstein commentedHere's the rollback patch, since a similar change was rejected as too late for D7 in December (#544398: Delete buttons look disabled in Seven theme even though they're not). I went ahead and removed the CSS rather than a straight rollback since it previously had no effect anyway and was kind of broken even if it did ("#edit-submit-1"???).
I think this could be rolled back for D8 too, since it's a half-step which introduces an inconsistency. Do we really want blue save buttons on the node form, but save buttons everywhere else a different color? Bojhan already started an issue at #1238484: Ability to mark the form buttons to be of a specific type (so that they can be styled differently) to try to use the "blue" pattern everywhere and that's where further work can happen on doing this in a consistent way.
Comment #12
xmacinfoI really like the new Blue button. I'd just remove it only in D7, though. For D8, we need to find a balance between blue buttons and the other ones.
We should investigate using a blue label on all button using a similar shade of blue for the Save button we are trying to introduce. So, for example, in #2, make the Preview button label a shade of the blue Save button.
Comment #13
XanoWill the patch still work if the primary button is not the first button in the form (see performance configuration page), or if the submit button has a different #name than "submit"?
Comment #14
Bojhan CreditAttribution: Bojhan commentedLets continue the discussion about d8 in the other issue, I don't think it needs a rollback necessarily for D8. It's a good motivator to make it more consistent :)
Comment #15
xmacinfoRTBC for the rollback in D7.
@Bojhan: Will you create the issue for D8?
Comment #16
Bojhan CreditAttribution: Bojhan commented#1238484: Ability to mark the form buttons to be of a specific type (so that they can be styled differently) already did :)
Comment #17
webchickThanks, David. Yeah, I shudder to think of some 100K site owners' clients all e-mailing them at once asking "WHY ARE OUR BUTTONS BLUE??!?!" :P Nice improvement for 8.x though!
Committed and pushed the rollback to 7.x. Marking back to fixed for 8.x.
Comment #19
JohnAlbinI'm sad this won't be in D7 since I'm the one who poked Bojhan in IRC and said "Hey, what happened to our blue buttons from d7 alpha?" They were "removed" in D7 only because a form ID was changed which broke Seven's CSS, but I agree with the new D8 issue more than I disagree with this issue.