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

Side by Side Diff: ui/webui/resources/css/trash.css

Issue 952053003: extensions: allow trash to have a focus outline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 .trash { 5 .trash {
6 -webkit-appearance: none; 6 -webkit-appearance: none;
7 background: none; 7 background: none;
8 border: none; 8 border: none;
9 cursor: pointer; 9 cursor: pointer;
10 display: inline-block; 10 display: inline-block;
11 outline: none; 11 outline: none;
12 padding: 0; 12 padding: 0;
13 position: relative; 13 position: relative;
14 width: 30px; 14 width: 30px;
15 z-index: 0;
15 } 16 }
16 17
17 .trash > span { 18 .trash :-webkit-any(.can, .lid, .halo) {
18 display: inline-block; 19 display: inline-block;
20 position: absolute;
19 } 21 }
20 22
21 .trash > .can, 23 .trash > :-webkit-any(.can, .lid) {
22 .trash > .lid {
23 background: url(chrome://resources/images/trash.png) 0 0 no-repeat; 24 background: url(chrome://resources/images/trash.png) 0 0 no-repeat;
24 left: 8px; 25 left: 8px;
25 position: absolute;
26 right: 8px; 26 right: 8px;
27 top: 2px; 27 top: 2px;
28 z-index: 2;
28 } 29 }
29 30
30 .trash > .lid { 31 .trash .lid {
31 -webkit-transform-origin: -7% 100%;
32 -webkit-transition: -webkit-transform 150ms;
33 height: 6px; 32 height: 6px;
34 width: 14px; 33 width: 14px;
35 } 34 }
36 35
37 html[dir='rtl'] .trash > .lid { 36 .trash .can {
38 -webkit-transform-origin: 107% 100%;
39 }
40
41 .trash:focus > .lid,
42 .trash:hover > .lid {
43 -webkit-transform: rotate(-45deg);
44 -webkit-transition: -webkit-transform 250ms;
45 }
46
47 html[dir='rtl'] .trash:focus > .lid,
48 html[dir='rtl'] .trash:hover > .lid {
49 -webkit-transform: rotate(45deg);
50 }
51
52 .trash > .can {
53 background-position: -1px -4px; 37 background-position: -1px -4px;
54 height: 12px; 38 height: 12px;
55 /* The margins match the background position offsets. */ 39 /* The margins match the background position offsets. */
56 margin-left: 1px; 40 margin-left: 1px;
57 /* The right margin is one greater due to a shadow on the trash image. */ 41 /* The right margin is one greater due to a shadow on the trash image. */
58 margin-right: 2px; 42 margin-right: 2px;
59 margin-top: 4px; 43 margin-top: 4px;
60 width: 11px; 44 width: 11px;
61 } 45 }
46
47 /* NOTE: "> .halo" only applies to the lid's halo element. */
48
49 .trash > .halo {
50 height: 5px;
51 right: 9px;
52 top: 3px;
53 width: 13px;
54 }
55
56 .trash > :-webkit-any(.lid, .halo) {
57 -webkit-transform-origin: -7% 100%;
58 -webkit-transition: -webkit-transform 150ms;
59 }
60
61 html[dir='rtl'] .trash > :-webkit-any(.lid, .halo) {
62 -webkit-transform-origin: 107% 100%;
63 }
64
65 .trash:-webkit-any(:focus, :hover, .open) > :-webkit-any(.lid, .halo) {
66 -webkit-transform: rotate(-45deg);
67 -webkit-transition: -webkit-transform 250ms;
68 }
69
70 html[dir='rtl'] .trash:-webkit-any(:focus, :hover, .open) >
71 :-webkit-any(.lid, .halo) {
72 -webkit-transform: rotate(45deg);
73 }
74
75 .halo {
76 border-radius: 2px;
77 z-index: 1;
78 }
79
80 .can .halo {
81 bottom: 1px;
82 border-top-left-radius: 0;
83 border-top-right-radius: 0;
84 left: 0;
85 right: 0;
86 top: 0;
87 }
88
89 .trash:focus .halo {
90 box-shadow: 0 0 2px rgb(77, 144, 254);
91 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698