woocommerce/assets/css/marketplace-suggestions.scss

228 lines
4.3 KiB
SCSS

/**
* marketplace-suggestions.scss
* Styling for in-product marketplace suggestions.
*/
@import "mixins";
@import "variables";
$suggestions-pale-gray: #ddd;
$suggestions-copy-text: #444;
a.suggestion-dismiss {
border: none;
box-shadow: none;
color: $suggestions-pale-gray;
}
a.suggestion-dismiss:hover {
color: #aaa;
}
a.suggestion-dismiss::before {
@include iconbeforedashicons( "\f335" );
font-size: 1.5em;
}
.marketplace-suggestions-container.showing-suggestion {
text-align: left;
.marketplace-suggestion-container {
align-items: flex-start;
display: flex;
flex-direction: column;
// Allows us to position the dismiss x button
// relative to container on mobile.
position: relative;
img.marketplace-suggestion-icon {
height: 40px;
margin-right: 1.5em;
margin-bottom: 1em;
flex: 0 0 40px;
}
.marketplace-suggestion-container-content {
flex: 1 1 60%;
h4 {
margin: 0;
margin-bottom: 0.5em;
}
p {
margin: 0;
margin-bottom: 0.5em;
color: $suggestions-copy-text;
}
}
.marketplace-suggestion-container-cta {
flex: 1 1 30%;
text-align: right;
.suggestion-dismiss {
text-decoration: none;
position: absolute;
top: 1em;
right: 1em;
}
}
}
@media screen and (min-width: 600px) {
.marketplace-suggestion-container {
align-items: center;
flex-direction: row;
img.marketplace-suggestion-icon {
// display: inline-block;
}
}
}
}
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"] {
.marketplace-suggestion-container {
.marketplace-suggestion-container-content {
h4 {
font-size: 1.1em;
margin: 0;
margin-bottom: 0;
}
}
}
}
// Optimise footer suggestion layout for left-aligned CTA link button only.
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"] {
.marketplace-suggestion-container {
flex-direction: row-reverse;
.marketplace-suggestion-container-cta {
text-align: left;
}
}
}
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-inline"] {
// hide by default (mobile first)
display: none;
td:first-child {
border-left: 4px solid $woocommerce;
}
.marketplace-suggestion-container {
padding: 0.5em 0 0.5em 1em;
img.marketplace-suggestion-icon {
margin-bottom: 0;
}
.marketplace-suggestion-container-content {
h4 {
margin: 0;
font-size: 1.2em;
}
}
.marketplace-suggestion-container-cta {
.suggestion-dismiss {
position: relative;
top: 4px;
right: auto;
margin-left: 1em;
}
}
}
@media screen and (min-width: 800px) {
// Display inline table suggestion on desktop only.
// The table columns are dynamic, so there's no good way to style the row
// content correctly when columns are hidden.
display: table-row;
}
}
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-body"] {
border: 1px solid $suggestions-pale-gray;
border-bottom: none;
&:last-child {
border-bottom: 1px solid $suggestions-pale-gray;
}
.marketplace-suggestion-container {
padding: 1.5em;
border-bottom: 1px solid $suggestions-pale-gray;
&:last-child {
border-bottom: none;
padding-bottom: 1.5em;
}
.marketplace-suggestion-container-cta {
a.button {
display: inline-block;
min-width: 120px;
text-align: center;
}
a.linkout {
font-size: 1.1em;
text-decoration: none;
}
a.linkout .dashicons {
margin-left: 4px;
bottom: 2px;
position: relative;
}
.suggestion-dismiss {
position: absolute;
top: 1em;
right: 1em;
}
}
}
@media screen and (min-width: 600px) {
.marketplace-suggestion-container {
border-bottom: none;
padding-bottom: 0;
.marketplace-suggestion-container-cta {
.suggestion-dismiss {
position: relative;
top: 7px;
right: auto;
}
}
}
}
}