anki/ts/graphs/graphs.scss

192 lines
2.9 KiB
SCSS
Raw Normal View History

/* Copyright: Ankitects Pty Ltd and contributors
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
2020-06-30 08:23:46 +02:00
@use '../sass/core';
:root {
--area-fill: #000000;
--area-fill-opacity: 0.03;
--area-stroke: #000000;
--area-stroke-opacity: 0.08;
}
:root[class*="night-mode"] {
--area-fill: #ffffff;
--area-fill-opacity: 0.08;
--area-stroke: #000000;
--area-stroke-opacity: 0.18;
2020-06-28 12:52:38 +02:00
}
.graph-tooltip {
position: absolute;
padding: 15px;
border-radius: 5px;
2020-06-27 07:35:34 +02:00
font-size: 15px;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s;
color: var(--text-fg);
background: var(--tooltip-bg);
}
2020-07-16 05:28:06 +02:00
.graph-tooltip table {
border-spacing: 1em 0;
}
.graph {
margin-left: auto;
margin-right: auto;
2020-08-04 09:29:17 +02:00
max-width: 60em;
2020-07-31 04:16:18 +02:00
page-break-inside: avoid;
}
.graph h1 {
text-align: center;
2020-08-04 09:40:26 +02:00
margin-bottom: 0.25em;
margin-top: 1.5em;
}
.no-domain-line .domain {
opacity: 0.05;
}
.tick {
line {
opacity: 0.1;
}
text {
opacity: 0.5;
font-size: 10px;
}
}
@media only screen and (max-width: 800px) {
.tick text {
font-size: 13px;
}
}
@media only screen and (max-width: 600px) {
2020-08-05 11:05:34 +02:00
body {
font-size: 12px;
}
.tick text {
2020-08-05 11:05:34 +02:00
font-size: 16px;
}
2020-08-05 10:58:31 +02:00
.tick-odd {
display: none;
}
}
.range-box {
2020-06-26 07:34:21 +02:00
position: fixed;
2020-06-27 07:35:34 +02:00
z-index: 1;
2020-06-26 07:34:21 +02:00
top: 0;
width: 100%;
color: var(--text-fg);
background: var(--window-bg);
2020-06-26 07:34:21 +02:00
padding: 0.5em;
}
2020-07-31 04:16:18 +02:00
@media print {
.range-box {
position: absolute;
}
}
2020-06-26 07:34:21 +02:00
.range-box-pad {
height: 2em;
2020-06-26 07:34:21 +02:00
}
.range-box-inner {
display: flex;
justify-content: center;
}
@media only screen and (max-device-width: 480px) and (orientation: portrait) {
.range-box-inner {
font-size: smaller;
}
}
2020-06-27 13:45:16 +02:00
.range-box-inner > * {
2020-09-09 01:44:15 +02:00
padding-left: 0.5em;
padding-right: 0.5em;
2020-06-27 13:45:16 +02:00
}
2020-06-23 12:43:19 +02:00
.graph .area {
pointer-events: none;
fill: var(--area-fill);
fill-opacity: var(--area-fill-opacity);
stroke: var(--area-stroke);
stroke-opacity: var(--area-stroke-opacity);
2020-06-23 05:43:23 +02:00
}
.hoverzone rect {
fill: none;
pointer-events: all;
}
2020-06-26 07:34:21 +02:00
2020-06-27 07:35:34 +02:00
.hoverzone rect:hover {
fill: grey;
opacity: 0.05;
}
2020-06-26 07:34:21 +02:00
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
.spin {
position: absolute;
animation: spin;
animation-duration: 1s;
animation-iteration-count: infinite;
display: inline-block;
font-size: 2em;
opacity: 0;
}
.spin.active {
2020-06-26 11:25:02 +02:00
opacity: 0.5;
2020-06-26 07:34:21 +02:00
transition: opacity 1s;
}
2020-06-27 07:35:34 +02:00
.legend-outer {
2020-06-27 12:31:33 +02:00
text-align: center;
2020-06-27 07:35:34 +02:00
}
.subtitle {
text-align: center;
2020-08-04 09:40:26 +02:00
margin-bottom: 1em;
}
2020-06-30 08:23:46 +02:00
2020-07-06 06:01:49 +02:00
.no-data {
text {
text-anchor: middle;
fill: grey;
}
rect {
fill: var(--window-bg);
2020-07-06 06:01:49 +02:00
}
2020-06-30 08:23:46 +02:00
}
2020-07-04 05:38:46 +02:00
.centered {
2020-08-04 06:28:46 +02:00
display: flex;
justify-content: center;
}
.align-end {
text-align: end;
}
.align-start {
text-align: start;
2020-07-04 05:38:46 +02:00
}