Forms: Use button class directly on buttons for consistent display

Adding the `button` mixin into `input[type="submit"] caused conflicts with the other button classes (`.button-primary`) due to specificity. The button classes should be used on all buttons instead. This also updates which button on the Manage Pledge form is the "primary" action, since it's easy to skip the Update button when it's not primary.
This commit is contained in:
Kelly Dwan 2019-12-09 11:15:39 -05:00
parent fda5842e86
commit 619af97bd1
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
7 changed files with 7 additions and 8 deletions

View file

@ -67,6 +67,7 @@ use WP_Post;
<p>
<input
type="submit"
class="button"
value="Resend Confirmation"
/>
</p>

View file

@ -29,6 +29,7 @@ require __DIR__ . '/partial-result-messages.php';
<div>
<input
type="submit"
class="button button-primary"
id="5ftf-pledge-submit"
name="action"
value="<?php esc_attr_e( 'Update Pledge', 'wporg-5ftf' ); ?>"

View file

@ -57,6 +57,7 @@ require __DIR__ . '/partial-result-messages.php';
<div>
<input
type="submit"
class="button"
id="5ftf-pledge-submit"
name="action"
value="<?php esc_attr_e( 'Submit Pledge', 'wporg-5ftf' ); ?>"

View file

@ -102,7 +102,7 @@ use function WordPressDotOrg\FiveForTheFuture\get_views_path;
<div id="add-contrib-message" role="alert" aria-atomic="true"></div>
<button
class="button-primary"
class="button button-secondary"
data-action="add-contributor"
>
<?php esc_html_e( 'Add new contributors', 'wporg-5ftf' ); ?>

View file

@ -35,6 +35,7 @@ defined( 'WPINC' ) || die();
<input
type="submit"
class="button"
name="get_manage_pledge_link"
value="<?php esc_attr_e( 'Submit', 'wporg-5ftf' ); ?>"
/>

View file

@ -1,7 +1,3 @@
input[type="submit"] {
@extend .button;
}
.wp-block-button {
@extend .button;

View file

@ -54,9 +54,8 @@
margin-bottom: 0;
}
}
input[type="submit"],
.button-primary {
.button {
display: inline-block;
height: auto;
padding: ms(-3) ms(0);