tree.css 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /* Remove default bullets */
  2. ul, #tree {
  3. list-style-type: none;
  4. }
  5. /* Remove margins and padding from the parent ul */
  6. #tree {
  7. margin: 0;
  8. padding: 0;
  9. }
  10. #tree li {
  11. line-height: 1.2;
  12. position: relative;
  13. padding: 0 0 1em 1em;
  14. }
  15. #tree ul li { padding: 1em 0 0 1em; }
  16. #tree > li:last-child { padding-bottom: 0; }
  17. /* ————————————————————–
  18. Tree labels
  19. */
  20. #tree_label {
  21. position: relative;
  22. display: inline-block;
  23. background: #fff;
  24. }
  25. label#tree_label { cursor: pointer; }
  26. label#tree_label:hover { color: #666; }
  27. /* ————————————————————–
  28. Tree expanded icon
  29. */
  30. label#tree_label:before {
  31. background: #000;
  32. color: #fff;
  33. position: relative;
  34. z-index: 1;
  35. float: left;
  36. margin: 0 1em 0 -2em;
  37. width: 1em;
  38. height: 1em;
  39. border-radius: 1em;
  40. content: '+';
  41. text-align: center;
  42. line-height: .9em;
  43. }
  44. :checked ~ label#tree_label:before { content: '–'; }
  45. /* ————————————————————–
  46. Tree branches
  47. */
  48. .fa {
  49. margin-right: 5px;
  50. }
  51. span.tree_label:after {
  52. position: absolute;
  53. top: 0;
  54. left: -2em;
  55. display: block;
  56. height: 1.8em;
  57. width: 2.5em;
  58. border-bottom: 1px solid #777;
  59. border-left: 1px solid #777;
  60. border-radius: 0 0 0 0.3em;
  61. content: '';
  62. }
  63. #tree li:last-child:before {
  64. height: 1em;
  65. bottom: auto;
  66. border:0px;
  67. }
  68. #tree > li:last-child:before { display: none; }
  69. #tree_custom {
  70. display: block;
  71. background: #eee;
  72. padding: 1em;
  73. border-radius: 0.3em;
  74. }
  75. span.tree_seed:after {
  76. position: absolute;
  77. left: -2em;
  78. display: block;
  79. height: 1.5em;
  80. width: 1.8em;
  81. border-bottom: 1px solid #777;
  82. border-left: 1px solid #777;
  83. border-radius: 0 0 0 0.3em;
  84. content: '';
  85. }
  86. .tree_el {
  87. margin-top: 10px;
  88. }
  89. /*
  90. #treeView li ul li:before {
  91. position: absolute;
  92. left: 4.5em;
  93. display: block;
  94. width: 0;
  95. height: -webkit-fill-available;
  96. border-left: 1px solid #777;
  97. content: "";
  98. }
  99. #treeView li:last-child:before {
  100. height: 1em;
  101. bottom: auto;
  102. }
  103. #treeView > li:last-child:before { display: none; }
  104. */
  105. #treeView li {
  106. line-height: 1.2;
  107. position: relative;
  108. padding: 0 0 1em 1em;
  109. }
  110. #treeView ul li { padding: 1em 0 0 1em; }
  111. #treeView > li:last-child { padding-bottom: 0; }
  112. #treeView li:before {
  113. position: absolute;
  114. top: 0;
  115. bottom: 0;
  116. left: -2em;
  117. margin-top: -10px;
  118. display: block;
  119. width: 0;
  120. border-left: 1px solid #777;
  121. content: "";
  122. }
  123. .tree_seed:after {
  124. position: absolute;
  125. top: 0;
  126. left: -1.5em;
  127. display: block;
  128. height: 0.5em;
  129. width: 1em;
  130. border-bottom: 1px solid #777;
  131. border-left: 1px solid #777;
  132. border-radius: 0 0 0 .3em;
  133. content: '';
  134. }
  135. label.tree_seed:after {
  136. border-radius: 0 .3em 0 0;
  137. border-top: 1px solid #777;
  138. border-right: 1px solid #777;
  139. border-bottom: 0;
  140. border-left: 0;
  141. bottom: 0;
  142. top: 0.5em;
  143. height: auto;
  144. }
  145. #treeView li:last-child:before {
  146. height: 1em;
  147. bottom: auto;
  148. }
  149. #treeView > li:last-child:before { display: none; }