-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcosmoz-image-viewer.style.js
128 lines (110 loc) · 2 KB
/
cosmoz-image-viewer.style.js
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
export const style = `:host {
display: flex;
flex-direction: column;
position: relative;
overflow: auto;
}
:host([fullscreen]) {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: black;
z-index: 1000;
}
.flex { flex: auto; }
#imageContainer {
height: 100%;
overflow-y: auto;
}
.actions {
position: absolute;
left: 0;
right: 0;
margin: 12px;
display: flex;
align-items: center;
}
.nav.counter {
position: absolute;
left: calc(50% - 32px);
margin-top: 22px;
width: 40px;
padding: 4px 10px;
border-radius: 30px;
text-align: center;
font-weight: 100;
font-size: 1em;
}
.nav {
z-index: +1;
opacity: 0.5;
color: rgba(255, 255, 255, 0.87);
opacity: 1;
background-color: rgba(0, 0, 0, 0.44);
border-radius: 20px;
margin: 3px;
}
button.nav {
border: none;
width: 40px;
height: 40px;
transition: background-color 100ms;
}
button.nav:not([disabled]) {
cursor: pointer;
}
button.nav[disabled] {
opacity: 0.5;
}
button.nav:active:not([disabled]) {
background-color: rgba(0, 0, 0, 0.60);
}
.nav:not(:hover) {
visibility: hidden;
}
:host(:hover) .nav {
visibility: visible;
}
.image {
background-color: gray;
pointer-events: none;
/* Needed to override Chrome 73+ handling of iron-image overflow hidden */
overflow: visible;
}
.image-zoom {
flex: auto;
display: flex;
justify-content: center;
background-color: black;
height: 100vh;
}
.error {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
z-index: +1;
text-align: center;
background: rgba(0,0,0,0.5);
padding: 20px;
}
.error .desc {
padding-top: 1em;
opacity: 0.8;
font-size: 0.8em;
}
cosmoz-slider {
min-height: 150px;
overflow-y: auto !important;
height:100%;
}
cz-spinner {
position: absolute;
top: 50%;
left: 50%;
translate: -50% -50%;
}
`;