-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
130 lines (112 loc) · 2.17 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
:root{
--heart-rate-bg:#0B1D0A;
--default-body-color: #ccc;
--heart-rate-hue: 110;
--heart-rate-font-size: 25rem;
--heart-icon-color: red;
--heart-top-position: -5rem;
--heart-size: 7rem;
--animation-duration: 1000;
}
html, body {
box-sizing: border-box;
font-size: 10px;
margin:0;
padding:0;
background:var(--default-body-color);
width: 100vw;
height: 100vh;
}
body{
display: flex;
}
*, *:before, *:after {
box-sizing: inherit;
}
.content{
flex:1;
overflow: hidden;
display: flex;
flex-flow: row wrap;
}
.content heart-monitor{
flex:1;
display:flex;
}
.heart{
background-color:var(--heart-rate-bg);
color: hsl(var(--heart-rate-hue), 68%, 52%);
flex: 1;
position: relative;
box-sizing: border-box;
display: flex;
align-items: flex-end;
flex-direction: column;
padding: 0;
border: none;
}
.heart>svg{
position: absolute;
left: 0;
width: 100%;
height: 100%;
}
.heart.animate{
-webkit-appearance: none;
stroke-dasharray: 200 1010;
stroke-dashoffset: 200;
}
.heart>div{
display: flex;
align-items: baseline;
font-family: monospace;
padding: 0 2rem;
}
.heart .value{
color: hsl(var(--heart-rate-hue), 68%, 52%);
font-size: var(--heart-rate-font-size);
}
.value-name{
display: none;
position: relative;
}
.value-name svg{
width: var(--heart-size);
height: var(--heart-size);
position: absolute;
top: var(--heart-top-position);
color:var(--heart-icon-color);
}
.heart.animate .value-name{
display: flex;
flex-direction: column;
font-size: calc(var(--heart-rate-font-size)/2);
}
.bounce-line-animation{
animation: bounce-line calc(var(--animation-duration)*1ms) linear;
}
.heart-beat-animation{
animation: heart-beat calc(var(--animation-duration)*1ms) linear;
}
@media (orientation: landscape){
:root{
--heart-rate-font-size:15rem;
--heart-top-position: -2.5rem;
--heart-size: 3rem;
}
}
@keyframes bounce-line {
0% {
stroke-dashoffset: 200;
}
100% {
stroke-dashoffset: -1006;
}
}
@keyframes heart-beat {
25% {transform:scale(1)}
35% {transform:scale(1.3)}
40% {transform:scale(1)}
50% {transform:scale(1.5)}
80% {transform:scale(1)}
}