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. */
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 */
25 -webkit-transform: rotate
(-90deg);
26 -webkit-transition: all
150ms;
27 background: url
(../images/tree_triangle.svg) no-repeat center center
;
28 background-size: 8px 5px;
29 display: inline-block
;
38 html
[dir
=rtl
] .expand-icon
{
39 -webkit-transform: rotate
(90deg);
42 .tree-item[expanded] > .tree-row > .expand-icon {
43 -webkit-transform: rotate
(0);
44 background-image: url
(../images/tree_triangle.svg);
48 .tree-row .expand-icon {
52 .tree-row[may-have-children] .expand-icon {
56 .tree-row[has-children=false] .expand-icon {
61 background-color: hsl
(214, 91%, 97%);
62 border-color: hsl
(214, 91%, 85%);
67 WebKit has a bug with attribute selectors so we apply selected to the tree row
70 https://bugs.webkit.org/show_bug.cgi?id=12519
74 background-image: -webkit-linear-gradient
(rgba
(255, 255, 255, 0.8),
79 background-color: hsl
(0, 0%, 90%);
80 border-color: hsl
(0, 0%, 85%);
84 .tree-row
[selected
]:hover
,
85 tree:focus
.tree-row
[selected
] {
86 background-color: hsl
(214, 91%, 89%);
87 border-color: rgb
(125, 162, 206);
90 .tree-children[expanded] {
98 .tree-item > .tree-row > * {
99 box-sizing: border-box
;
100 display: inline-block
;
104 -webkit-padding-start: 20px;
105 background-position: 0 50%;
106 background-repeat: no-repeat
;
110 html
[dir
=rtl
] .tree-label
{
111 background-position: 100% 50%;
114 html
[dir
=rtl
] .tree-label
,
115 html
[dir
=rtl
] .tree-row
[may-have-children
] > .tree-label
{
116 background-image: -webkit-image-set
(
117 url
(../../../resources/default_100_percent/common/folder_closed_rtl.png) 1x,
118 url
(../../../resources/default_200_percent/common/folder_closed_rtl.png) 2x);
121 html
[dir
=rtl
] .tree-item
[expanded
] > .tree-row
> .tree-label
{
122 background-image: -webkit-image-set
(
123 url
(../../../views/resources/default_100_percent/common/folder_open_rtl.png) 1x,
124 url
(../../../views/resources/default_200_percent/common/folder_open_rtl.png) 2x);
127 tree
[icon-visibility
=hidden
] .tree-label
{
128 -webkit-padding-start: 0;
129 background-image: none
!important
;
132 tree
[icon-visibility
=parent
] .tree-label
,
133 tree
[icon-visibility
=parent
] .tree-row
[has-children
=false
] > .tree-label
{
134 background-image: none
;
138 .tree-row[may-have-children] > .tree-label {
139 background-image: -webkit-image-set
(
140 url
(../../../resources/default_100_percent/common/folder_closed.png) 1x,
141 url
(../../../resources/default_200_percent/common/folder_closed.png) 2x);
144 .tree-item[expanded] > .tree-row > .tree-label {
145 background-image: -webkit-image-set
(
146 url
(../../../views/resources/default_100_percent/common/folder_open.png) 1x,
147 url
(../../../views/resources/default_200_percent/common/folder_open.png) 2x);
150 /* We need to ensure that even empty labels take up space */
151 .tree-label:empty::after {
156 .tree-rename > .tree-row > .tree-label {
157 -webkit-user-modify: read-write-plaintext-only
;
158 -webkit-user-select: auto
;
161 outline: 1px solid black
;
164 .tree-item[editing] input {
165 /* Do not inherit the line-height */
166 font-family: inherit
;
168 font-weight: inherit
;
169 margin: -2px -8px -2px -3px;
170 <if expr
="not is_macosx and not is_ios">
173 padding: 1px 7px 1px 1px;
176 html
[dir
=rtl
] .tree-item
[editing
] input
{
177 margin: -2px -3px -2px -8px;
178 padding: 1px 1px 1px 7px;