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-image: -webkit-canvas
(tree-triangle
);
28 background-position: 50% 50%;
29 background-repeat: no-repeat
;
30 background-size: 8px 5px;
31 display: inline-block
;
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
);
50 .tree-row .expand-icon {
54 .tree-row[may-have-children] .expand-icon {
58 .tree-row[has-children=false] .expand-icon {
63 background-color: hsl
(214, 91%, 97%);
64 border-color: hsl
(214, 91%, 85%);
69 WebKit has a bug with attribute selectors so we apply selected to the tree row
72 https://bugs.webkit.org/show_bug.cgi?id=12519
76 background-image: -webkit-linear-gradient
(rgba
(255, 255, 255, 0.8),
81 background-color: hsl
(0, 0%, 90%);
82 border-color: hsl
(0, 0%, 85%);
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] {
100 .tree-item > .tree-row > * {
101 box-sizing: border-box
;
102 display: inline-block
;
106 -webkit-padding-start: 20px;
107 background-position: 0 50%;
108 background-repeat: no-repeat
;
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
;
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 {
158 .tree-rename > .tree-row > .tree-label {
159 -webkit-user-modify: read-write-plaintext-only
;
160 -webkit-user-select: auto
;
163 outline: 1px solid black
;
166 .tree-item[editing] input {
167 /* Do not inherit the line-height */
168 font-family: inherit
;
170 font-weight: inherit
;
171 margin: -2px -8px -2px -3px;
172 <if expr
="not is_macosx and not is_ios">
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;