Tree.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /* Tree
  2. *
  3. * Styling Tree mostly means styling the TreeRow (dijitTreeRow)
  4. * There are 4 basic states to style:
  5. *
  6. * Tree Row:
  7. * 1. tree row (default styling):
  8. * .dijitTreeRow - styles for each row of the tree
  9. *
  10. * 2. hovered tree row (mouse hover on a tree row)
  11. * .dijitTreeRowHover - styles when mouse over on one row
  12. *
  13. * 3. active tree row (mouse down on a tree row)
  14. * .dijitTreeRowActive - styles when mouse down on one row
  15. *
  16. * 4. selected tree row
  17. * dijitTreeRowSelected - style when the row has been selected
  18. *
  19. * Tree Expando:
  20. * dijitTreeExpando - the expando at the left of the text of each tree row
  21. *
  22. * Drag and Drop on TreeNodes: (insert line on dijitTreeContent node so it'll aligned w/ target element)
  23. * .dijitTreeNode .dojoDndItemBefore/.dojoDndItemAfter - use border style simulate a separate line
  24. */
  25. @import "variables";
  26. .claro .dijitTreeNode {
  27. zoom: 1; /* force layout on IE (TODO: may not be needed anymore) */
  28. }
  29. .claro .dijitTreeIsRoot {
  30. background-image: none;
  31. }
  32. /* Styling for basic tree node (unhovered, unselected)
  33. * Also use this styling when dropping between items on the tree (in other words, don't
  34. * use hover effect)
  35. */
  36. .claro .dijitTreeRow,
  37. .claro .dijitTreeNode .dojoDndItemBefore,
  38. .claro .dijitTreeNode .dojoDndItemAfter {
  39. /* so insert line shows up on IE when dropping after a target element */
  40. padding: 4px 0 2px 0;
  41. background-color: none; // IE6 doesn't understand rgba() or transparent below
  42. background-color: transparent; // IE8 doesn't understand rgba() below
  43. background-color: rgba(171,214,255,0); // rgba() instead of transparent to prevent flash on hover fade-in
  44. background-position:0 0;
  45. background-repeat:repeat-x;
  46. border: solid 0 transparent;
  47. color: @text-color;
  48. .transition-property(background-color, border-color);
  49. .transition-duration(.25s);
  50. .transition-timing-function(ease-out);
  51. }
  52. .claro .dijitTreeRowSelected {
  53. background-color: @selected-background-color;
  54. .standard-gradient;
  55. padding: 3px 0 1px;
  56. border-color: @selected-border-color;
  57. border-width: 1px 0;
  58. color: @selected-text-color;
  59. }
  60. .claro .dijitTreeRowHover {
  61. background-color: @hovered-background-color;
  62. .standard-gradient;
  63. padding: 3px 0 1px;
  64. border-color: @hovered-border-color;
  65. border-width: 1px 0;
  66. color: @hovered-text-color;
  67. .transition-duration(.25s);
  68. }
  69. .claro .dijitTreeRowActive {
  70. background-color:@pressed-background-color;
  71. .active-gradient;
  72. padding: 3px 0 1px;
  73. border-color: @pressed-border-color;
  74. border-width: 1px 0;
  75. color: @selected-text-color;
  76. }
  77. .claro .dijitTreeRowFocused {
  78. background-repeat: repeat;
  79. }
  80. /* expando (open/closed) icon */
  81. .claro .dijitTreeExpando {
  82. background-image: url(@image-tree-expand);
  83. width: 16px;
  84. height: 16px;
  85. background-position: -35px 0; /* for dijitTreeExpandoOpened */
  86. }
  87. .dj_ie6 .claro .dijitTreeExpando {
  88. background-image: url(@image-tree-expand-ie6);
  89. }
  90. .claro .dijitTreeRowHover .dijitTreeExpandoOpened {
  91. background-position: -53px 0;
  92. }
  93. .claro .dijitTreeExpandoClosed {
  94. background-position: 1px 0;
  95. }
  96. .claro .dijitTreeRowHover .dijitTreeExpandoClosed {
  97. background-position: -17px 0;
  98. }
  99. .claro .dijitTreeExpandoLeaf,
  100. .dj_ie6 .claro .dijitTreeExpandoLeaf {
  101. background-image:none;
  102. }
  103. .claro .dijitTreeExpandoLoading {
  104. background-image: url(@image-loading-animation);
  105. }
  106. /* Drag and Drop on TreeNodes
  107. * Put insert line on dijitTreeContent node so it's aligned w/
  108. * (ie, indented equally with) target element, even
  109. * though dijitTreeRowNode is the actual "drag object"
  110. */
  111. .claro .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {
  112. border-top: 2px solid @dnd-dropseparator-color; // TODO: normal separator is just 1px, why is this 2px?
  113. }
  114. .claro .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {
  115. border-bottom: 2px solid @dnd-dropseparator-color; // TODO: normal separator is just 1px, why is this 2px?
  116. }