214 lines
4.3 KiB
SCSS
214 lines
4.3 KiB
SCSS
.wp-block-woocommerce-featured-product {
|
|
background-color: transparent;
|
|
border-color: transparent;
|
|
color: #fff;
|
|
box-sizing: border-box;
|
|
|
|
.components-resizable-box__container {
|
|
position: absolute !important;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
min-height: 50px;
|
|
|
|
&:not(.is-resizing) {
|
|
height: auto !important;
|
|
}
|
|
}
|
|
|
|
&.is-repeated {
|
|
background-repeat: repeat;
|
|
background-size: auto;
|
|
}
|
|
|
|
// Applying image edits
|
|
.is-applying {
|
|
.components-spinner {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
margin-top: -9px;
|
|
margin-left: -9px;
|
|
}
|
|
|
|
img {
|
|
opacity: 0.3;
|
|
}
|
|
}
|
|
}
|
|
|
|
.wc-block-featured-product {
|
|
align-content: center;
|
|
align-items: center;
|
|
background-size: cover;
|
|
background-position: center center;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
position: relative;
|
|
width: 100%;
|
|
|
|
.wc-block-featured-product__wrapper {
|
|
align-content: center;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
height: 100%;
|
|
width: 100%;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
&.has-left-content {
|
|
justify-content: flex-start;
|
|
|
|
.wc-block-featured-product__title,
|
|
.wc-block-featured-product__variation,
|
|
.wc-block-featured-product__description,
|
|
.wc-block-featured-product__price {
|
|
margin-left: 0;
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
&.has-right-content {
|
|
justify-content: flex-end;
|
|
|
|
.wc-block-featured-product__title,
|
|
.wc-block-featured-product__variation,
|
|
.wc-block-featured-product__description,
|
|
.wc-block-featured-product__price {
|
|
margin-right: 0;
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
.wc-block-featured-product__title,
|
|
.wc-block-featured-product__variation,
|
|
.wc-block-featured-product__description,
|
|
.wc-block-featured-product__price {
|
|
line-height: 1.25;
|
|
margin-bottom: 0;
|
|
text-align: center;
|
|
color: inherit;
|
|
|
|
a,
|
|
a:hover,
|
|
a:focus,
|
|
a:active {
|
|
color: $white;
|
|
}
|
|
}
|
|
|
|
.wc-block-featured-product__title,
|
|
.wc-block-featured-product__variation,
|
|
.wc-block-featured-product__description,
|
|
.wc-block-featured-product__price,
|
|
.wc-block-featured-product__link {
|
|
width: 100%;
|
|
padding: 16px 48px 0 48px;
|
|
z-index: 1;
|
|
}
|
|
|
|
.wc-block-featured-product__title,
|
|
.wc-block-featured-product__variation {
|
|
margin-top: 0;
|
|
border: 0;
|
|
|
|
&::before {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.wc-block-featured-product__variation {
|
|
font-style: italic;
|
|
padding-top: 0;
|
|
}
|
|
|
|
.wc-block-featured-product__description {
|
|
p {
|
|
margin: 0;
|
|
line-height: 1.5;
|
|
}
|
|
}
|
|
|
|
.wc-block-featured-product__background-image {
|
|
@include absolute-stretch();
|
|
object-fit: none;
|
|
|
|
&.has-parallax {
|
|
background-attachment: fixed;
|
|
|
|
// Mobile Safari does not support fixed background attachment properly.
|
|
// See also https://stackoverflow.com/questions/24154666/background-size-cover-not-working-on-ios
|
|
// Chrome on Android does not appear to support the attachment at all: https://issuetracker.google.com/issues/36908439
|
|
@supports (-webkit-overflow-scrolling: touch) {
|
|
background-attachment: scroll;
|
|
}
|
|
|
|
// Remove the appearance of scrolling based on OS-level animation preferences.
|
|
@media (prefers-reduced-motion: reduce) {
|
|
background-attachment: scroll;
|
|
}
|
|
}
|
|
}
|
|
|
|
.wp-block-button.aligncenter {
|
|
text-align: center;
|
|
}
|
|
|
|
&.has-background-dim {
|
|
.wc-block-featured-product__overlay::before {
|
|
background: inherit;
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
right: 0;
|
|
opacity: 0.5;
|
|
z-index: 1;
|
|
}
|
|
}
|
|
|
|
@for $i from 1 through 10 {
|
|
&.has-background-dim.has-background-dim-#{ $i * 10 } {
|
|
.wc-block-featured-product__overlay::before {
|
|
opacity: $i * 0.1;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Apply max-width to floated items that have no intrinsic width
|
|
&.alignleft,
|
|
&.alignright {
|
|
max-width: $content-width * 0.5;
|
|
width: 100%;
|
|
}
|
|
|
|
// Using flexbox without an assigned height property breaks vertical center alignment in IE11.
|
|
// Appending an empty ::after element tricks IE11 into giving the cover image an implicit height, which sidesteps this issue.
|
|
&::after {
|
|
display: block;
|
|
content: "";
|
|
font-size: 0;
|
|
min-height: inherit;
|
|
|
|
// IE doesn't support flex so omit that.
|
|
@supports (position: sticky) {
|
|
content: none;
|
|
}
|
|
}
|
|
|
|
// Aligned cover blocks should not use our global alignment rules
|
|
&.aligncenter,
|
|
&.alignleft,
|
|
&.alignright {
|
|
display: flex;
|
|
}
|
|
}
|