Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 | * Use of this source code is governed by a BSD-style license that can be |
| 4 | * found in the LICENSE file. |
| 5 | */ |
| 6 | |
| 7 | :host { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 8 | flex: 1 1 auto; |
| 9 | padding: 2px 0 0 0; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 10 | } |
| 11 | |
| 12 | .tree-outline-disclosure:not(.tree-outline-disclosure-hide-overflow) { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 13 | min-width: 100%; |
| 14 | display: inline-block; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | .tree-outline { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 18 | padding: 0 0 4px 4px; |
| 19 | margin: 0; |
| 20 | z-index: 0; |
| 21 | position: relative; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 22 | } |
| 23 | |
Peter Marshall | 9a3d85f | 2020-08-12 14:38:00 | [diff] [blame] | 24 | .tree-outline:focus-visible { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 25 | box-shadow: 0 0 0 2px var(--accent-color) inset; |
Amanda Baker | 05d6a23 | 2019-10-24 01:23:35 | [diff] [blame] | 26 | } |
| 27 | |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 28 | .tree-outline li .selection { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 29 | display: none; |
| 30 | z-index: -1; |
| 31 | margin-left: -10000px; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 32 | } |
| 33 | |
James Lissiak | 02a851d | 2019-03-27 16:03:22 | [diff] [blame] | 34 | .tree-outline:not(.hide-selection-when-blurred) li.selected { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 35 | color: var(--selection-inactive-fg-color); |
James Lissiak | 02a851d | 2019-03-27 16:03:22 | [diff] [blame] | 36 | } |
| 37 | |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 38 | .tree-outline:not(.hide-selection-when-blurred) li.selected .selection { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 39 | display: block; |
| 40 | background-color: var(--selection-inactive-bg-color); |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 41 | } |
| 42 | |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 43 | .tree-outline:not(.hide-selection-when-blurred) li.elements-drag-over .selection { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 44 | display: block; |
| 45 | margin-top: -2px; |
| 46 | border-top: 2px solid; |
| 47 | border-top-color: var(--selection-bg-color); |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 48 | } |
| 49 | |
Yang Guo | f5996c9 | 2020-07-06 07:50:54 | [diff] [blame] | 50 | .tree-outline:not(.hide-selection-when-blurred) li.hovered:not(.selected) .selection { |
| 51 | display: block; |
| 52 | left: 3px; |
| 53 | right: 3px; |
| 54 | background-color: var(--item-hover-color); |
| 55 | border-radius: 5px; |
| 56 | } |
| 57 | |
| 58 | .tree-outline:not(.hide-selection-when-blurred) li.in-clipboard .highlight { |
| 59 | outline: 1px dotted darkgrey; |
| 60 | } |
| 61 | |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 62 | ol.tree-outline:not(.hide-selection-when-blurred) li.selected:focus .selection { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 63 | background-color: var(--selection-bg-color); |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 64 | } |
| 65 | |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 66 | ol.tree-outline:not(.hide-selection-when-blurred) li.parent.selected:focus::before { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 67 | background-color: var(--selection-fg-color); |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | ol.tree-outline, |
| 71 | .tree-outline ol { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 72 | list-style-type: none; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 73 | } |
| 74 | |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 75 | .tree-outline ol { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 76 | padding-left: 12px; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | .tree-outline li { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 80 | text-overflow: ellipsis; |
| 81 | white-space: nowrap; |
| 82 | position: relative; |
| 83 | display: flex; |
| 84 | align-items: center; |
| 85 | min-height: 16px; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 86 | } |
| 87 | |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 88 | ol.tree-outline:not(.hide-selection-when-blurred) li.selected:focus { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 89 | color: var(--selection-fg-color); |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 90 | } |
| 91 | |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 92 | ol.tree-outline:not(.hide-selection-when-blurred) li.selected:focus * { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 93 | color: inherit; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | .tree-outline li .icons-container { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 97 | align-self: center; |
| 98 | display: flex; |
| 99 | align-items: center; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | .tree-outline li .leading-icons { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 103 | margin-right: 4px; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | .tree-outline li .trailing-icons { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 107 | margin-left: 4px; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | .tree-outline li::before { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 111 | user-select: none; |
Tim van der Lippe | 2efbb1b | 2020-07-14 14:24:20 | [diff] [blame] | 112 | -webkit-mask-image: url(Images/treeoutlineTriangles.svg); |
| 113 | -webkit-mask-size: 32px 24px; |
| 114 | -webkit-mask-position: 0 0; |
Yang Guo | f5996c9 | 2020-07-06 07:50:54 | [diff] [blame] | 115 | background-color: #727272; |
Mathias Bynens | e4de6b3 | 2020-07-14 14:46:31 | [diff] [blame] | 116 | content: "\A0\A0"; |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 117 | text-shadow: none; |
| 118 | margin-right: -2px; |
| 119 | height: 12px; |
| 120 | width: 13px; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | .tree-outline li:not(.parent)::before { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 124 | background-color: transparent; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 125 | } |
| 126 | |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 127 | .tree-outline li.parent.expanded::before { |
Tim van der Lippe | 2efbb1b | 2020-07-14 14:24:20 | [diff] [blame] | 128 | -webkit-mask-position: -16px 0; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | .tree-outline ol.children { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 132 | display: none; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | .tree-outline ol.children.expanded { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 136 | display: block; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | .tree-outline.tree-outline-dense li { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 140 | margin-top: 1px; |
| 141 | min-height: 12px; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | .tree-outline.tree-outline-dense li.parent { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 145 | margin-top: 0; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | .tree-outline.tree-outline-dense li.parent::before { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 149 | top: 0; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | .tree-outline.tree-outline-dense ol { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 153 | padding-left: 10px; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 154 | } |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 155 | |
Peter Marshall | 9a3d85f | 2020-08-12 14:38:00 | [diff] [blame] | 156 | .tree-outline.hide-selection-when-blurred .selected:focus-visible { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 157 | background: var(--focus-bg-color); |
| 158 | border-radius: 2px; |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 159 | } |
| 160 | |
Peter Marshall | 9a3d85f | 2020-08-12 14:38:00 | [diff] [blame] | 161 | .tree-outline-disclosure:not(.tree-outline-disclosure-hide-overflow) .tree-outline.hide-selection-when-blurred .selected:focus-visible { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 162 | width: fit-content; |
| 163 | padding-right: 3px; |
Erik Luo | d6bf97b | 2018-08-25 02:06:51 | [diff] [blame] | 164 | } |
Kham Udom | 047cb69 | 2020-02-03 22:30:11 | [diff] [blame] | 165 | |
| 166 | @media (forced-colors: active) { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 167 | .tree-outline-disclosure li.parent::before, |
| 168 | .tree-outline:not(.hide-selection-when-blurred) li.parent:not(.selected)::before, |
| 169 | .tree-outline li [is=ui-icon].icon-mask { |
| 170 | forced-color-adjust: none; |
| 171 | background-color: ButtonText; |
| 172 | } |
| 173 | |
| 174 | .tree-outline-disclosure li.parent:hover:not(.selected)::before, |
| 175 | .tree-outline:not(.hide-selection-when-blurred) li.parent:hover:not(.selected)::before { |
| 176 | background-color: ButtonText; |
| 177 | } |
| 178 | |
Yang Guo | f5996c9 | 2020-07-06 07:50:54 | [diff] [blame] | 179 | .tree-outline:not(.hide-selection-when-blurred) li.selected .selection { |
| 180 | forced-color-adjust: none; |
| 181 | background-color: ButtonText; |
| 182 | } |
| 183 | |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 184 | ol.tree-outline:not(.hide-selection-when-blurred) li.selected:focus .selection, |
Peter Marshall | 9a3d85f | 2020-08-12 14:38:00 | [diff] [blame] | 185 | .tree-outline.hide-selection-when-blurred .selected:focus-visible { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 186 | forced-color-adjust: none; |
| 187 | background-color: Highlight; |
| 188 | } |
| 189 | |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 190 | ol.tree-outline:not(.hide-selection-when-blurred) li.parent.selected::before, |
| 191 | ol.tree-outline:not(.hide-selection-when-blurred) li.parent.selected:focus::before, |
Peter Marshall | 9a3d85f | 2020-08-12 14:38:00 | [diff] [blame] | 192 | .tree-outline.hide-selection-when-blurred .selected:focus-visible::before { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 193 | background-color: HighlightText; |
| 194 | } |
| 195 | |
Yang Guo | f5996c9 | 2020-07-06 07:50:54 | [diff] [blame] | 196 | .tree-outline li:not(.parent)::before, |
| 197 | .tree-outline li:not(.parent):hover::before, |
Peter Marshall | 9a3d85f | 2020-08-12 14:38:00 | [diff] [blame] | 198 | .tree-outline.hide-selection-when-blurred .selected:focus-visible:not(.parent)::before { |
Yang Guo | f5996c9 | 2020-07-06 07:50:54 | [diff] [blame] | 199 | forced-color-adjust: none; |
| 200 | background-color: transparent; |
| 201 | } |
| 202 | |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 203 | .tree-outline li.selected [is=ui-icon].icon-mask, |
| 204 | .tree-outline li.selected:focus [is=ui-icon]:not(.icon-mask) { |
| 205 | background-color: HighlightText !important; |
| 206 | } |
| 207 | |
Yang Guo | f5996c9 | 2020-07-06 07:50:54 | [diff] [blame] | 208 | ol.tree-outline:not(.hide-selection-when-blurred) li.selected, |
| 209 | .tree-outline:not(.hide-selection-when-blurred) li.selected .tree-element-title, |
| 210 | .tree-outline:not(.hide-selection-when-blurred) li.selected:focus, |
Peter Marshall | 9a3d85f | 2020-08-12 14:38:00 | [diff] [blame] | 211 | .tree-outline:not(.hide-selection-when-blurred) li:focus-visible .tree-element-title, |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 212 | .tree-outline:not(.hide-selection-when-blurred) li.selected:focus .tree-element-title, |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 213 | .tree-outline:not(.hide-selection-when-blurred) li.selected span, |
Peter Marshall | 9a3d85f | 2020-08-12 14:38:00 | [diff] [blame] | 214 | .tree-outline.hide-selection-when-blurred .selected:focus-visible span { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame] | 215 | forced-color-adjust: none; |
| 216 | color: HighlightText; |
| 217 | } |
Kham Udom | 047cb69 | 2020-02-03 22:30:11 | [diff] [blame] | 218 | } |