This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
/
hud.css
127 lines (104 loc) · 1.95 KB
/
hud.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
.hud {
display: flex;
position: absolute;
top: 0; left: 0;
width: 100%;
height: 9rem;
padding: 0 1.5rem;
align-items: center;
justify-content: space-between;
opacity: 1;
transition: opacity 300ms;
transform: translateZ(1px);
}
/**
* hidden
*/
.hud[timer=active],
.hud[recording=true] {
pointer-events: none;
opacity: 0;
}
/**
* disabled
*/
.hud[camera=busy] {
pointer-events: none;
}
/** Buttons
---------------------------------------------------------*/
/**
* 1. Extend touchable zone.
* 2. When the button is pressed
* it changes color instanly.
* When it is released it transitons
* back to the default color.
* 3. Offset large border
*/
.hud_btn,
.settings_close {
height: 5rem;
width: 5rem;
margin: -2rem; /* 3 */
font-size: 2rem;
line-height: 5rem;
text-align: center;
border-radius: 50%;
background-position: center center;
background-repeat: no-repeat;
background-color: rgba(0,0,0,0.12);
background-clip: padding-box; /* 1 */
border: solid 2rem transparent; /* 1 */
-moz-box-sizing: content-box; /* 1 */
color: #fff;
}
.hud_btn:active {
background-color: #00b9df;
}
/** Camera Button
---------------------------------------------------------*/
/**
* 1. Hidden by default
*/
.hud_camera {
font-size: 2.6rem;
transition: opacity 300ms;
opacity: 0; /* 1 */
}
/**
* camera-enabled=true
*/
.hud[camera-enabled=true] .hud_camera {
opacity: 1;
}
/**
* camera-enabled=false
*/
.hud[camera-enabled=false] .hud_camera {
pointer-events: none;
}
/** Flash Button
---------------------------------------------------------*/
/**
* 1. Hidden by default
*/
.hud_flash {
width: 5.8rem;
height: 5.8rem;
line-height: 5.8rem;
font-size: 2.5rem;
opacity: 0; /* 1 */
transition: opacity 300ms;
}
/**
* flash-enabled=true
*/
.hud[flash-enabled=true] .hud_flash {
opacity: 1;
}
/**
* flash-enabled=false
*/
.hud[flash-enabled=false] .hud_flash {
pointer-events: none;
}