widgets.css (11990B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 @import url(chrome://devtools/skin/breadcrumbs.css); 6 7 .theme-dark { 8 --table-splitter-color: rgba(255, 255, 255, 0.15); 9 --sidemenu-selected-arrow: url(images/item-arrow-dark-ltr.svg); 10 --sidemenu-selected-arrow-rtl: url(images/item-arrow-dark-rtl.svg); 11 } 12 13 .theme-light { 14 --table-splitter-color: rgba(0, 0, 0, 0.15); 15 --sidemenu-selected-arrow: url(images/item-arrow-ltr.svg); 16 --sidemenu-selected-arrow-rtl: url(images/item-arrow-rtl.svg); 17 } 18 19 /* Generic pane helpers */ 20 21 .generic-toggled-pane { 22 margin-inline-start: 0 !important; 23 /* Unfortunately, transitions don't work properly with locale-aware properties, 24 so both the left and right margins are set via js, while the start margin 25 is always overridden here. */ 26 } 27 28 .generic-toggled-pane[animated] { 29 transition: margin 0.25s ease-in-out; 30 } 31 32 /* Responsive container */ 33 34 .devtools-responsive-container { 35 min-width: 0; 36 min-height: 0; 37 flex-direction: row; 38 } 39 40 .devtools-main-content { 41 min-width: 50px; 42 } 43 44 .devtools-main-content, 45 .devtools-sidebar-tabs { 46 /* Prevent some children that should be hidden from remaining visible as this is shrunk (Bug 971959) */ 47 position: relative; 48 } 49 50 @media (min-width: 701px) { 51 .devtools-responsive-container .generic-toggled-pane { 52 /* To hide generic-toggled-pane, negative margins are applied dynamically. 53 * In the default horizontal layout, the pane is on the side and should be 54 * hidden using negative margin-inline-end only. 55 */ 56 margin-top: 0 !important; 57 margin-bottom: 0 !important; 58 } 59 } 60 61 @media (max-width: 700px) { 62 .devtools-responsive-container { 63 flex-direction: column; 64 } 65 66 .devtools-responsive-container > .devtools-side-splitter { 67 /* This is a normally vertical splitter, but we have turned it horizontal 68 due to the smaller resolution */ 69 min-height: calc(var(--devtools-splitter-top-width) + var(--devtools-splitter-bottom-width) + 1px); 70 border-top-width: var(--devtools-splitter-top-width); 71 border-bottom-width: var(--devtools-splitter-bottom-width); 72 margin-top: calc(-1 * var(--devtools-splitter-top-width) - 1px); 73 margin-bottom: calc(-1 * var(--devtools-splitter-bottom-width)); 74 75 /* Reset the vertical splitter styles */ 76 min-width: 0; 77 border-inline-end-width: 0; 78 border-inline-start-width: 0; 79 margin-inline-end: 0; 80 margin-inline-start: 0; 81 82 /* In some edge case the cursor is not changed to ns-resize */ 83 cursor: ns-resize; 84 } 85 86 .devtools-responsive-container > .devtools-sidebar-tabs:not(.pane-collapsed) { 87 /* When the panel is collapsed min/max height should not be applied because 88 collapsing relies on negative margins, which implies constant height. */ 89 min-height: 35vh; 90 max-height: 75vh; 91 } 92 93 .devtools-responsive-container .generic-toggled-pane { 94 /* To hide generic-toggled-pane, negative margins are applied dynamically. 95 * If a vertical layout, the pane is on the bottom and should be hidden 96 * using negative bottom margin only. 97 */ 98 margin-inline-end: 0 !important; 99 } 100 } 101 102 /* VariablesView */ 103 104 .variables-view-container { 105 /* Hack: force hardware acceleration */ 106 transform: translateZ(1px); 107 108 & > scrollbox { 109 overflow: auto; 110 } 111 } 112 113 .variables-view-empty-notice { 114 padding: 2px; 115 } 116 117 .variables-view-empty-notice { 118 color: var(--theme-text-color-alt); 119 } 120 121 .variables-view-scope:focus > .title, 122 .variable-or-property:focus > .title { 123 background-color: var(--theme-selection-background); 124 color: var(--theme-selection-color); 125 } 126 127 .variables-view-scope > .title { 128 border-top-width: 1px; 129 border-top-style: solid; 130 margin-top: -1px; 131 } 132 133 .variables-view-scope > .title:-moz-locale-dir(rtl) { 134 direction: rtl; 135 } 136 137 /* Custom scope stylings */ 138 139 .variables-view-watch-expressions .title > .name { 140 max-width: 14em; 141 } 142 143 /* Generic variables traits */ 144 145 .variables-view-variable:not(:last-child) { 146 border-bottom: 1px solid var(--theme-splitter-color); 147 } 148 149 .variables-view-variable > .title > .name { 150 font-weight: 600; 151 } 152 153 /* Generic variables *and* properties traits */ 154 155 .variable-or-property:focus > .title > label { 156 color: inherit !important; 157 } 158 159 .variables-view-container .theme-twisty { 160 margin: 2px; 161 } 162 163 .variable-or-property > .title > .theme-twisty { 164 margin-inline-start: 5px; 165 } 166 167 .variables-view-container .variables-view-element-details .theme-twisty:not([open]):-moz-locale-dir(rtl) { 168 transform: rotate(-90deg); 169 } 170 171 .variable-or-property:not([untitled]) > .variables-view-element-details { 172 margin-inline-start: 7px; 173 } 174 175 /* Custom configurable/enumerable/writable or frozen/sealed/extensible 176 * variables and properties */ 177 178 .variable-or-property[non-enumerable]:not([self], [pseudo-item]) > .title > .name { 179 opacity: 0.6; 180 } 181 182 /* Aligned values */ 183 184 .variables-view-container[aligned-values] .title > .separator { 185 flex: 1; 186 } 187 188 .variables-view-container[aligned-values] .title > .value { 189 flex: none; 190 width: 70vw; 191 } 192 193 .variables-view-container[aligned-values] .title > .element-value-input { 194 width: calc(70vw - 10px); 195 } 196 197 .variables-view-container[actions-first] [invisible] { 198 visibility: hidden; 199 } 200 201 /* Variables and properties searching */ 202 203 .variable-or-property[unmatched] { 204 border: none; 205 margin: 0; 206 } 207 208 /* Table Widget */ 209 210 /* Table body */ 211 212 .table-widget-body > .devtools-side-splitter { 213 background-color: transparent; 214 } 215 216 .table-widget-body { 217 width: 100%; 218 height: 100%; 219 overflow: auto; 220 contain: size; 221 display: flex; 222 align-items: start; 223 } 224 225 .table-widget-body > splitter { 226 align-self: stretch; 227 } 228 229 .table-widget-body[empty="empty"] { 230 display: none; 231 } 232 233 /* Column Headers */ 234 235 .table-widget-column-header, 236 .table-widget-cell { 237 display: block; 238 border-inline-end: 1px solid var(--table-splitter-color) !important; 239 line-height: unset !important; 240 } 241 242 .table-widget-column:not([hidden]) { 243 display: block; 244 } 245 246 /* Table widget column header colors are taken from netmonitor.inc.css to match 247 the look of both the tables. */ 248 249 .table-widget-column-header { 250 position: sticky; 251 top: 0; 252 width: 100%; 253 margin: 0; 254 padding: 5px 4px 0 !important; 255 color: inherit; 256 text-align: start; 257 font-weight: inherit !important; 258 border-image: linear-gradient( 259 transparent 15%, 260 var(--theme-splitter-color) 15%, 261 var(--theme-splitter-color) 85%, 262 transparent 85%, 263 transparent calc(100% - 1px), 264 var(--theme-splitter-color) calc(100% - 1px) 265 ) 266 1 1; 267 background-repeat: no-repeat; 268 } 269 270 .table-widget-column-header:not([sorted]):hover { 271 background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); 272 } 273 274 .table-widget-column-header[sorted] { 275 background-color: var(--theme-selection-background); 276 color: var(--theme-selection-color); 277 border-image: linear-gradient(var(--theme-splitter-color), var(--theme-splitter-color)) 1 1; 278 box-shadow: -0.5px -0.5px 0 0.5px var(--theme-splitter-color); 279 background-position: right 6px center; 280 } 281 282 .table-widget-column-header[sorted]:-moz-locale-dir(rtl) { 283 background-position: 6px center; 284 } 285 286 .table-widget-column-header[sorted="ascending"] { 287 background-image: url("chrome://devtools/skin/images/sort-ascending-arrow.svg"); 288 } 289 290 .table-widget-column-header[sorted="descending"] { 291 background-image: url("chrome://devtools/skin/images/sort-descending-arrow.svg"); 292 } 293 294 .theme-dark .table-widget-column[readonly] { 295 background-color: rgba(255, 255, 255, 0.1); 296 } 297 298 .theme-light .table-widget-column[readonly] { 299 background-color: rgba(0, 0, 0, 0.1); 300 } 301 302 .table-widget-body .devtools-side-splitter:last-of-type { 303 display: none; 304 } 305 306 /* Cells */ 307 308 .table-widget-cell { 309 width: 100%; 310 padding: 3px 4px; 311 min-width: 100px; 312 -moz-user-focus: normal; 313 } 314 315 .table-widget-cell[hidden] { 316 display: none; 317 } 318 319 .table-widget-cell.even:not(.theme-selected) { 320 background-color: var(--table-zebra-background); 321 } 322 323 :root:not(.no-animate) .table-widget-cell.flash-out { 324 animation: flash-out 0.5s ease-in; 325 } 326 327 @keyframes flash-out { 328 to { 329 background: var(--theme-contrast-background); 330 } 331 } 332 333 /* Empty text and initial text */ 334 335 .table-widget-empty-text { 336 display: none; 337 font-size: large; 338 } 339 340 .table-widget-body:empty + .table-widget-empty-text:not([value=""]), 341 .table-widget-body[empty] + .table-widget-empty-text:not([value=""]) { 342 display: block; 343 } 344 345 /* Tree Widget */ 346 347 .tree-widget-container { 348 padding: 0; 349 margin: 0; 350 width: 100%; 351 list-style: none; 352 } 353 354 .tree-widget-container:-moz-focusring, 355 .tree-widget-container *:-moz-focusring { 356 outline-style: none; 357 } 358 359 .tree-widget-empty-text { 360 padding: 10px 20px; 361 font-size: medium; 362 background: transparent; 363 pointer-events: none; 364 } 365 366 /* Tree Item */ 367 368 .tree-widget-container .tree-widget-item { 369 padding: 4px 0; 370 /* OSX has line-height 14px by default, which causes weird alignment issues 371 * because of 20px high icons. thus making line-height consistent with that of 372 * windows. 373 */ 374 line-height: 16px; 375 display: inline-block; 376 width: 100%; 377 word-break: keep-all; /* To prevent long urls like http://foo.com/bar from 378 breaking in multiple lines */ 379 } 380 381 .tree-widget-container .tree-widget-children { 382 margin: 0; 383 padding: 0; 384 list-style: none; 385 } 386 387 .tree-widget-item[level="1"] { 388 font-weight: 700; 389 } 390 391 /* Twisties */ 392 .tree-widget-item::before { 393 content: ""; 394 width: 16px; 395 height: 16px; 396 float: inline-start; 397 margin: 0 1px; 398 background-image: url("chrome://devtools/skin/images/arrow.svg"); 399 background-position: 50% 50%; 400 background-repeat: no-repeat; 401 background-size: 10px; 402 -moz-context-properties: fill; 403 fill: var(--theme-icon-dimmed-color); 404 cursor: pointer; 405 transition: transform 125ms ease; 406 transform: rotate(-90deg); 407 } 408 409 .tree-widget-item:-moz-locale-dir(rtl)::before { 410 transform: rotate(90deg); 411 } 412 413 .tree-widget-item[empty]::before { 414 background: transparent; 415 } 416 417 .tree-widget-item[expanded]::before { 418 transform: none; 419 } 420 421 .tree-widget-item.theme-selected::before { 422 fill: currentColor; 423 } 424 425 .tree-widget-item + ul { 426 overflow: hidden; 427 animation: collapse-tree-item 0.2s; 428 max-height: 0; 429 } 430 431 .tree-widget-item[expanded] + ul { 432 animation: expand-tree-item 0.3s; 433 max-height: unset; 434 } 435 436 @keyframes collapse-tree-item { 437 from { 438 max-height: 300px; 439 } 440 to { 441 max-height: 0; 442 } 443 } 444 445 @keyframes expand-tree-item { 446 from { 447 max-height: 0; 448 } 449 to { 450 max-height: 500px; 451 } 452 } 453 454 /* Indentation of child items in the tree */ 455 456 /* For level > 6 */ 457 .tree-widget-item[level] + ul > li > .tree-widget-item { 458 padding-inline-start: 98px; 459 } 460 461 /* First level */ 462 .tree-widget-item[level="1"] + ul > li > .tree-widget-item { 463 padding-inline-start: 14px; 464 } 465 466 /* Second level */ 467 .tree-widget-item[level="2"] + ul > li > .tree-widget-item { 468 padding-inline-start: 28px; 469 } 470 471 /* Third level */ 472 .tree-widget-item[level="3"] + ul > li > .tree-widget-item { 473 padding-inline-start: 42px; 474 } 475 476 /* Fourth level */ 477 .tree-widget-item[level="4"] + ul > li > .tree-widget-item { 478 padding-inline-start: 56px; 479 } 480 481 /* Fifth level */ 482 .tree-widget-item[level="5"] + ul > li > .tree-widget-item { 483 padding-inline-start: 70px; 484 } 485 486 /* Sixth level */ 487 .tree-widget-item[level="6"] + ul > li > .tree-widget-item { 488 padding-inline-start: 84px; 489 } 490 491 /* Custom icons for certain tree items indicating the type of the item */ 492 493 .tree-widget-item[type]::after { 494 content: ""; 495 float: inline-start; 496 width: 16px; 497 height: 16px; 498 margin-inline-end: 4px; 499 background-repeat: no-repeat; 500 background-size: contain; 501 -moz-context-properties: fill; 502 fill: currentColor; 503 } 504 505 .tree-widget-item[type="dir"]::after { 506 background-image: url(chrome://devtools/skin/images/folder.svg); 507 } 508 509 .tree-widget-item[type="url"]::after { 510 background-image: url(chrome://devtools/skin/images/globe.svg); 511 } 512 513 .tree-widget-item[type="store"]::after { 514 background-image: url(chrome://devtools/skin/images/datastore.svg); 515 }