forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathamp-story-desktop-panels.css
More file actions
138 lines (118 loc) · 7.25 KB
/
amp-story-desktop-panels.css
File metadata and controls
138 lines (118 loc) · 7.25 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
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
131
132
133
134
135
136
137
138
/**
* Copyright 2017 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@import './amp-story-desktop-user-overridable.css';
amp-story[standalone].i-amphtml-story-desktop-panels {
max-width: none!important;
max-height: none!important;
width: 100vw!important;
--i-amphtml-story-inactive-page-scale-factor: 0.9;
}
/**
* Page positions and animations.
*/
.i-amphtml-story-desktop-panels amp-story-page.i-amphtml-element {
/* Pages are stacked to the right side of the screen and then animated in. */
transform: perspective(1px) scale(var(--i-amphtml-story-inactive-page-scale-factor)) translateX(calc(250% + 192px)) translateY(0%) !important;
opacity: 0.05 !important;
transform-origin: left !important;
border-radius: 0 !important;
box-shadow: none !important;
}
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page.i-amphtml-element,
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-visited] {
transform: perspective(1px) scale(var(--i-amphtml-story-inactive-page-scale-factor)) translateX(calc(-350% - 192px)) translateY(0%) !important;
}
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page[i-amphtml-visited] {
transform: perspective(1px) scale(var(--i-amphtml-story-inactive-page-scale-factor)) translateX(calc(250% + 192px)) translateY(0%) !important;
}
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="-2"],
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="-1"],
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="1"],
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="2"] {
transition: opacity 350ms ease-out, transform 350ms cubic-bezier(0.4, 0.0, 0.2, 1) !important;
}
.i-amphtml-story-desktop-panels amp-story-page[active],
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page[active],
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="0"],
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="0"] {
transform: perspective(1px) scale(1.0) translateX(calc(-1 * var(--i-amphtml-story-page-50vw, 50%))) translateY(0%) !important;
opacity: 1 !important;
transition: opacity 350ms cubic-bezier(0.0, 0.0, 0.2, 1), transform 350ms cubic-bezier(0.4, 0.0, 0.2, 1) !important;
}
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="-2"],
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="2"] {
transform: perspective(1px) scale(var(--i-amphtml-story-inactive-page-scale-factor)) translateX(calc(-5 * var(--i-amphtml-story-page-50vw, 50%) - 128px)) translateY(0%) !important;
}
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="-1"],
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page[active] + amp-story-page:not([i-amphtml-desktop-position]):not([distance]), /** Position n+1 page on load, before attributes are set. */
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="1"] {
transform: perspective(1px) scale(var(--i-amphtml-story-inactive-page-scale-factor)) translateX(calc(-3 * var(--i-amphtml-story-page-50vw, 50%) - 64px)) translateY(0%) !important;
}
.i-amphtml-story-desktop-panels .prev-container,
[dir=rtl] .i-amphtml-story-desktop-panels .next-container {
left: calc(50% - var(--i-amphtml-story-page-50vw, 50%) * var(--i-amphtml-story-inactive-page-scale-factor) * 3 - 64px * var(--i-amphtml-story-inactive-page-scale-factor)) !important;
}
.i-amphtml-story-desktop-panels .next-container,
[dir=rtl] .i-amphtml-story-desktop-panels .prev-container {
left: calc(var(--i-amphtml-story-page-50vw, 50%) * var(--i-amphtml-story-inactive-page-scale-factor) + 50% + 64px * var(--i-amphtml-story-inactive-page-scale-factor)) !important;
}
.i-amphtml-story-desktop-panels amp-story-page[active] + amp-story-page:not([i-amphtml-desktop-position]):not([distance]), /** Position n+1 page on load, before attributes are set. */
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="1"],
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="-1"] {
transform: perspective(1px) scale(var(--i-amphtml-story-inactive-page-scale-factor)) translate(calc(var(--i-amphtml-story-page-50vw, 50%) + 64px), 0%) !important;
}
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="2"],
[dir=rtl] .i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="-2"] {
transform: perspective(1px) scale(var(--i-amphtml-story-inactive-page-scale-factor)) translate(calc(3 * var(--i-amphtml-story-page-50vw, 50%) + 128px), 0%) !important;
}
.i-amphtml-story-prev-hover > amp-story-page[i-amphtml-desktop-position="-1"],
.i-amphtml-story-next-hover > amp-story-page[i-amphtml-desktop-position="1"] {
opacity: 0.3 !important;
}
/**
* If the next page is protected behind a paywall, blur its content and display
* a lock icon on top of it.
*/
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="1"][amp-access-hide]::before {
content: '' !important;
position: absolute !important;
top: 50% !important;
left: 50% !important;
margin: -48px 0 0 -48px !important;
width: 96px !important;
height: 96px !important;
background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96px" height="96px" viewBox="0 0 24 24" fill="#FFFFFF"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path clip-path="url(#b)" d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6zM18 20H6V10h12v10z"/></svg>') !important;
z-index: 4 !important; /** Above amp-story-cta-layer and amp-story-grid-layer. */
}
.i-amphtml-story-desktop-panels amp-story-page[i-amphtml-desktop-position="1"][amp-access-hide] > * {
filter: blur(8px) !important;
}
.i-amphtml-story-desktop-panels > amp-story-page,
.i-amphtml-story-desktop-panels .i-amphtml-story-media-query-matcher {
left: 50%!important;
right: auto !important;
margin: auto !important;
max-height: 75vh !important;
max-width: calc(3/5 * 75vh) !important;
min-width: 320px !important;
min-height: 533px !important;
}
.i-amphtml-story-desktop-panels .i-amphtml-story-button-container {
height: calc(75vh * var(--i-amphtml-story-inactive-page-scale-factor)) !important;
width: calc(3/5 * 75vh * var(--i-amphtml-story-inactive-page-scale-factor)) !important;
min-width: calc(320px * var(--i-amphtml-story-inactive-page-scale-factor)) !important;
min-height: calc(533px * var(--i-amphtml-story-inactive-page-scale-factor)) !important;
}