Skip to content

Commit

Permalink
Administration: Fix minor misalignments caused by the button-link C…
Browse files Browse the repository at this point in the history
…SS 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.

Built from https://develop.svn.wordpress.org/trunk@40358


git-svn-id: http://core.svn.wordpress.org/trunk@40265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
afercia committed Mar 31, 2017
1 parent 35d8daf commit 9c360b1
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 36 deletions.
3 changes: 3 additions & 0 deletions wp-admin/css/customize-nav-menus-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
outline: none;
overflow: hidden;
cursor: pointer;
text-align: center;
}

.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after {
Expand Down Expand Up @@ -521,6 +522,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}

#available-menu-items .accordion-section-title .no-items,
Expand Down Expand Up @@ -612,6 +614,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}

#available-menu-items .menu-item-handle .item-add:focus {
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/customize-nav-menus-rtl.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions wp-admin/css/customize-nav-menus.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
outline: none;
overflow: hidden;
cursor: pointer;
text-align: center;
}

.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after {
Expand Down Expand Up @@ -521,6 +522,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}

#available-menu-items .accordion-section-title .no-items,
Expand Down Expand Up @@ -612,6 +614,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}

#available-menu-items .menu-item-handle .item-add:focus {
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/customize-nav-menus.min.css

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions wp-includes/css/media-views-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,28 @@
left: 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.button-link {
text-decoration: none;
.media-modal-close:hover,
.media-modal-close:active {
color: #00a0d2;
}

.media-modal-close:active {
-webkit-box-shadow: none;
box-shadow: none;
.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 {
Expand All @@ -209,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 {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/media-views-rtl.min.css

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions wp-includes/css/media-views.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +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.button-link {
text-decoration: none;
.media-modal-close:hover,
.media-modal-close:active {
color: #00a0d2;
}

.media-modal-close:active {
-webkit-box-shadow: none;
box-shadow: none;
.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 {
Expand All @@ -209,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 {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/media-views.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions wp-includes/css/wp-auth-check-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
width: 22px;
color: #72777c;
text-decoration: none;
text-align: center;
}

#wp-auth-check-wrap .wp-auth-check-close:before {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/wp-auth-check-rtl.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions wp-includes/css/wp-auth-check.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
width: 22px;
color: #72777c;
text-decoration: none;
text-align: center;
}

#wp-auth-check-wrap .wp-auth-check-close:before {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/wp-auth-check.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wp-includes/media-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40357';
$wp_version = '4.8-alpha-40358';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 9c360b1

Please sign in to comment.