Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: chrome/browser/resources/vr_shell/vr_shell_ui.css

Issue 2490313002: Remove fixed positioning of HTML UI elements. (Closed)
Patch Set: Address nits. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/vr_shell/vr_shell_ui.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright 2016 The Chromium Authors. All rights reserved. 1 /* Copyright 2016 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */ 3 * found in the LICENSE file. */
4 4
5 html { 5 html {
6 background-color: rgba(255, 255, 255, 0); 6 background-color: rgba(255, 255, 255, 0);
7 } 7 }
8 8
9 #ui { 9 #ui {
10 --scaleFactor: 4; 10 --scaleFactor: 4;
11 left: 0; 11 left: 0;
12 position: absolute; 12 position: absolute;
13 top: 0; 13 top: 0;
14 transform: scale(0.25, 0.25); 14 transform: scale(0.25, 0.25);
15 transform-origin: left top;
16 width: 400%;
17 }
18
19 /* This class manages the position of elements on the texture page.
20 * Each UI element should have a bounding div of this class. */
21 .ui-element {
22 float: left;
23 margin: 2px;
15 } 24 }
16 25
17 .webvr-message-box { 26 .webvr-message-box {
18 align-items: center; 27 align-items: center;
19 display: flex; 28 display: flex;
20 flex-direction: column; 29 flex-direction: column;
21 justify-content: center; 30 justify-content: center;
22 position: absolute;
23 } 31 }
24 32
25 /* Permanent security warning for WebVR. This uses a fixed-size absolutely 33 /* Permanent security warning for WebVR. */
26 * positioned DIV, the rectangle must match kWebVrWarningPermanentRect
27 * in vr_shell.cc for use as a GL textured quad. */
28 #webvr-not-secure-permanent { 34 #webvr-not-secure-permanent {
29 height: 128px; 35 height: 128px;
30 left: 0;
31 top: 0;
32 width: 512px; 36 width: 512px;
33 } 37 }
34 38
35 #webvr-not-secure-permanent .webvr-not-secure-icon { 39 #webvr-not-secure-permanent .webvr-not-secure-icon {
36 display: inline-block; 40 display: inline-block;
37 margin: 20px 0; 41 margin: 20px 0;
38 vertical-align: middle; 42 vertical-align: middle;
39 } 43 }
40 44
41 #webvr-not-secure-permanent .webvr-string { 45 #webvr-not-secure-permanent .webvr-string {
(...skipping 15 matching lines...) Expand all
57 color: #444; 61 color: #444;
58 font-size: 26px; 62 font-size: 26px;
59 height: 78px; 63 height: 78px;
60 max-width: 472px; 64 max-width: 472px;
61 min-width: 226px; 65 min-width: 226px;
62 overflow: hidden; 66 overflow: hidden;
63 padding: 0 20px; 67 padding: 0 20px;
64 white-space: nowrap; 68 white-space: nowrap;
65 } 69 }
66 70
67 /* Transient security warning for WebVR. This uses a fixed-size absolutely 71 /* Transient security warning for WebVR. */
68 * positioned DIV, the rectangle must match kWebVrWarningTransientRect
69 * in vr_shell.cc for use as a GL textured quad. */
70 #webvr-not-secure-transient { 72 #webvr-not-secure-transient {
71 height: 256px; 73 height: 256px;
72 left: 0;
73 top: 128px;
74 width: 512px; 74 width: 512px;
75 } 75 }
76 76
77 /* This uses fixed width but the height has some elasticity for translations. 77 /* This uses fixed width but the height has some elasticity for translations.
78 * The maximum is based on the fixed-size container DIV, excess will be 78 * The maximum is based on the fixed-size container DIV, excess will be
79 * clipped. */ 79 * clipped. */
80 #webvr-not-secure-transient > div { 80 #webvr-not-secure-transient > div {
81 background-color: rgba(26, 26, 26, 0.8); 81 background-color: rgba(26, 26, 26, 0.8);
82 border-radius: 6px; 82 border-radius: 6px;
83 box-sizing: border-box; 83 box-sizing: border-box;
84 color: white; 84 color: white;
85 display: flex; 85 display: flex;
86 flex-direction: column; 86 flex-direction: column;
87 font-size: 26px; 87 font-size: 26px;
88 justify-content: center; 88 justify-content: center;
89 line-height: 1.4; 89 line-height: 1.4;
90 max-height: 210px; 90 max-height: 210px;
91 min-height: 160px; 91 min-height: 160px;
92 overflow: hidden;
92 padding: 20px; 93 padding: 20px;
93 text-align: center; 94 text-align: center;
94 width: 512px; 95 width: 512px;
95 } 96 }
96 97
97 .round-button {
98 height: 136px;
99 left: 512px;
100 position: absolute;
101 width: 96px;
102 }
103
104 .round-button .button { 98 .round-button .button {
105 background-color: #eee; 99 background-color: #eee;
106 background-position: center; 100 background-position: center;
107 background-repeat: no-repeat; 101 background-repeat: no-repeat;
108 background-size: contain; 102 background-size: contain;
109 border-radius: 50%; 103 border-radius: 50%;
110 height: 96px; 104 height: 96px;
105 margin: auto auto;
111 opacity: 0.8; 106 opacity: 0.8;
112 position: absolute;
113 top: 0;
114 transition: opacity 150ms ease-in-out; 107 transition: opacity 150ms ease-in-out;
115 width: 96px; 108 width: 96px;
116 } 109 }
117 110
118 .round-button .caption { 111 .round-button .caption {
119 bottom: 0;
120 color: white; 112 color: white;
121 font-size: 24px; 113 font-size: 24px;
122 left: 50%; 114 max-width: 192px;
123 opacity: 0; 115 opacity: 0;
124 position: absolute; 116 overflow: hidden;
125 transform: translateX(-50%); 117 text-align: center;
126 transition: opacity 150ms ease-in-out; 118 transition: opacity 150ms ease-in-out;
127 z-index: 100; 119 white-space: nowrap;
128 }
129
130 #back {
131 top: 0;
132 } 120 }
133 121
134 #back .button { 122 #back .button {
135 background-image: url(../../../../ui/webui/resources/images/vr_back.svg); 123 background-image: url(../../../../ui/webui/resources/images/vr_back.svg);
136 } 124 }
137 125
138 #reload {
139 top: 138px;
140 }
141
142 #reload .button { 126 #reload .button {
143 background-image: url(../../../../ui/webui/resources/images/vr_reload.svg); 127 background-image: url(../../../../ui/webui/resources/images/vr_reload.svg);
144 } 128 }
145 129
146 #forward {
147 top: 276px;
148 }
149
150 #forward .button { 130 #forward .button {
151 background-image: url(../../../../ui/webui/resources/images/vr_back.svg); 131 background-image: url(../../../../ui/webui/resources/images/vr_back.svg);
152 transform: scaleX(-1); 132 transform: scaleX(-1);
153 } 133 }
154 134
155 #reload-ui-button { 135 #reload-ui-button {
156 background-color: #555; 136 background-color: #555;
157 color: white; 137 color: white;
158 font-size: 16; 138 font-size: 24px;
159 height: 24px; 139 padding: 12px;
160 left: 610px;
161 opacity: 1;
162 position: absolute;
163 text-align: center;
164 top: 0;
165 width: 96px;
166 } 140 }
167 141
168 #omni { 142 #omni {
169 --tranX: 0; 143 --tranX: 0;
170 --tranY: -0.5; 144 --tranY: -0.5;
171 --tranZ: -1.0; 145 --tranZ: -1.0;
146 align-items: center;
172 background-color: rgba(255, 255, 255, 0.9); 147 background-color: rgba(255, 255, 255, 0.9);
173 border-radius: 100px; 148 border-radius: 100px;
174 box-sizing: border-box; 149 box-sizing: border-box;
150 display: flex;
175 height: 104px; 151 height: 104px;
176 left: 0; 152 justify-content: center;
153 margin-bottom: 60px;
154 margin-top: 0;
177 opacity: 1; 155 opacity: 1;
178 position: absolute;
179 top: 402px;
180 transition: opacity 250ms ease, margin-top 250ms ease; 156 transition: opacity 250ms ease, margin-top 250ms ease;
181 white-space: nowrap; 157 white-space: nowrap;
182 width: 504px; 158 width: 512px;
183 } 159 }
184 160
185 #omni #connection-security { 161 #omni-content {
186 left: 35px; 162 align-items: center;
187 position: absolute; 163 display: flex;
188 top: 50%; 164 max-width: 448px;
189 transform: translateY(-50%); 165 }
166
167 #omni .connection-security {
168 height: 50px;
169 margin-right: 10px;
170 width: 50px;
190 } 171 }
191 172
192 #omni #url { 173 #omni #url {
193 color: #252525; 174 color: #252525;
194 font-size: 34px; 175 font-size: 34px;
195 left: 80px; 176 overflow: hidden;
196 position: absolute;
197 top: 50%;
198 transform: translateY(-50%);
199 white-space: nowrap; 177 white-space: nowrap;
200 } 178 }
201 179
202 #omni #path { 180 #omni #path {
203 color: #868686; 181 color: #868686;
204 } 182 }
205 183
206 #omni.hide { 184 #omni.hide {
185 margin-bottom: 0;
207 margin-top: 60px; 186 margin-top: 60px;
208 opacity: 0; 187 opacity: 0;
209 } 188 }
210 189
211 #omni.loading { 190 #omni.loading {
212 border: 4px solid rgb(86, 203, 255); 191 border: 4px solid rgb(86, 203, 255);
213 } 192 }
214 193
215 #omni.idle { 194 #omni.idle {
216 background-color: #ECECEC; 195 background-color: #ececec;
217 box-shadow: 0 2px 24px 0 rgba(0, 0, 0, 0.1);
218 } 196 }
219 197
220 #omni.idle #domain { 198 #omni.idle #domain {
221 color: black; 199 color: black;
222 } 200 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/vr_shell/vr_shell_ui.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698