-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorientation-lock.css
More file actions
57 lines (53 loc) · 1.79 KB
/
Copy pathorientation-lock.css
File metadata and controls
57 lines (53 loc) · 1.79 KB
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
/*
* Orientation lock overlay.
* Shows a full-screen overlay prompting the user to rotate to landscape.
* Only applies to screens ≤1024px in portrait orientation.
* support.html no longer uses this overlay.
*
* SIZING: the overlay always lives in a ~1440px-wide coordinate space —
* on mobile because <meta viewport width=1440> makes the layout viewport
* 1440px (the browser then scales the whole page down to the device width),
* on desktop because fluid-scaling.js sets the overlay to innerWidth/zoom,
* and zoom is innerWidth/1440. So sizes here are chosen as a fraction of
* 1440 and land at the same apparent size on any device. Anything sized in
* "normal" px (the old 18px text, 72px icon) renders at roughly a quarter
* of that on a phone, which is why the prompt read as fine print.
*/
#orientation-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
/* width/height are overridden by fluid-scaling.js to compensate for body zoom */
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.88);
z-index: 999999;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 0.75em;
color: white;
font-family: 'Ubuntu', sans-serif;
font-weight: 400;
font-size: 72px; /* 5% of the 1440px space ≈ 20px on a 390px-wide phone */
text-align: center;
padding: 0.8em;
box-sizing: border-box;
}
#orientation-overlay svg {
width: 4.6em;
height: 4.6em;
fill: white;
display: block;
flex-shrink: 0;
}
#orientation-overlay p {
margin: 0;
max-width: 12em;
line-height: 1.4;
letter-spacing: 0.01em;
}
/* Overlay show/hide is handled by fluid-scaling.js via window.innerWidth/innerHeight,
* because viewport width=1440 makes CSS max-width media queries check the layout
* viewport (always 1440px) rather than the actual device width. */