OLD | NEW |
1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright 2014 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 /* TODO: Need to clean up @font-face after we remove font-family from body. */ | 5 /* TODO: Need to clean up @font-face after we remove font-family from body. */ |
6 @font-face { | 6 @font-face { |
7 font-family: 'Roboto2'; | 7 font-family: 'Roboto2'; |
8 font-weight: 400; | 8 font-weight: 400; |
9 src: local('Roboto'), local('Roboto2-Regular'), | 9 src: local('Roboto'), local('Roboto2-Regular'), |
10 url(chrome://resources/roboto/roboto.woff2) format('woff2'), | 10 url(chrome://resources/roboto/roboto.woff2) format('woff2'), |
11 url(chrome://resources/roboto/roboto.woff) format('woff'); | 11 url(chrome://resources/roboto/roboto.woff) format('woff'); |
12 } | 12 } |
13 | 13 |
14 /* TODO(pedrosimonetti): Find a better way to fix the problem when the | 14 /* TODO(pedrosimonetti): Find a better way to fix the problem when the |
15 * text scaling preference is set to a high value. | 15 * text scaling preference is set to a high value. |
16 * | 16 * |
17 * This CSS rule prevents the promo text from scaling as explained here: | 17 * This CSS rule prevents the promo text from scaling as explained here: |
18 * https://code.google.com/p/chromium/issues/detail?id=252828#c10 | 18 * https://code.google.com/p/chromium/issues/detail?id=252828#c10 |
19 * | 19 * |
20 * For for background about the problem, see: | 20 * For for background about the problem, see: |
21 * https://code.google.com/p/chromium/issues/detail?id=466773 | 21 * https://code.google.com/p/chromium/issues/detail?id=466773 |
22 */ | 22 */ |
23 #heading, | 23 #heading, |
24 #description { | 24 #description { |
25 max-height: 999999px; | 25 max-height: 999999px; |
26 } | 26 } |
27 | 27 |
28 body { | 28 body { |
29 color: #414141; | |
30 font-family: 'Roboto2', sans-serif; | 29 font-family: 'Roboto2', sans-serif; |
31 margin: 0; | 30 margin: 0; |
32 } | 31 } |
33 | 32 |
34 a { | 33 a { |
35 text-decoration: none; | 34 text-decoration: none; |
36 } | 35 } |
37 | 36 |
38 a.colored-link { | 37 a.colored-link { |
39 color: rgb(66, 133, 244); | 38 color: rgb(66, 133, 244); |
40 } | 39 } |
41 | 40 |
| 41 #container { |
| 42 /* NOTE(pedrosimonetti): There's an implicit extra top margin that is |
| 43 * rendered natively (currently using 24dp). So, the total padding will |
| 44 * be 38dp (24dp + 14dp). For more info, see SEARCH_BAR_HEIGHT_STATE_PROMO |
| 45 * in ContextualSearchPanelBase.java. |
| 46 * |
| 47 * We're also setting the side and bottom paddings to ensure to make sure |
| 48 * that when computing the height of the container all margins/paddings will |
| 49 * be considered. |
| 50 */ |
| 51 padding: 14px 16px 12px; |
| 52 } |
| 53 |
42 #button-container { | 54 #button-container { |
| 55 margin-top: 24px; |
43 text-align: end; | 56 text-align: end; |
44 width: 100%; | 57 width: 100%; |
45 } | 58 } |
46 | 59 |
47 #container.hide { | 60 #container.hide { |
48 -webkit-transform: scale(0.95); | 61 -webkit-transform: scale(0.95); |
49 -webkit-transition-duration: 130ms; | 62 -webkit-transition-duration: 130ms; |
50 -webkit-transition-property: opacity, -webkit-transform; | 63 -webkit-transition-property: opacity, -webkit-transform; |
51 opacity: 0; | 64 opacity: 0; |
52 } | 65 } |
53 | 66 |
54 #description { | 67 #description { |
| 68 color: #7E7E7E; |
55 font-size: 16px; | 69 font-size: 16px; |
56 line-height: 1.4em; | 70 line-height: 1.38em; |
57 margin: 24px 16px 4px 16px; | 71 margin: 12px 0 24px; |
58 } | 72 } |
59 | 73 |
60 /* Some properties below can be overridden in landscape orientation. */ | 74 /* Some properties below can be overridden in landscape orientation. */ |
61 #heading { | 75 #heading { |
62 font-size: 24px; | 76 font-size: 23px; |
63 letter-spacing: 1px; | 77 margin: 20px 0 12px; |
64 margin-top: 0; | |
65 text-align: center; | 78 text-align: center; |
66 } | 79 } |
67 #header-image { | 80 .header-image { |
68 height: 100px; | 81 background-image: url(header.svg); |
69 margin: 0 auto 24px auto; | 82 background-repeat: no-repeat; |
| 83 height: 98px; |
| 84 margin: 0 auto 38px auto; |
| 85 width: 156px; |
70 } | 86 } |
71 .portrait { | 87 .portrait { |
72 display: block; | 88 display: block; |
73 } | 89 } |
74 .landscape { | 90 .landscape { |
75 display: none; | 91 display: none; |
76 } | 92 } |
77 | 93 |
78 /* Landscape */ | 94 /* Landscape */ |
79 @media screen and (orientation:landscape) { | 95 @media screen and (orientation:landscape) { |
80 #heading { | 96 #heading { |
81 padding-top: 16px; | 97 margin-top: 0; |
| 98 /* The heading text and description text should be aligned, therefore |
| 99 * the left margin here will be equal to the header image width (156px) |
| 100 * plus its right margin (24px). Therefore the total left should be |
| 101 * 156px + 24px = 180px. |
| 102 */ |
| 103 margin-left: 180px; |
| 104 padding-top: 8px; |
| 105 text-align: left; |
82 } | 106 } |
83 #header-image { | 107 .header-image { |
84 margin: 0 24px; | 108 /* The header image is supposed to be vertically centered when the promo |
| 109 * is in landscape mode. For now, we're forcefully moving the image 4 |
| 110 * pixels up to make it centered. A better approach would be using CSS |
| 111 * flexbox to properly center it, but this will require changing the |
| 112 * markup and styling of the whole promo, and it could be tricky coming |
| 113 * up with a single markup that works in both portrait and lanscape modes. |
| 114 */ |
| 115 margin: 0 24px 0 0; |
| 116 position: relative; |
| 117 top: -4px; |
85 } | 118 } |
86 .portrait { | 119 .portrait { |
87 display: none; | 120 display: none; |
88 } | 121 } |
89 .landscape { | 122 .landscape { |
90 display: block; | 123 display: block; |
91 float: left; | 124 float: left; |
92 } | 125 } |
93 html[dir='rtl'] .landscape { | 126 html[dir='rtl'] .landscape { |
94 float: right; | 127 float: right; |
95 } | 128 } |
96 } | 129 } |
97 | 130 |
98 button { | 131 button { |
99 background: none; | 132 background: none; |
100 border: none; | 133 border: none; |
101 display: inline-block; | 134 display: inline-block; |
102 font-family: 'Roboto2', sans-serif; | 135 font-family: 'Roboto2', sans-serif; |
103 font-size: 14px; | 136 font-size: 14px; |
104 margin: 14px 0; | 137 margin: 6px 0; |
105 /* We use a slightly different top-bottom padding because Roboto has a | 138 /* We use a slightly different top-bottom padding because Roboto has a |
106 rendering bug which makes an extra padding to be rendered at the bottom of | 139 * rendering bug which makes an extra padding to be rendered at the bottom of |
107 text. */ | 140 * text. |
108 padding: 17px 14px 13px 14px; | 141 */ |
| 142 padding: 12px 16px 8px; |
109 white-space: nowrap; | 143 white-space: nowrap; |
110 } | 144 } |
111 | 145 |
112 button .caption { | 146 button .caption { |
113 text-transform: uppercase; | 147 text-transform: uppercase; |
114 } | 148 } |
115 | 149 |
116 #optin-button { | 150 #optin-button { |
117 background: rgb(66, 133, 244); | 151 background: rgb(66, 133, 244); |
118 background-clip: padding-box; | 152 background-clip: padding-box; |
119 border-radius: 3px; | 153 border-radius: 3px; |
120 margin-right: 24px; | |
121 } | 154 } |
122 | 155 |
123 #optin-button .caption { | 156 #optin-button .caption { |
124 color: white; | 157 color: white; |
125 } | 158 } |
126 | 159 |
127 #optout-button .caption { | 160 #optout-button .caption { |
128 color: rgb(66, 133, 244); | 161 color: rgb(66, 133, 244); |
129 } | 162 } |
OLD | NEW |