2018-06-14 15:16:57 +00:00
|
|
|
/** @format */
|
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
// Set up some local color variables to make the CSS more clear
|
|
|
|
$outer-border: $core-grey-light-700;
|
|
|
|
$inner-border: $core-grey-light-500;
|
|
|
|
|
|
|
|
// A local mixin to generate the grid template and border logic
|
|
|
|
@mixin make-cols( $i ) {
|
|
|
|
grid-template-columns: repeat($i, 1fr);
|
|
|
|
|
|
|
|
.woocommerce-summary__item-container:nth-of-type(#{$i}n) .woocommerce-summary__item {
|
|
|
|
border-right-color: $outer-border;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin wrap-contents() {
|
|
|
|
.woocommerce-summary__item-value,
|
|
|
|
.woocommerce-summary__item-delta {
|
|
|
|
min-width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-prev-label,
|
|
|
|
.woocommerce-summary__item-prev-value {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin reset-wrap() {
|
|
|
|
.woocommerce-summary__item-value,
|
|
|
|
.woocommerce-summary__item-delta {
|
|
|
|
min-width: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-prev-label,
|
|
|
|
.woocommerce-summary__item-prev-value {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-14 15:16:57 +00:00
|
|
|
.woocommerce-summary {
|
|
|
|
display: grid;
|
2018-07-30 15:14:09 +00:00
|
|
|
border-width: 1px 0 0 1px;
|
2018-06-14 15:16:57 +00:00
|
|
|
border-style: solid;
|
2018-07-30 15:14:09 +00:00
|
|
|
border-color: $outer-border;
|
|
|
|
background-color: $core-grey-light-300;
|
|
|
|
box-shadow: inset -1px -1px 0 $outer-border;
|
|
|
|
|
|
|
|
.woocommerce-summary__item-data {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-value,
|
|
|
|
.woocommerce-summary__item-delta {
|
|
|
|
flex: 1 0 auto;
|
|
|
|
}
|
2018-06-14 15:16:57 +00:00
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
.woocommerce-summary__item-delta {
|
|
|
|
flex: 0;
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: none;
|
2018-06-14 15:16:57 +00:00
|
|
|
}
|
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
&.has-one-item,
|
|
|
|
&.has-1-items {
|
2018-06-14 15:16:57 +00:00
|
|
|
grid-template-columns: 1fr;
|
|
|
|
}
|
2018-07-30 15:14:09 +00:00
|
|
|
|
|
|
|
&.has-2-items {
|
|
|
|
@include make-cols( 2 );
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-3-items {
|
|
|
|
@include make-cols( 3 );
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-4-items,
|
|
|
|
&.has-7-items,
|
|
|
|
&.has-8-items {
|
|
|
|
@include make-cols( 4 );
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-5-items,
|
|
|
|
&.has-9-items,
|
|
|
|
&.has-10-items {
|
|
|
|
@include make-cols( 5 );
|
|
|
|
@include wrap-contents;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-6-items {
|
|
|
|
@include make-cols( 6 );
|
|
|
|
@include wrap-contents;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint( '<1365px' ) {
|
|
|
|
&.has-4-items,
|
|
|
|
&.has-7-items,
|
|
|
|
&.has-8-items {
|
|
|
|
@include wrap-contents;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-6-items,
|
|
|
|
&.has-9-items {
|
|
|
|
@include make-cols( 3 );
|
|
|
|
@include reset-wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-10-items {
|
|
|
|
@include make-cols( 4 );
|
|
|
|
}
|
|
|
|
|
|
|
|
&.has-9-items,
|
|
|
|
&.has-10-items {
|
|
|
|
.woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item {
|
|
|
|
border-right-color: $inner-border;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-06-14 15:16:57 +00:00
|
|
|
}
|
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
.woocommerce-summary__item-container {
|
2018-06-14 15:16:57 +00:00
|
|
|
margin-bottom: 0;
|
|
|
|
width: 100%;
|
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
&:last-of-type .woocommerce-summary__item {
|
|
|
|
// Make sure the last item always uses the outer-border color.
|
|
|
|
border-right-color: $outer-border !important;
|
2018-06-14 15:16:57 +00:00
|
|
|
}
|
2018-07-30 15:14:09 +00:00
|
|
|
}
|
2018-06-14 15:16:57 +00:00
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
.woocommerce-summary__item {
|
|
|
|
display: block;
|
|
|
|
height: 100%;
|
|
|
|
padding: $spacing;
|
|
|
|
background-color: $core-grey-light-100;
|
|
|
|
border-bottom: 1px solid $outer-border;
|
|
|
|
border-right: 1px solid $inner-border;
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: $core-grey-light-200;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: $core-grey-light-300;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
box-shadow: inset -2px -2px 0 $black, inset 2px 2px 0 $black;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-selected {
|
|
|
|
margin-top: -1px;
|
|
|
|
height: calc(100% + 1px); // Hack to avoid double border
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
box-shadow: inset -2px -2px 0 $black, inset 2px 2px 0 $black, inset 0 4px 0 $woocommerce;
|
|
|
|
}
|
2018-06-14 15:16:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-label {
|
2018-07-30 15:14:09 +00:00
|
|
|
display: block;
|
|
|
|
margin-bottom: $gap;
|
|
|
|
@include font-size( 11 );
|
|
|
|
text-transform: uppercase;
|
|
|
|
color: $core-grey-dark-300;
|
2018-06-14 15:16:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-value {
|
2018-07-30 15:14:09 +00:00
|
|
|
margin-bottom: $gap-smallest;
|
|
|
|
@include font-size( 18 );
|
|
|
|
font-weight: 500;
|
|
|
|
color: $core-grey-dark-900;
|
2018-06-14 15:16:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-delta {
|
2018-07-30 15:14:09 +00:00
|
|
|
margin-bottom: $gap-small;
|
|
|
|
@include font-size( 18 );
|
|
|
|
font-weight: 300;
|
|
|
|
color: $core-grey-dark-500;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-selected {
|
|
|
|
background: $white;
|
|
|
|
box-shadow: inset 0 4px 0 $woocommerce;
|
|
|
|
|
|
|
|
.woocommerce-summary__item-value {
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-delta {
|
|
|
|
font-weight: 400;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-good-trend .woocommerce-summary__item-delta {
|
|
|
|
color: $valid-green;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-bad-trend .woocommerce-summary__item-delta {
|
|
|
|
color: $error-red;
|
2018-06-14 15:16:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-delta-icon {
|
|
|
|
vertical-align: middle;
|
|
|
|
margin-right: 3px;
|
2018-07-30 15:14:09 +00:00
|
|
|
fill: currentColor;
|
2018-06-14 15:16:57 +00:00
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
&.gridicons-arrow-up {
|
2018-06-14 15:16:57 +00:00
|
|
|
transform: rotate(45deg);
|
|
|
|
}
|
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
&.gridicons-arrow-down {
|
2018-06-14 15:16:57 +00:00
|
|
|
transform: rotate(-45deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
.woocommerce-summary__item-prev-label,
|
|
|
|
.woocommerce-summary__item-prev-value {
|
|
|
|
@include font-size( 13 );
|
|
|
|
color: $core-grey-dark-500;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-card {
|
|
|
|
.woocommerce-summary {
|
|
|
|
background-color: $core-grey-light-100;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item {
|
|
|
|
background-color: $white;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: $core-grey-light-200;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: $core-grey-light-300;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item.is-selected {
|
|
|
|
margin-top: 0;
|
|
|
|
box-shadow: none;
|
2018-06-14 15:16:57 +00:00
|
|
|
}
|
|
|
|
}
|