Remove linux_chromium_gn_dbg from the chromium CQ.
[chromium-blink-merge.git] / extensions / renderer / resources / extension.css
blob808a08ce151e90722d970e1179296a34d1880270
1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
6 * This stylesheet is used to apply Chrome styles to extension pages that opt in
7 * to using them.
9 * These styles have been copied from ui/webui/resources/css/chrome_shared.css
10 * and ui/webui/resources/css/widgets.css *with CSS class logic removed*, so
11 * that it's as close to a user-agent stylesheet as possible.
13 * For example, extensions shouldn't be able to set a .link-button class and
14 * have it do anything.
16 * Other than that, keep this file and chrome_shared.css/widgets.cc in sync as
17 * much as possible.
20 body {
21 color: #333;
22 cursor: default;
23 /* Note that the correct font-family and font-size are set in
24 * extension_fonts.css. */
25 /* This top margin of 14px matches the top padding on the h1 element on
26 * overlays (see the ".overlay .page h1" selector in overlay.css), which
27 * every dialogue has.
29 * Similarly, the bottom 14px margin matches the bottom padding of the area
30 * which hosts the buttons (see the ".overlay .page * .action-area" selector
31 * in overlay.css).
33 * Both have a padding left/right of 17px.
35 * Note that we're putting this here in the Extension content, rather than
36 * the WebUI element which contains the content, so that scrollbars in the
37 * Extension content don't get a 6px margin, which looks quite odd.
39 margin: 14px 17px;
42 p {
43 line-height: 1.8em;
46 h1,
47 h2,
48 h3 {
49 -webkit-user-select: none;
50 font-weight: normal;
51 /* Makes the vertical size of the text the same for all fonts. */
52 line-height: 1;
55 h1 {
56 font-size: 1.5em;
59 h2 {
60 font-size: 1.3em;
61 margin-bottom: 0.4em;
64 h3 {
65 color: black;
66 font-size: 1.2em;
67 margin-bottom: 0.8em;
70 a {
71 color: rgb(17, 85, 204);
72 text-decoration: underline;
75 a:active {
76 color: rgb(5, 37, 119);
79 /* Default state **************************************************************/
81 :-webkit-any(button,
82 input[type='button'],
83 input[type='submit']),
84 select,
85 input[type='checkbox'],
86 input[type='radio'] {
87 -webkit-appearance: none;
88 -webkit-user-select: none;
89 background-image: linear-gradient(#ededed, #ededed 38%, #dedede);
90 border: 1px solid rgba(0, 0, 0, 0.25);
91 border-radius: 2px;
92 box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08),
93 inset 0 1px 2px rgba(255, 255, 255, 0.75);
94 color: #444;
95 font: inherit;
96 margin: 0 1px 0 0;
97 outline: none;
98 text-shadow: 0 1px 0 rgb(240, 240, 240);
101 :-webkit-any(button,
102 input[type='button'],
103 input[type='submit']),
104 select {
105 min-height: 2em;
106 min-width: 4em;
107 <if expr="is_win">
108 /* The following platform-specific rule is necessary to get adjacent
109 * buttons, text inputs, and so forth to align on their borders while also
110 * aligning on the text's baselines. */
111 padding-bottom: 1px;
112 </if>
115 :-webkit-any(button,
116 input[type='button'],
117 input[type='submit']) {
118 -webkit-padding-end: 10px;
119 -webkit-padding-start: 10px;
122 select {
123 -webkit-appearance: none;
124 -webkit-padding-end: 20px;
125 -webkit-padding-start: 6px;
126 /* OVERRIDE */
127 background-image: url(../../../ui/webui/resources/images/select.png),
128 linear-gradient(#ededed, #ededed 38%, #dedede);
129 background-position: right center;
130 background-repeat: no-repeat;
133 html[dir='rtl'] select {
134 background-position: center left;
137 input[type='checkbox'] {
138 height: 13px;
139 position: relative;
140 vertical-align: middle;
141 width: 13px;
144 input[type='radio'] {
145 /* OVERRIDE */
146 border-radius: 100%;
147 height: 15px;
148 position: relative;
149 vertical-align: middle;
150 width: 15px;
153 /* TODO(estade): add more types here? */
154 input[type='number'],
155 input[type='password'],
156 input[type='search'],
157 input[type='text'],
158 input[type='url'],
159 input:not([type]),
160 textarea {
161 border: 1px solid #bfbfbf;
162 border-radius: 2px;
163 box-sizing: border-box;
164 color: #444;
165 font: inherit;
166 margin: 0;
167 /* Use min-height to accommodate addditional padding for touch as needed. */
168 min-height: 2em;
169 padding: 3px;
170 outline: none;
171 <if expr="is_win or is_macosx or is_ios">
172 /* For better alignment between adjacent buttons and inputs. */
173 padding-bottom: 4px;
174 </if>
177 input[type='search'] {
178 -webkit-appearance: textfield;
179 /* NOTE: Keep a relatively high min-width for this so we don't obscure the end
180 * of the default text in relatively spacious languages (i.e. German). */
181 min-width: 160px;
184 /* Remove when https://bugs.webkit.org/show_bug.cgi?id=51499 is fixed.
185 * TODO(dbeam): are there more types that would benefit from this? */
186 input[type='search']::-webkit-textfield-decoration-container {
187 direction: inherit;
190 /* Checked ********************************************************************/
192 input[type='checkbox']:checked::before {
193 -webkit-user-select: none;
194 background-image: url(../../../ui/webui/resources/images/check.png);
195 background-size: 100% 100%;
196 content: '';
197 display: block;
198 height: 100%;
199 width: 100%;
202 input[type='radio']:checked::before {
203 background-color: #666;
204 border-radius: 100%;
205 bottom: 3px;
206 content: '';
207 display: block;
208 left: 3px;
209 position: absolute;
210 right: 3px;
211 top: 3px;
214 /* Hover **********************************************************************/
216 :enabled:hover:-webkit-any(
217 select,
218 input[type='checkbox'],
219 input[type='radio'],
220 :-webkit-any(
221 button,
222 input[type='button'],
223 input[type='submit'])) {
224 background-image: linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
225 border-color: rgba(0, 0, 0, 0.3);
226 box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12),
227 inset 0 1px 2px rgba(255, 255, 255, 0.95);
228 color: black;
231 :enabled:hover:-webkit-any(select) {
232 /* OVERRIDE */
233 background-image: url(../../../ui/webui/resources/images/select.png),
234 linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
237 /* Active *********************************************************************/
239 :enabled:active:-webkit-any(
240 select,
241 input[type='checkbox'],
242 input[type='radio'],
243 :-webkit-any(
244 button,
245 input[type='button'],
246 input[type='submit'])) {
247 background-image: linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
248 box-shadow: none;
249 text-shadow: none;
252 :enabled:active:-webkit-any(select) {
253 /* OVERRIDE */
254 background-image: url(../../../ui/webui/resources/images/select.png),
255 linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
258 /* Disabled *******************************************************************/
260 :disabled:-webkit-any(
261 button,
262 input[type='button'],
263 input[type='submit']),
264 select:disabled {
265 background-image: linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
266 border-color: rgba(80, 80, 80, 0.2);
267 box-shadow: 0 1px 0 rgba(80, 80, 80, 0.08),
268 inset 0 1px 2px rgba(255, 255, 255, 0.75);
269 color: #aaa;
272 select:disabled {
273 /* OVERRIDE */
274 background-image: url(../../../ui/webui/resources/images/disabled_select.png),
275 linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
278 input:disabled:-webkit-any([type='checkbox'],
279 [type='radio']) {
280 opacity: .75;
283 input:disabled:-webkit-any([type='password'],
284 [type='search'],
285 [type='text'],
286 [type='url'],
287 :not([type])) {
288 color: #999;
291 /* Focus **********************************************************************/
293 :enabled:focus:-webkit-any(
294 select,
295 input[type='checkbox'],
296 input[type='number'],
297 input[type='password'],
298 input[type='radio'],
299 input[type='search'],
300 input[type='text'],
301 input[type='url'],
302 input:not([type]),
303 :-webkit-any(
304 button,
305 input[type='button'],
306 input[type='submit'])) {
307 /* OVERRIDE */
308 -webkit-transition: border-color 200ms;
309 /* We use border color because it follows the border radius (unlike outline).
310 * This is particularly noticeable on mac. */
311 border-color: rgb(77, 144, 254);
312 outline: none;
315 /* Checkbox/radio helpers ******************************************************
317 * .checkbox and .radio classes wrap labels. Checkboxes and radios should use
318 * these classes with the markup structure:
320 * <div class="checkbox">
321 * <label>
322 * <input type="checkbox"></input>
323 * <span>
324 * </label>
325 * </div>
328 :-webkit-any(.checkbox, .radio) label {
329 /* Don't expand horizontally: <http://crbug.com/112091>. */
330 align-items: center;
331 display: inline-flex;
332 padding-bottom: 7px;
333 padding-top: 7px;
336 :-webkit-any(.checkbox, .radio) label input {
337 flex-shrink: 0;
340 :-webkit-any(.checkbox, .radio) label input ~ span {
341 -webkit-margin-start: 0.6em;
342 /* Make sure long spans wrap at the same horizontal position they start. */
343 display: block;
346 :-webkit-any(.checkbox, .radio) label:hover {
347 color: black;
350 label > input:disabled:-webkit-any([type='checkbox'], [type='radio']) ~ span {
351 color: #999;