137 lines
2.6 KiB
SCSS
137 lines
2.6 KiB
SCSS
.wc-block-featured-product {
|
|
position: relative;
|
|
background-color: $black;
|
|
background-size: cover;
|
|
background-position: center center;
|
|
width: 100%;
|
|
margin: 0 0 1.5em 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
align-content: center;
|
|
|
|
.wc-block-featured-product__wrapper {
|
|
overflow: hidden;
|
|
height: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
align-content: center;
|
|
}
|
|
|
|
&.components-placeholder {
|
|
// Reset the background for the placeholders.
|
|
background-color: rgba( 139, 139, 150, .1 );
|
|
}
|
|
|
|
.components-resizable-box__handle {
|
|
z-index: 10;
|
|
}
|
|
|
|
&.has-left-content {
|
|
justify-content: flex-start;
|
|
|
|
.wc-block-featured-product__title,
|
|
.wc-block-featured-product__description,
|
|
.wc-block-featured-product__price,
|
|
.wc-block-featured-product__link {
|
|
margin-left: 0;
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
&.has-right-content {
|
|
justify-content: flex-end;
|
|
|
|
.wc-block-featured-product__title,
|
|
.wc-block-featured-product__description,
|
|
.wc-block-featured-product__price,
|
|
.wc-block-featured-product__link {
|
|
margin-right: 0;
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
.wc-block-featured-product__title,
|
|
.wc-block-featured-product__description,
|
|
.wc-block-featured-product__price,
|
|
.wc-block-featured-product__link {
|
|
color: $white;
|
|
line-height: 1.25;
|
|
z-index: 1;
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
padding: 0 48px 16px 48px;
|
|
text-align: center;
|
|
|
|
a,
|
|
a:hover,
|
|
a:focus,
|
|
a:active {
|
|
color: $white;
|
|
}
|
|
}
|
|
|
|
.wc-block-featured-product__title {
|
|
margin-top: 0;
|
|
|
|
&:before {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.wc-block-featured-product__description {
|
|
p {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
&.has-background-dim::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
right: 0;
|
|
background-color: inherit;
|
|
opacity: 0.5;
|
|
z-index: 1;
|
|
}
|
|
|
|
@for $i from 1 through 10 {
|
|
&.has-background-dim.has-background-dim-#{ $i * 10 }::before {
|
|
opacity: $i * 0.1;
|
|
}
|
|
}
|
|
|
|
// Apply max-width to floated items that have no intrinsic width
|
|
&.alignleft,
|
|
&.alignright {
|
|
max-width: $content-width / 2;
|
|
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;
|
|
}
|
|
}
|