Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#22581 closed defect (bug) (invalid)

Admin CSS Changes Affected Buttons

Reported by: usermrpapa's profile usermrpapa Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Administration Keywords:
Focuses: Cc:

Description

Per discussion with Nacin over Twitter (times have changed), he asked that I open this ticket....

3.5 admin css changes had an affect on our buttons (form submits) used within the admins (within our plugin). Basically, the changes forced our buttons to go from being primary buttons to secondary buttons.

Three images attached. The 3.4.2-buttons.png image is what our buttons looked like in 3.4.2. The 3.5-buttons-before.png image is what they changed to look like while running the 3.5 trunk. tthe 3.5-buttons-after.png image is what they look like now after our code changes. Please note, we are are not currently using submit_button().

Also, worth mentioning that the 3.5-buttons-before.png image buttons do turn 'blue' (primary looking) on hover.

Our current released code for that generated the 3.4.2 button is:

<input id="saveit" class="button button-primary" type="submit" value="Update Global Options" name="saveit">

the change to our code we have made for 3.5 to get them back to primary is:

<input id="saveit" class="button-primary" type="submit" value="Update Global Options" name="saveit">

Perhaps the use of button and button-primary together was not correct, but it worked before and Nacin wanted a ticket to look into since it might affect other plugins.

Attachments (3)

3.4.2-buttons.png (27.4 KB) - added by usermrpapa 12 years ago.
3.5-buttons-before.png (23.1 KB) - added by usermrpapa 12 years ago.
3.5-buttons-after.png (35.1 KB) - added by usermrpapa 12 years ago.

Download all attachments as: .zip

Change History (8)

#1 @TobiasBg
12 years ago

  • Keywords reporter-feedback added

Does your plugin maybe apply own CSS code to the .button class, the #saveit ID, or the input[type="submit"] type?
I'm using something like

<input class="button button-primary" type="submit" value="My button" />

without problems in a plugin in WP 3.4.2 and trunk.

I'm asking because you seem to have had the "button" class in your code in 3.4.2 already, although WP core has only started using that since 3.5 now.

#2 @usermrpapa
12 years ago

whoops... nice catch... that does seem to exactly be it... didnt dig far enough on our end and assumed the 'button' class changes were why we needed to make a change... had not realized it was us who had declared a 'button' class style previously and it got knocked when WP added a new, same named class... of course, any other plugin with same generic class will have the same issue... so an update for us either way ;)

thanks!

#3 @usermrpapa
12 years ago

  • Keywords reporter-feedback removed

#4 @TobiasBg
12 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Thanks for further investigating this! Yes, the usage of the "button" class by your plugin and WordPress is unfortunate, but as it is not that much of change, I suggest that you just change that in your plugin.

#5 @helenyhou
12 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.