Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/wp-admin/css/revisions.css
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ table.diff .diff-addedline ins {
float: right;
margin-left: 6px;
margin-right: 6px;
margin-top: 2px;
}

.diff-meta-from {
Expand Down Expand Up @@ -632,8 +631,4 @@ div.revisions-controls > .wp-slider > .ui-slider-handle {
word-break: break-all;
word-wrap: break-word;
}

.diff-meta input.restore-revision {
margin-top: 0;
}
}
8 changes: 4 additions & 4 deletions src/wp-admin/includes/revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ function wp_print_revision_templates() {

<script id="tmpl-revisions-buttons" type="text/html">
<div class="revisions-previous">
<input class="button" type="button" value="<?php echo esc_attr_x( 'Previous', 'Button label for a previous revision' ); ?>" />
<input class="button button-compact" type="button" value="<?php echo esc_attr_x( 'Previous', 'Button label for a previous revision' ); ?>" />
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprisingly, despite the addition of a new compact size in 7.0, the button-compact class is actually being used for the first time in this PR. I believe this class should be actively used going forward, rather than hardcoding min-height: 32px in places where a compact size is expected.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'm unsure it's safe for 7.0, but I definitely think we should open a dedicated 7.1 ticket to rationalize the use of this class.

</div>

<div class="revisions-next">
<input class="button" type="button" value="<?php echo esc_attr_x( 'Next', 'Button label for a next revision' ); ?>" />
<input class="button button-compact" type="button" value="<?php echo esc_attr_x( 'Next', 'Button label for a next revision' ); ?>" />
</div>
</script>

Expand Down Expand Up @@ -454,9 +454,9 @@ function wp_print_revision_templates() {
<# } #>
<?php } ?>
<# if ( data.attributes.autosave ) { #>
type="button" class="restore-revision button button-primary" value="<?php esc_attr_e( 'Restore This Autosave' ); ?>" />
type="button" class="restore-revision button button-primary button-compact" value="<?php esc_attr_e( 'Restore This Autosave' ); ?>" />
<# } else { #>
type="button" class="restore-revision button button-primary" value="<?php esc_attr_e( 'Restore This Revision' ); ?>" />
type="button" class="restore-revision button button-primary button-compact" value="<?php esc_attr_e( 'Restore This Revision' ); ?>" />
<# } #>
<# } #>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/wp-includes/css/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ TABLE OF CONTENTS:

.wp-core-ui .button,
.wp-core-ui .button.button-large,
.wp-core-ui .button.button-compact,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is just an oversight. All buttons should be 40px in size on the mobile layout.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

.wp-core-ui .button.button-small,
input#publish,
input#save-post,
Expand Down
Loading