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. */ 4 5<include src="../search_header.css"> 6 7html, 8body { 9 cursor: default; 10 height: 100%; 11 margin: 0; 12 overflow: hidden; 13 width: 100%; 14} 15 16body { 17 -webkit-flex-direction: column; 18 display: -webkit-flex; 19} 20 21list { 22 display: block; 23 overflow-x: hidden; 24 overflow-y: visible; /* let the container do the scrolling */ 25} 26 27list > * { 28 -webkit-padding-end: 20px; 29 -webkit-padding-start: 3px; 30 color: hsl(0, 0%, 70%); 31 display: -webkit-flex; 32 line-height: 20px; 33 margin: 0; 34 overflow: visible; 35 padding-bottom: 0; 36 padding-top: 0; 37 text-decoration: none; 38 white-space: nowrap; 39} 40 41list > * > * { 42 -webkit-padding-start: 20px; 43 background: 0 50% no-repeat; 44 box-sizing: border-box; 45 overflow: hidden; 46 text-overflow: ellipsis; 47 white-space: pre; /* Don't collapse whitespace */ 48} 49 50list > * > .label { 51 -webkit-transition: all 150ms; 52 color: black; 53 display: inline-block; /* We need to use inline-block here due to RTL. */ 54} 55 56list > * > .url { 57 -webkit-flex: 1; 58 direction: ltr; /* URLs always read LTR */ 59 display: none; 60} 61 62list > :hover > .url, 63list > [selected] > .url { 64 display: block; 65} 66 67/* Handle proper padding for URL field in an RTL context, where field order is 68 * |div.url||div.label| - so we need padding at the right of URL, not at the 69 * left. And since url is always LTR, that is padding at the end, not the start. 70 */ 71html[dir=rtl] .url { 72 -webkit-padding-end: 20px; 73 -webkit-padding-start: 0; 74} 75 76html[dir=rtl] list .label { 77 background-position: 100% 50%; 78} 79 80list > .folder > .label { 81 background-image: -webkit-image-set( 82 url('../../../../../ui/resources/default_100_percent/common/folder_closed.png') 1x, 83 url('../../../../../ui/resources/default_200_percent/common/folder_closed.png') 2x); 84} 85 86/* We need to ensure that even empty labels take up space */ 87list > * > .label:empty::after, 88list > * > .url:empty::after { 89 content: ' '; 90 white-space: pre; 91} 92 93list > .folder > .url:empty::after { 94 content: ''; 95} 96 97list > * > button { 98 -webkit-transition: opacity 150ms; 99 background: #fff -webkit-canvas(drop-down-arrow) no-repeat center center; 100 border: 1px solid hsl(214, 91%, 85%); 101 border-radius: 3px; 102 bottom: 1px; 103 display: none; 104 overflow: hidden; 105 padding: 0; 106 position: absolute; 107 right: 3px; 108 top: 1px; 109 width: 15px; 110} 111 112list > [selected]:hover > button, 113list > * > button[menu-shown] { 114 border-color: hsl(214, 91%, 65%); 115} 116 117list > :hover > button { 118 display: block; 119} 120 121list > * > button:hover, 122list > * > button[menu-shown] { 123 display: block; 124} 125 126html[dir=rtl] list > * > button { 127 left: 3px; 128 right: auto; 129} 130 131/* Edit mode */ 132 133list [editing] .label input, 134list [editing] .url input { 135 -webkit-margin-end: 4px; 136 -webkit-margin-start: -4px; 137 -webkit-padding-end: 3px; 138 -webkit-padding-start: 3px; 139 box-sizing: content-box; 140 font-family: inherit; 141 font-size: inherit; 142 font-weight: inherit; 143 /* Do not inherit the line-height. */ 144 line-height: normal; 145 margin-bottom: 0; 146 margin-top: 0; 147 min-height: 0; 148 text-decoration: none; 149 vertical-align: baseline; 150} 151 152.tree-item [editing] input { 153 line-height: normal; 154 margin: 0; 155 min-height: 0; 156 padding: 1px 0; 157} 158 159<if expr="is_macosx"> 160list .label input, 161list .url input { 162 outline: none; 163} 164</if> 165 166list > [editing] { 167 overflow: visible; 168} 169 170list [editing] .label, 171list [editing] .url, 172list [editing] > * { 173 overflow: visible; 174} 175 176list [editing] .url { 177 -webkit-padding-start: 5px; 178} 179 180list [editing] input { 181 padding: 1px 0; 182} 183 184/* end editing */ 185 186html[dir=rtl] list > .folder > .label { 187 background-image: -webkit-image-set( 188 url('../../../../../ui/resources/default_100_percent/common/folder_closed_rtl.png') 1x, 189 url('../../../../../ui/resources/default_200_percent/common/folder_closed_rtl.png') 2x); 190} 191 192<if expr="is_macosx"> 193list > .folder > .label, 194.tree-label, 195.tree-row[may-have-children] > .tree-label, 196.tree-item[expanded] > .tree-row > .tree-label { 197 background-image: -webkit-image-set( 198 url('../../../../app/theme/default_100_percent/mac/bookmark_bar_folder.png') 1x, 199 url('../../../../app/theme/default_200_percent/mac/bookmark_bar_folder.png') 2x); 200} 201</if> 202 203.main { 204 -webkit-flex: 1; 205 display: -webkit-flex; 206} 207 208#tree-container { 209 -webkit-padding-end: 5px; 210 -webkit-padding-start: 10px; 211 box-sizing: border-box; 212 /* min-width and max-width are used by the split pane. */ 213 max-width: 50%; 214 min-width: 50px; 215 overflow: auto; 216 padding-bottom: 5px; 217 padding-top: 5px; 218 width: 200px; 219} 220 221#tree { 222 display: inline-block; 223 min-width: 100%; 224 overflow: visible; /* let the container do the scrolling */ 225} 226 227.tree-item > .tree-row { 228 line-height: 20px; 229} 230 231.tree-row .expand-icon { 232 top: 2px; 233} 234 235#list { 236 -webkit-flex: 1; 237 -webkit-padding-end: 5px; 238 box-sizing: border-box; 239 padding-bottom: 5px; 240 padding-top: 5px; 241} 242 243.splitter { 244 -webkit-border-end: 15px solid white; 245 -webkit-border-start: 0; 246 background-color: rgb(235, 239, 249); 247 cursor: e-resize; 248 width: 5px; 249<if expr="is_macosx"> 250 cursor: col-resize; 251</if> 252} 253 254.tree-row.drag-on, 255.drag-on { 256 background-color: hsla(214, 91%, 85%, .5); 257 border: 1px solid hsl(214, 91%, 85%); 258 border-radius: 3px; 259 box-sizing: border-box; 260} 261 262.drag-above::before, 263.drag-below::after { 264 background-clip: padding-box; 265 background-color: black; 266 border: 3px solid black; 267 border-bottom-color: transparent; 268 border-radius: 0; 269 border-top-color: transparent; 270 box-sizing: border-box; 271 content: ''; 272 display: block; 273 height: 8px; 274 left: 0; 275 position: absolute; 276 right: 0; 277 z-index: 10; 278} 279 280.drag-above::before { 281 top: calc((8px/2 + 1px) * -1) 282} 283 284.drag-below::after { 285 bottom: calc((8px/2 + 1px) * -1) 286} 287 288list.drag-above::before { 289 top: 0 290} 291 292list > .drag-below, 293list > .drag-above { 294 overflow : visible; 295} 296 297.summary > * { 298 font-size: 100%; 299 margin: 0; 300} 301 302.summary button { 303 -webkit-appearance: none; 304 -webkit-margin-start: 16px; 305 -webkit-padding-end: 11px; 306 -webkit-padding-start: 0; 307 background: transparent -webkit-canvas(drop-down-arrow) 308 no-repeat right center; 309 border: 0; 310 font: inherit; 311 font-weight: bold; 312 padding-bottom: 0; 313 padding-top: 0; 314} 315 316html[dir=rtl] .summary button { 317 background-position: left center; 318} 319 320@media (pointer:coarse) { 321 list > *, 322 menu > button, 323 .tree-item > .tree-row { 324 line-height: 28px; 325 } 326 327 list [editing] input, 328 .tree-item [editing] input { 329 padding: 3px 0; 330 } 331 332 .tree-row .expand-icon { 333 top: 6px; 334 } 335} 336