Opened 8 years ago
Closed 8 years ago
#37448 closed defect (bug) (fixed)
Primary and secondary buttons need to reset the outline property
Reported by: | afercia | Owned by: | afercia |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | needs-patch good-first-bug |
Focuses: | ui | Cc: |
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.
8 years ago
@
8 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
@
8 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
#5
@
8 years ago
- Milestone changed from Future Release to 4.7
- Owner set to afercia
- Status changed from new to assigned
I would go adding the class
button
.Would this only be necessary for
primary/secondary
, or also forlink/group
etc.?