Opened 10 years ago
Closed 10 years ago
#37448 closed defect (bug) (fixed)
Primary and secondary buttons need to reset the outline property
| Reported by: | afercia | Owned by: | afercia |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | needs-patch good-first-bug |
| Cc: | Focuses: | ui |
Description
Seems that only the main CSS class .button resets the outline property while .button-primary and .button-secondary don't. And there are cases where button elements use just .button-primary and .button-secondary without the main CSS class. This is particularly evident on webkit-based browsers on OS X, see screenshot below (the thick blue "border" is the native webkit outline):
Maybe the intended usage is to always set the main class together with the other ones, e.g. class="button button-secondary" and this would fix it, on the other hand an easier solution would be resetting outline also for .button-primary and .button-secondary.
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #design by afercia. View the logs.
10 years ago
@
10 years ago
As suggested, this patch adds the 'button' class to all elements with the class 'button-primary' or 'button-secondary'. This includes files both in wp-admin and wp-includes. The patch does NOT affect any calls to PHP functions where individual class names are used as parameters.
#4
@
10 years ago
Turns out I was partially wrong, because the .button-secondary is there just for backward compatibility reasons and should not be used. From wp-includes/css/buttons.css:
WordPress-style Buttons ======================= Create a button by adding the `.button` class to an element. For backward compatibility, we support several other classes (such as `.button-secondary`), but these will *not* work with the stackable classes described below.
Related: #37138
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)

I would go adding the class
button.Would this only be necessary for
primary/secondary, or also forlink/groupetc.?