Administration: Fix minor misalignments caused by the `button-link` CSS class.

After [40059] the CSS class `button-link` uses `text-align: left` by default.
This change now requires to limit as much as possible the use of `button-link`
to controls that should really look like links and to explicitly set
`text-align: center` in a few other cases.

Fixes #39983.

Merges [40358] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40367 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2017-04-03 22:20:37 +00:00
parent f9d84dd4ba
commit 477746ab1a
4 changed files with 20 additions and 12 deletions

View File

@ -161,6 +161,7 @@
outline: none;
overflow: hidden;
cursor: pointer;
text-align: center;
}
.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after {
@ -532,6 +533,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}
#available-menu-items .accordion-section-title .no-items,
@ -623,6 +625,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}
#available-menu-items .menu-item-handle .item-add:focus {

View File

@ -183,15 +183,28 @@
right: 0;
width: 50px;
height: 50px;
margin: 0;
padding: 0;
border: 1px solid transparent;
background: none;
color: #666;
z-index: 1000;
cursor: pointer;
outline: none;
-webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
transition: color .1s ease-in-out, background .1s ease-in-out;
}
.media-modal-close:hover,
.media-modal-close:active {
-webkit-box-shadow: none;
box-shadow: none;
color: #00a0d2;
}
.media-modal-close:focus {
color: #00a0d2;
border-color: #5b9dd9;
-webkit-box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );
}
.media-modal-close span.media-modal-icon {
@ -205,15 +218,6 @@
vertical-align: middle;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #666;
}
.media-modal-close:hover .media-modal-icon:before {
color: #00a0d2;
}
.media-modal-close:active {
outline: 0;
}
.media-modal-content {

View File

@ -92,6 +92,7 @@
height: 22px;
width: 22px;
color: #72777c;
text-align: center;
}
#wp-auth-check-wrap .wp-auth-check-close:before {

View File

@ -163,7 +163,7 @@ function wp_print_media_templates() {
<script type="text/html" id="tmpl-media-modal">
<div class="<?php echo $class; ?>">
<button type="button" class="button-link media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button>
<button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button>
<div class="media-modal-content"></div>
</div>
<div class="media-modal-backdrop"></div>