-
Notifications
You must be signed in to change notification settings - Fork 179
/
lightbox.css
106 lines (94 loc) · 2.21 KB
/
lightbox.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
/* Lightbox styles */
.web-stories-lightbox-open {
/* Stop page scroll when lightbox is visible. */
overflow-y: hidden;
}
.web-stories-list__lightbox,
.web-stories-singleton__lightbox {
justify-content: center;
align-items: center;
position: fixed;
background: black;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
transform: translate(0, -100vh);
z-index: -999999999;
}
/* amp-lightbox needs to have z-index to render on top of other elements in the page. */
.web-stories-list__lightbox-wrapper amp-lightbox,
.web-stories-list__lightbox.show,
.web-stories-singleton__lightbox.show {
z-index: 999999999;
}
.web-stories-list__lightbox.show,
.web-stories-singleton__lightbox.show {
transform: translate(0, 0);
opacity: 1;
}
.web-stories-list__lightbox amp-story-player,
.web-stories-singleton__lightbox amp-story-player {
width: 100%;
height: 100%;
}
.story-lightbox__close-button {
display: inline-block;
position: absolute;
left: 0;
top: 8px;
cursor: pointer;
height: 40px;
width: 40px;
z-index: 1;
border: none;
background: none !important;
border-radius: 0;
}
.story-lightbox__close-button--stick {
display: inline-block;
position: absolute;
left: 20px;
top: 15px;
height: 20px;
width: 3px;
background-color: #fff;
transform: rotateZ(45deg);
}
.story-lightbox__close-button--stick:first-child {
transform: rotateZ(-45deg);
}
/*
* amp-story-player's 'shadow-root-intermediary' element shows black space on top,
* because of the 'a' links. Making 'a' absolutely positioned removes them from normal
* relative flow, removes the space.
*/
html:not([amp]) .web-stories-singleton__lightbox amp-story-player a,
html:not([amp])
.web-stories-list
.web-stories-list__lightbox
amp-story-player
a {
position: absolute;
}
@media all and (min-width: 676px) {
.admin-bar .web-stories-list__lightbox,
.admin-bar .web-stories-singleton__lightbox {
top: 46px;
}
.story-lightbox__close-button {
left: 10px;
}
.story-lightbox__close-button--stick {
left: 20px;
top: 5px;
height: 25px;
}
}
@media all and (min-width: 783px) {
.admin-bar .web-stories-list__lightbox,
.admin-bar .web-stories-singleton__lightbox {
top: 32px;
}
}