Variations - Remove separator between buttons and empty state screen (#38123)
* Remove separator between buttons and empty state screen * Add changelog * Fix separator style
This commit is contained in:
parent
4c9bcbc30e
commit
765a87a741
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: dev
|
||||
|
||||
Variations - Remove separator between buttons and empty state screen
|
|
@ -1071,7 +1071,20 @@ $default-line-height: 18px;
|
|||
}
|
||||
}
|
||||
|
||||
#variable_product_options_inner {
|
||||
> .toolbar:not(.expand-close-hidden) {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.add-variation-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.no-variations {
|
||||
> .toolbar:not(.expand-close-hidden) {
|
||||
border-bottom: none;
|
||||
}
|
||||
.add-variation-container {
|
||||
display: flex;
|
||||
@extend %container-defaults;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
@ -1088,9 +1101,7 @@ $default-line-height: 18px;
|
|||
p {
|
||||
@extend %centered-text;
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5505,13 +5516,15 @@ img.help_tip {
|
|||
* WooCommerce meta boxes
|
||||
*/
|
||||
.wc-metaboxes-wrapper {
|
||||
:not(#variable_product_options_inner) {
|
||||
.toolbar:not(.expand-close-hidden) {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
.toolbar {
|
||||
margin: 0 !important;
|
||||
border-top: 1px solid white;
|
||||
padding: 9px 12px !important;
|
||||
&:not(.expand-close-hidden) {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-top: 0;
|
||||
|
|
|
@ -1331,10 +1331,14 @@ jQuery( function ( $ ) {
|
|||
'.woocommerce_variations'
|
||||
);
|
||||
if ( parseInt( wrapper.attr( 'data-total' ) ) > 0 ) {
|
||||
$( '.add-variation-container' ).addClass( 'hidden' );
|
||||
$( '#variable_product_options_inner' ).removeClass(
|
||||
'no-variations'
|
||||
);
|
||||
$( '#field_to_edit' ).removeClass( 'hidden' );
|
||||
} else {
|
||||
$( '.add-variation-container' ).removeClass( 'hidden' );
|
||||
$( '#variable_product_options_inner' ).addClass(
|
||||
'no-variations'
|
||||
);
|
||||
$( '#field_to_edit' ).addClass( 'hidden' );
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue