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 {
|
2018-08-02 22:20:48 +00:00
|
|
|
margin: $gap 0;
|
2018-06-14 15:16:57 +00:00
|
|
|
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;
|
|
|
|
|
2018-08-13 15:25:11 +00:00
|
|
|
// Specificity
|
|
|
|
.components-popover.components-popover {
|
|
|
|
// !important to override element-level styles
|
|
|
|
position: static !important;
|
|
|
|
top: auto !important;
|
|
|
|
left: auto !important;
|
|
|
|
right: auto !important;
|
|
|
|
bottom: auto !important;
|
|
|
|
margin-top: 0 !important;
|
|
|
|
margin-left: 0;
|
|
|
|
|
|
|
|
.components-popover__header {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.components-popover__content {
|
|
|
|
position: static;
|
|
|
|
left: auto;
|
|
|
|
right: auto;
|
|
|
|
margin: 0;
|
|
|
|
width: 100%;
|
|
|
|
max-width: 100% !important;
|
|
|
|
max-height: 100% !important;
|
|
|
|
box-shadow: none;
|
|
|
|
border: none;
|
|
|
|
transform: none;
|
|
|
|
|
|
|
|
.woocommerce-summary__item.is-selected {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-02 22:20:48 +00:00
|
|
|
.components-popover__content & {
|
|
|
|
max-height: 100%;
|
|
|
|
margin-top: 0;
|
|
|
|
margin-bottom: 0;
|
|
|
|
overflow-y: scroll;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
2018-07-30 15:14:09 +00:00
|
|
|
.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-08-02 22:20:48 +00:00
|
|
|
|
2018-08-13 15:25:11 +00:00
|
|
|
@include breakpoint( '<1100px' ) {
|
|
|
|
.woocommerce-summary__item {
|
|
|
|
// One-col layout for all items means right border is always "outer"
|
|
|
|
border-right-color: $outer-border;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-02 22:20:48 +00:00
|
|
|
@include breakpoint( '<782px' ) {
|
2018-08-13 15:25:11 +00:00
|
|
|
.woocommerce-summary__item-container.is-dropdown-button,
|
2018-08-02 22:20:48 +00:00
|
|
|
.woocommerce-summary__item-container:only-child {
|
|
|
|
margin-left: -16px;
|
|
|
|
margin-right: -16px;
|
|
|
|
width: auto;
|
|
|
|
|
2018-08-13 15:25:11 +00:00
|
|
|
.woocommerce-summary__item {
|
2018-08-02 22:20:48 +00:00
|
|
|
// Remove the border when the button is edge-to-edge
|
|
|
|
border-right: none;
|
|
|
|
}
|
|
|
|
}
|
2018-08-13 15:25:11 +00:00
|
|
|
.components-popover.components-popover {
|
|
|
|
margin-left: -16px;
|
|
|
|
margin-right: -16px;
|
|
|
|
|
|
|
|
.woocommerce-summary__item-container {
|
|
|
|
margin-left: 0;
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2018-08-02 22:20:48 +00:00
|
|
|
}
|
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-08-02 22:20:48 +00:00
|
|
|
|
|
|
|
&.is-dropdown-button {
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
2018-08-22 18:08:48 +00:00
|
|
|
border-bottom: 1px solid $outer-border;
|
|
|
|
border-right: 1px solid $outer-border;
|
2018-08-02 22:20:48 +00:00
|
|
|
|
|
|
|
.components-button {
|
|
|
|
text-align: left;
|
2018-08-22 18:08:48 +00:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include breakpoint( '<782px' ) {
|
|
|
|
border-right: none;
|
2018-08-02 22:20:48 +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 {
|
2018-08-02 22:20:48 +00:00
|
|
|
// !important to override button styles
|
|
|
|
box-shadow: inset -2px -2px 0 $black, inset 2px 2px 0 $black !important;
|
2018-07-30 15:14:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-selected {
|
|
|
|
margin-top: -1px;
|
|
|
|
height: calc(100% + 1px); // Hack to avoid double border
|
|
|
|
|
|
|
|
&:focus {
|
2018-08-02 22:20:48 +00:00
|
|
|
// !important to override button styles
|
|
|
|
box-shadow: inset -2px -2px 0 $black, inset 2px 2px 0 $black, inset 0 4px 0 $woocommerce !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.is-dropdown-button & {
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
padding-right: 2 * $gap + 24px;
|
|
|
|
|
|
|
|
@include breakpoint( '<782px' ) {
|
|
|
|
border-right: none;
|
2018-07-30 15:14:09 +00:00
|
|
|
}
|
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;
|
|
|
|
}
|
2018-08-02 22:20:48 +00:00
|
|
|
|
|
|
|
.woocommerce-summary__toggle {
|
|
|
|
position: absolute;
|
|
|
|
top: 44px;
|
|
|
|
right: $gap;
|
2018-08-23 17:47:27 +00:00
|
|
|
@include animate-transform;
|
2018-08-13 15:25:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.is-dropdown-expanded & {
|
|
|
|
.woocommerce-summary__toggle {
|
|
|
|
transform: rotate(-180deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.components-popover__content & {
|
|
|
|
.woocommerce-summary__item-label {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-value,
|
|
|
|
.woocommerce-summary__item-delta {
|
|
|
|
@include font-size( 13 );
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.woocommerce-summary__item-prev-label,
|
|
|
|
.woocommerce-summary__item-prev-value {
|
|
|
|
@include font-size( 11 );
|
|
|
|
}
|
2018-08-02 22:20:48 +00:00
|
|
|
}
|
2018-07-30 15:14:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.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
|
|
|
}
|
|
|
|
}
|