Extension syncing: Introduce a NeedsSync pref
[chromium-blink-merge.git] / ui / webui / resources / css / tree.css
blob76a30698c44682d7efc2e2bb4ce604eeecc36ed7
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
3 * found in the LICENSE file. */
5 tree {
6 display: block;
7 outline: none;
8 overflow: auto;
11 .tree-item > .tree-row {
12 -webkit-user-select: none;
13 background-color: rgba(255, 255, 255, 0);
14 border: 1px solid rgba(255, 255, 255, 0); /* transparent white */
15 border-radius: 2px;
16 color: black;
17 cursor: default;
18 line-height: 28px;
19 padding: 0 3px;
20 position: relative;
21 white-space: nowrap;
24 .expand-icon {
25 -webkit-transform: rotate(-90deg);
26 -webkit-transition: all 150ms;
27 background-image: -webkit-canvas(tree-triangle);
28 background-position: 50% 50%;
29 background-repeat: no-repeat;
30 background-size: 8px 5px;
31 display: inline-block;
32 height: 16px;
33 opacity: .6;
34 position: relative;
35 top: 6px;
36 vertical-align: top;
37 width: 16px;
40 html[dir=rtl] .expand-icon {
41 -webkit-transform: rotate(90deg);
44 .tree-item[expanded] > .tree-row > .expand-icon {
45 -webkit-transform: rotate(0);
46 background-image: -webkit-canvas(tree-triangle);
47 opacity: .5;
50 .tree-row .expand-icon {
51 visibility: hidden;
54 .tree-row[may-have-children] .expand-icon {
55 visibility: visible;
58 .tree-row[has-children=false] .expand-icon {
59 visibility: hidden;
62 .tree-row:hover {
63 background-color: hsl(214, 91%, 97%);
64 border-color: hsl(214, 91%, 85%);
65 z-index: 1;
69 WebKit has a bug with attribute selectors so we apply selected to the tree row
70 as well.
72 https://bugs.webkit.org/show_bug.cgi?id=12519
75 .tree-row[selected] {
76 background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.8),
77 rgba(255,255,255,0));
80 .tree-row[selected] {
81 background-color: hsl(0, 0%, 90%);
82 border-color: hsl(0, 0%, 85%);
83 z-index: 2;
86 .tree-row[selected]:hover,
87 tree:focus .tree-row[selected] {
88 background-color: hsl(214, 91%, 89%);
89 border-color: rgb(125, 162, 206);
92 .tree-children[expanded] {
93 display: block;
96 .tree-children {
97 display: none;
100 .tree-item > .tree-row > * {
101 box-sizing: border-box;
102 display: inline-block;
105 .tree-label {
106 -webkit-padding-start: 20px;
107 background-position: 0 50%;
108 background-repeat: no-repeat;
109 white-space: pre;
112 html[dir=rtl] .tree-label {
113 background-position: 100% 50%;
116 html[dir=rtl] .tree-label,
117 html[dir=rtl] .tree-row[may-have-children] > .tree-label {
118 background-image: -webkit-image-set(
119 url(../../../resources/default_100_percent/common/folder_closed_rtl.png) 1x,
120 url(../../../resources/default_200_percent/common/folder_closed_rtl.png) 2x);
123 html[dir=rtl] .tree-item[expanded] > .tree-row > .tree-label {
124 background-image: -webkit-image-set(
125 url(../../../views/resources/default_100_percent/common/folder_open_rtl.png) 1x,
126 url(../../../views/resources/default_200_percent/common/folder_open_rtl.png) 2x);
129 tree[icon-visibility=hidden] .tree-label {
130 -webkit-padding-start: 0;
131 background-image: none !important;
134 tree[icon-visibility=parent] .tree-label,
135 tree[icon-visibility=parent] .tree-row[has-children=false] > .tree-label {
136 background-image: none;
139 .tree-label,
140 .tree-row[may-have-children] > .tree-label {
141 background-image: -webkit-image-set(
142 url(../../../resources/default_100_percent/common/folder_closed.png) 1x,
143 url(../../../resources/default_200_percent/common/folder_closed.png) 2x);
146 .tree-item[expanded] > .tree-row > .tree-label {
147 background-image: -webkit-image-set(
148 url(../../../views/resources/default_100_percent/common/folder_open.png) 1x,
149 url(../../../views/resources/default_200_percent/common/folder_open.png) 2x);
152 /* We need to ensure that even empty labels take up space */
153 .tree-label:empty::after {
154 content: ' ';
155 white-space: pre;
158 .tree-rename > .tree-row > .tree-label {
159 -webkit-user-modify: read-write-plaintext-only;
160 -webkit-user-select: auto;
161 background: white;
162 color: black;
163 outline: 1px solid black;
166 .tree-item[editing] input {
167 /* Do not inherit the line-height */
168 font-family: inherit;
169 font-size: inherit;
170 font-weight: inherit;
171 margin: -2px -8px -2px -3px;
172 <if expr="not is_macosx and not is_ios">
173 outline: none;
174 </if>
175 padding: 1px 7px 1px 1px;
178 html[dir=rtl] .tree-item[editing] input {
179 margin: -2px -3px -2px -8px;
180 padding: 1px 1px 1px 7px;