tree.less 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. .tree {
  2. border: 1px solid @grayLight;
  3. border-radius: 4px 4px 4px 4px;
  4. padding: 10px 15px 0 15px;
  5. overflow-x: auto;
  6. overflow-y: auto;
  7. position: relative;
  8. list-style: none;
  9. *:focus {
  10. outline: none;
  11. }
  12. button:focus {
  13. color: @treeHoverText;
  14. }
  15. ul {
  16. padding-left: 0;
  17. margin-top: 0;
  18. margin-bottom: 0;
  19. list-style: none;
  20. }
  21. li {
  22. margin: 0;
  23. margin-top: 5px;
  24. margin-bottom: 5px;
  25. }
  26. .tree-loader {
  27. // make even with tree-branch-children
  28. margin-left: 45px;
  29. }
  30. .tree-open > .tree-branch-header .glyphicon-play {
  31. transform:rotate(90deg);
  32. -ms-transform:rotate(90deg);
  33. -webkit-transform:rotate(90deg);
  34. position: relative;
  35. }
  36. [data-children=false] > .tree-branch-header .icon-caret:before {
  37. content: '\00a0'; //space
  38. }
  39. .tree-branch {
  40. .tree-branch-header {
  41. position: relative;
  42. border-radius: 6px;
  43. white-space: nowrap;
  44. .tree-branch-name:hover {
  45. color: @treeHoverText;
  46. }
  47. .glyphicon-play {
  48. font-size: 10px;
  49. padding-right: 5px;
  50. padding-left: 7px;
  51. &:before {
  52. position: relative;
  53. top: -2px;
  54. }
  55. }
  56. .tree-branch-name {
  57. white-space: nowrap;
  58. border-radius: 6px;
  59. background-color: transparent;
  60. border: 0;
  61. }
  62. label {
  63. font-weight: normal;
  64. padding-left: 3px;
  65. margin-bottom: 0;
  66. cursor: pointer;
  67. }
  68. }
  69. .tree-branch-children {
  70. margin-left: 14px;
  71. }
  72. &[haschildren='false'] {
  73. .icon-caret {
  74. visibility: hidden;
  75. }
  76. }
  77. }
  78. .tree-item {
  79. white-space: nowrap;
  80. position: relative;
  81. cursor: pointer;
  82. border-radius: 6px;
  83. margin-left: 26px;
  84. .tree-item-name {
  85. white-space: nowrap;
  86. border-radius: 6px;
  87. background-color: transparent;
  88. border: 0;
  89. }
  90. .tree-item-name:hover {
  91. color: @treeHoverText;
  92. }
  93. &.tree-selected .tree-item-name {
  94. background-color: @treeSelectBackground;
  95. color: #333;
  96. }
  97. label {
  98. font-weight: normal;
  99. padding-left: 7px;
  100. margin-bottom: 0;
  101. cursor: pointer;
  102. }
  103. }
  104. .icon-caret:hover + .tree-branch-name {
  105. color: @treeHoverText;
  106. }
  107. // - - - - - - - - - - - - - -
  108. // folder selectable option
  109. // - - - - - - - - - - - - - -
  110. &.tree-folder-select {
  111. .tree-branch {
  112. .icon-caret {
  113. background-color: transparent;
  114. border: 0;
  115. }
  116. .icon-caret:hover {
  117. cursor: pointer;
  118. color: @treeHoverText;
  119. }
  120. > .tree-branch-name {
  121. padding: 1px 5px 0 5px;
  122. border-radius: 6px;
  123. &.tree-selected {
  124. background-color: @treeSelectBackground;
  125. }
  126. }
  127. }
  128. .tree-branch.tree-selected > .tree-branch-header .tree-branch-name {
  129. background-color: @treeSelectBackground;
  130. &:hover {
  131. background-color: @treeSelectBackground;
  132. }
  133. }
  134. }
  135. }