tree-view.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /* vim:set ts=2 sw=2 sts=2 et: */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. @import url('resource://devtools/client/shared/components/reps/reps.css');
  6. /******************************************************************************/
  7. /* TreeView Colors */
  8. :root {
  9. --tree-link-color: blue;
  10. --tree-header-background: #C8D2DC;
  11. --tree-header-sorted-background: #AAC3DC;
  12. }
  13. /******************************************************************************/
  14. /* TreeView Table*/
  15. .treeTable .treeLabelCell {
  16. padding: 2px 0;
  17. vertical-align: top;
  18. white-space: nowrap;
  19. }
  20. .treeTable .treeLabelCell::after {
  21. content: ":";
  22. color: var(--object-color);
  23. }
  24. .treeTable .treeValueCell {
  25. padding: 2px 0;
  26. padding-inline-start: 5px;
  27. overflow: hidden;
  28. }
  29. .treeTable .treeLabel {
  30. cursor: default;
  31. overflow: hidden;
  32. padding-inline-start: 4px;
  33. white-space: nowrap;
  34. }
  35. /* No paddding if there is actually no label */
  36. .treeTable .treeLabel:empty {
  37. padding-inline-start: 0;
  38. }
  39. .treeTable .treeRow.hasChildren > .treeLabelCell > .treeLabel:hover {
  40. cursor: pointer;
  41. color: var(--tree-link-color);
  42. text-decoration: underline;
  43. }
  44. /* Filtering */
  45. .treeTable .treeRow.hidden {
  46. display: none;
  47. }
  48. /******************************************************************************/
  49. /* Toggle Icon */
  50. .treeTable .treeRow .treeIcon {
  51. height: 14px;
  52. width: 14px;
  53. font-size: 10px; /* Set the size of loading spinner */
  54. display: inline-block;
  55. vertical-align: bottom;
  56. margin-inline-start: 3px;
  57. padding-top: 1px;
  58. }
  59. /* All expanded/collapsed styles need to apply on immediate children
  60. since there might be nested trees within a tree. */
  61. .treeTable .treeRow.hasChildren > .treeLabelCell > .treeIcon {
  62. cursor: pointer;
  63. background-repeat: no-repeat;
  64. }
  65. /******************************************************************************/
  66. /* Header */
  67. .treeTable .treeHeaderRow {
  68. height: 18px;
  69. }
  70. .treeTable .treeHeaderCell {
  71. cursor: pointer;
  72. -moz-user-select: none;
  73. border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  74. padding: 0 !important;
  75. background: linear-gradient(
  76. rgba(255, 255, 255, 0.05),
  77. rgba(0, 0, 0, 0.05)),
  78. radial-gradient(1px 60% at right,
  79. rgba(0, 0, 0, 0.8) 0%,
  80. transparent 80%) repeat-x var(--tree-header-background);
  81. color: var(--theme-body-color);
  82. white-space: nowrap;
  83. }
  84. .treeTable .treeHeaderCellBox {
  85. padding: 2px 0;
  86. padding-inline-start: 10px;
  87. padding-inline-end: 14px;
  88. }
  89. .treeTable .treeHeaderRow > .treeHeaderCell:first-child > .treeHeaderCellBox {
  90. padding: 0;
  91. }
  92. .treeTable .treeHeaderSorted {
  93. background-color: var(--tree-header-sorted-background);
  94. }
  95. .treeTable .treeHeaderSorted > .treeHeaderCellBox {
  96. background: url(chrome://devtools/skin/images/firebug/arrow-down.svg) no-repeat calc(100% - 4px);
  97. }
  98. .treeTable .treeHeaderSorted.sortedAscending > .treeHeaderCellBox {
  99. background-image: url(chrome://devtools/skin/images/firebug/arrow-up.svg);
  100. }
  101. .treeTable .treeHeaderCell:hover:active {
  102. background-image: linear-gradient(
  103. rgba(0, 0, 0, 0.1),
  104. transparent),
  105. radial-gradient(1px 60% at right,
  106. rgba(0, 0, 0, 0.8) 0%,
  107. transparent 80%);
  108. }
  109. /******************************************************************************/
  110. /* Themes */
  111. .theme-light .treeTable .treeRow:hover,
  112. .theme-dark .treeTable .treeRow:hover {
  113. background-color: var(--theme-selection-background-semitransparent) !important;
  114. }
  115. .theme-firebug .treeTable .treeRow:hover {
  116. background-color: var(--theme-body-background);
  117. }
  118. .theme-light .treeTable .treeLabel,
  119. .theme-dark .treeTable .treeLabel {
  120. color: var(--theme-highlight-pink);
  121. }
  122. .theme-light .treeTable .treeRow.hasChildren > .treeLabelCell > .treeLabel:hover,
  123. .theme-dark .treeTable .treeRow.hasChildren > .treeLabelCell > .treeLabel:hover {
  124. color: var(--theme-highlight-pink);
  125. }
  126. .theme-firebug .treeTable .treeLabel {
  127. color: var(--theme-body-color);
  128. }