63 lines
1.0 KiB
SCSS
63 lines
1.0 KiB
SCSS
// Import the woocommerce components stylesheet
|
|
@import "~@woocommerce/components/build-style/style.css";
|
|
|
|
// Hack to hide preview overflow.
|
|
.editor-block-preview__content {
|
|
overflow: hidden;
|
|
}
|
|
|
|
// Align the block icons in edit mode
|
|
.components-placeholder__label .gridicon,
|
|
.components-placeholder__label .material-icon {
|
|
margin-right: 1ch;
|
|
fill: currentColor;
|
|
}
|
|
|
|
.wc-block-products-grid {
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: flex-start;
|
|
|
|
&.components-placeholder {
|
|
padding: 2em 1em;
|
|
}
|
|
|
|
&.is-loading,
|
|
&.is-not-found {
|
|
display: block;
|
|
}
|
|
|
|
&.cols-1 {
|
|
display: block;
|
|
|
|
.wc-product-preview {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
}
|
|
|
|
@for $i from 2 to 7 {
|
|
&.cols-#{$i} .wc-product-preview {
|
|
flex: 1 0 calc(#{ 100% / $i });
|
|
max-width: 100% / $i !important;
|
|
}
|
|
}
|
|
|
|
// Styles for "resuable block" preview.
|
|
.editor-block-preview & {
|
|
min-width: 5em;
|
|
|
|
@for $i from 1 to 7 {
|
|
&.cols-#{$i} {
|
|
min-width: $i * 5em;
|
|
}
|
|
}
|
|
|
|
&.is-loading,
|
|
&.is-not-found {
|
|
min-width: auto;
|
|
}
|
|
}
|
|
}
|