|
|
@import "@wordpress/base-styles/breakpoints"; |
|
|
|
|
|
$bar-chart-border-radius: 2px; |
|
|
$year-bar-chart-border-radius: 4px; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart { |
|
|
position: relative; |
|
|
box-sizing: border-box; |
|
|
padding: 0 0 0 20px; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart .chart__y-axis-markers { |
|
|
position: absolute; |
|
|
left: 0; |
|
|
right: 0; |
|
|
height: 200px; |
|
|
} |
|
|
|
|
|
.chart .chart__y-axis-marker { |
|
|
position: absolute; |
|
|
top: 0; |
|
|
width: 100%; |
|
|
height: 1px; |
|
|
border-top: 1px solid var(--color-neutral-0); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chart__bar-marker { |
|
|
z-index: z-index("root", ".chart__bar-marker"); |
|
|
position: absolute; |
|
|
top: 0; |
|
|
width: 100%; |
|
|
height: 1px; |
|
|
border-top: 1px solid color-mix(in srgb, var(--color-neutral-0) 10%, transparent); |
|
|
} |
|
|
|
|
|
.chart__bar-marker, |
|
|
.chart__y-axis-label, |
|
|
.chart .chart__y-axis-marker { |
|
|
&.is-fifty { |
|
|
top: 50%; |
|
|
} |
|
|
|
|
|
&.is-zero { |
|
|
top: 100%; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$y-axis-padding: 0 20px; |
|
|
|
|
|
.chart__y-axis { |
|
|
position: relative; |
|
|
float: right; |
|
|
height: 200px; |
|
|
padding: $y-axis-padding; |
|
|
font-size: $font-body-extra-small; |
|
|
color: var(--color-neutral-40); |
|
|
margin-bottom: 30px; |
|
|
} |
|
|
|
|
|
.chart__y-axis-label { |
|
|
position: absolute; |
|
|
top: 0; |
|
|
right: 20px; |
|
|
text-align: right; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chart__y-axis-width-spacer { |
|
|
color: color-mix(in srgb, transparent 100%, var(--color-surface)); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart__x-axis { |
|
|
position: relative; |
|
|
font-size: 0; |
|
|
padding: 5px 0; |
|
|
min-height: 18px; |
|
|
color: var(--color-neutral-60); |
|
|
} |
|
|
|
|
|
.chart__x-axis-label { |
|
|
position: absolute; |
|
|
display: inline-block; |
|
|
vertical-align: top; |
|
|
font-size: $font-body-extra-small; |
|
|
text-align: center; |
|
|
|
|
|
font-weight: 400; |
|
|
line-height: 24px; |
|
|
color: var(--color-neutral-40); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart__x-axis-label::before { |
|
|
content: ""; |
|
|
display: block; |
|
|
position: absolute; |
|
|
top: -4px; |
|
|
left: 50%; |
|
|
margin-left: -0.5px; |
|
|
width: 1px; |
|
|
height: 5px; |
|
|
background: var(--color-neutral-60); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chart__x-axis-width-spacer { |
|
|
color: color-mix(in srgb, transparent 100%, var(--color-surface)); |
|
|
padding: $y-axis-padding; |
|
|
right: 0; |
|
|
|
|
|
&::before { |
|
|
display: none; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart__bars { |
|
|
position: relative; |
|
|
font-size: 0; |
|
|
height: 200px; |
|
|
text-align: center; |
|
|
overflow: hidden; |
|
|
display: flex; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart__bar { |
|
|
text-align: center; |
|
|
display: inline-block; |
|
|
position: relative; |
|
|
height: 200px; |
|
|
-ms-flex-grow: 1; |
|
|
flex-grow: 1; |
|
|
-ms-flex-shrink: 1; |
|
|
flex-shrink: 1; |
|
|
transform: scaleY(0); |
|
|
transform-origin: 0% 100%; |
|
|
animation: growUpOnMounting 0.2s ease-in forwards; |
|
|
|
|
|
@keyframes growUpOnMounting { |
|
|
100% { |
|
|
transform: scaleY(1); |
|
|
} |
|
|
} |
|
|
|
|
|
&:hover { |
|
|
cursor: pointer; |
|
|
background-color: color-mix(in srgb, var(--color-neutral) 10%, transparent); |
|
|
} |
|
|
|
|
|
&.is-selected { |
|
|
cursor: default; |
|
|
background-color: color-mix(in srgb, var(--color-primary) 10%, transparent); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.is-period-year { |
|
|
.chart__bar-section { |
|
|
border-top-left-radius: $year-bar-chart-border-radius; |
|
|
border-top-right-radius: $year-bar-chart-border-radius; |
|
|
} |
|
|
|
|
|
.chart__bar-section-inner { |
|
|
border-top-left-radius: $year-bar-chart-border-radius; |
|
|
border-top-right-radius: $year-bar-chart-border-radius; |
|
|
} |
|
|
} |
|
|
|
|
|
.chart__bar-section { |
|
|
display: inline-block; |
|
|
background-color: var(--color-primary); |
|
|
position: absolute; |
|
|
right: 16%; |
|
|
bottom: 0; |
|
|
left: 16%; |
|
|
height: 100%; |
|
|
transform: scaleY(0); |
|
|
transition: transform 0.3s ease-in-out; |
|
|
transform-origin: 0% 100%; |
|
|
z-index: z-index("root", ".chart__bar-section"); |
|
|
border-top-left-radius: $bar-chart-border-radius; |
|
|
border-top-right-radius: $bar-chart-border-radius; |
|
|
} |
|
|
|
|
|
.chart__bar-section-inner { |
|
|
background-color: var(--color-primary-dark); |
|
|
position: absolute; |
|
|
right: 23.33%; |
|
|
bottom: 0; |
|
|
left: 23.33%; |
|
|
border-top-left-radius: $bar-chart-border-radius; |
|
|
border-top-right-radius: $bar-chart-border-radius; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart__legend { |
|
|
margin-bottom: 16px; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
justify-content: flex-end; |
|
|
|
|
|
@media (max-width: $break-medium) { |
|
|
padding: 0 16px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chart__legend-options { |
|
|
color: var(--color-neutral); |
|
|
list-style-type: none; |
|
|
margin: 0; |
|
|
font-size: $font-body-extra-small; |
|
|
|
|
|
@media (max-width: $break-mobile) { |
|
|
display: none; |
|
|
} |
|
|
@container (inline-size < #{$break-mobile}) { |
|
|
display: none; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chart__legend-option { |
|
|
display: inline; |
|
|
text-align: left; |
|
|
|
|
|
|
|
|
@media (max-width: $break-mobile) { |
|
|
width: 50%; |
|
|
display: inline-block; |
|
|
|
|
|
&:first-child { |
|
|
.chart__legend-color { |
|
|
margin-left: 2px; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
&:not(:first-child) { |
|
|
margin-left: 24px; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart__legend-color { |
|
|
width: 20px; |
|
|
height: 20px; |
|
|
background: var(--color-primary); |
|
|
display: inline-block; |
|
|
border-radius: 4px; |
|
|
vertical-align: top; |
|
|
margin: 0 8px 0 0; |
|
|
|
|
|
&.is-dark-blue { |
|
|
background: var(--color-primary-dark); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chart__legend-checkbox { |
|
|
margin: 0; |
|
|
float: none; |
|
|
vertical-align: top; |
|
|
|
|
|
width: 20px; |
|
|
height: 20px; |
|
|
background-color: var(--color-surface); |
|
|
border: 1px solid var(--color-neutral-10); |
|
|
border-radius: 2px; |
|
|
margin-right: 8px; |
|
|
|
|
|
&:checked::before { |
|
|
margin: 3px auto; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart__legend-label { |
|
|
display: inline-block; |
|
|
padding: 0; |
|
|
|
|
|
color: var(--studio-black); |
|
|
font-size: $font-body-small; |
|
|
font-weight: 400; |
|
|
line-height: 18px; |
|
|
|
|
|
|
|
|
&.form-label { |
|
|
display: inline-block; |
|
|
margin-bottom: 0; |
|
|
font-weight: 400; |
|
|
} |
|
|
|
|
|
&.is-selectable { |
|
|
cursor: pointer; |
|
|
|
|
|
&:focus, |
|
|
&:hover { |
|
|
color: var(--studio-black); |
|
|
} |
|
|
} |
|
|
|
|
|
@media (max-width: $break-mobile) { |
|
|
display: block; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chart__empty { |
|
|
align-items: center; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
position: absolute; |
|
|
top: 0; |
|
|
right: 0; |
|
|
bottom: 0; |
|
|
left: 0; |
|
|
z-index: z-index("root", ".chart__empty"); |
|
|
padding: 0 50px; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chart__tooltip { |
|
|
|
|
|
|
|
|
pointer-events: none; |
|
|
|
|
|
.popover__inner { |
|
|
width: 230px; |
|
|
text-align: left; |
|
|
|
|
|
ul { |
|
|
@include clear-fix; |
|
|
list-style: none; |
|
|
margin: 0; |
|
|
padding: 0; |
|
|
|
|
|
li { |
|
|
font-size: $font-body-extra-small; |
|
|
text-transform: uppercase; |
|
|
font-weight: 400; |
|
|
height: 24px; |
|
|
letter-spacing: 0.1em; |
|
|
border: 0; |
|
|
|
|
|
.wrapper { |
|
|
display: block; |
|
|
line-height: 24px; |
|
|
clear: both; |
|
|
} |
|
|
|
|
|
.value { |
|
|
text-align: right; |
|
|
float: right; |
|
|
min-width: 22px; |
|
|
color: var(--color-neutral-10); |
|
|
} |
|
|
|
|
|
.label { |
|
|
display: block; |
|
|
overflow: hidden; |
|
|
word-break: break-all; |
|
|
vertical-align: baseline; |
|
|
} |
|
|
|
|
|
.gridicon { |
|
|
vertical-align: middle; |
|
|
margin-right: 6px; |
|
|
margin-top: -3px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&.is-streak { |
|
|
.popover__inner { |
|
|
width: 160px; |
|
|
|
|
|
li { |
|
|
height: 14px; |
|
|
|
|
|
.label { |
|
|
width: 100%; |
|
|
float: left; |
|
|
text-align: center; |
|
|
|
|
|
.rtl & { |
|
|
font-size: $font-body-extra-small; |
|
|
} |
|
|
|
|
|
.post-count { |
|
|
font-weight: 600; |
|
|
} |
|
|
} |
|
|
|
|
|
.value { |
|
|
float: none; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
.chart__tooltip .module-content-list-item { |
|
|
|
|
|
|
|
|
&.is-date-label { |
|
|
font-size: $font-body-extra-small; |
|
|
margin-bottom: 2px; |
|
|
text-transform: uppercase; |
|
|
font-weight: 600; |
|
|
border-bottom: 1px solid var(--color-neutral-60); |
|
|
padding-bottom: 2px; |
|
|
} |
|
|
|
|
|
|
|
|
&.is-published-item { |
|
|
height: 19px; |
|
|
|
|
|
.label { |
|
|
text-transform: none; |
|
|
color: var(--color-neutral-10); |
|
|
overflow: hidden; |
|
|
letter-spacing: 0; |
|
|
height: 19px; |
|
|
} |
|
|
|
|
|
.value { |
|
|
width: 0; |
|
|
min-width: 0; |
|
|
|
|
|
&::before { |
|
|
@include long-content-fade($color: var(--color-neutral-60)); |
|
|
position: relative; |
|
|
left: -30px; |
|
|
width: 30px; |
|
|
height: 24px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
.chart.is-placeholder { |
|
|
padding: 8px 20px; |
|
|
|
|
|
.chart__bar, |
|
|
.chart__bar:hover { |
|
|
cursor: default; |
|
|
background-color: transparent; |
|
|
|
|
|
.chart__bar-section { |
|
|
background-color: color-mix(in srgb, var(--color-neutral-0) 50%, transparent); |
|
|
} |
|
|
} |
|
|
} |
|
|
|