Remove extra CSS padding

This commit is contained in:
Caleb Burks 2018-02-02 22:19:07 -05:00
parent 02952bd0a3
commit 9c3611624c
2 changed files with 7 additions and 3 deletions

View File

@ -903,8 +903,7 @@ ul.wc_coupon_list {
&.code {
display: inline-block;
position: relative;
padding-right: 2em;
padding-left: .5em;
padding: 0 .5em;
background-color: #fff;
border: 1px solid #aaa;
-webkit-box-shadow: 0 1px 0 #dfdfdf;
@ -914,6 +913,10 @@ ul.wc_coupon_list {
margin-right: 5px;
margin-top: 5px;
&.editable {
padding-right: 2em;
}
.tips {
cursor: pointer;

View File

@ -111,8 +111,9 @@ if ( wc_tax_enabled() ) {
<li><strong><?php esc_html_e( 'Coupon(s)', 'woocommerce' ) ?></strong></li>
<?php foreach ( $coupons as $item_id => $item ) :
$post_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_title = %s AND post_type = 'shop_coupon' AND post_status = 'publish' LIMIT 1;", $item->get_code() ) );
$class = $order->is_editable() ? 'code editable' : 'code';
?>
<li class="code">
<li class="<?php echo $class ?>">
<?php if ( $post_id ) : ?>
<a href="<?php echo esc_url( add_query_arg( array( 'post' => $post_id, 'action' => 'edit' ), admin_url( 'post.php' ) ) ) ?>" class="tips" data-tip="<?php esc_attr_e( wc_price( $item->get_discount(), array( 'currency' => $order->get_currency() ) ) ) ?>">
<span><?php esc_html_e( $item->get_code() ) ?></span>