Tree.less 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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 1px 2px 0;
  41. margin: 0 1px; /* replaced by border for selected/hovered row */
  42. background-color: none; // IE6 doesn't understand rgba() or transparent below
  43. background-color: transparent; // IE8 doesn't understand rgba() below
  44. background-color: rgba(171,214,255,0); // rgba() instead of transparent to prevent flash on hover fade-in
  45. background-image: url("images/commonHighlight.png");
  46. background-position:0 0;
  47. background-repeat:repeat-x;
  48. border-color: rgba(118,157,192,0); // rgba() instead of none to prevent flash on hover fade-in
  49. border-width: 0;
  50. .transition-property(background-color, border-color);
  51. .transition-duration(.25s);
  52. .transition-timing-function(ease-out);
  53. }
  54. .dj_ie6 .claro .dijitTreeRow {
  55. background-image: none;
  56. }
  57. .claro .dijitTreeRowSelected {
  58. background-repeat:repeat-x;
  59. background-color:@selected-background-color;
  60. padding: 3px 0 1px;
  61. margin: 0;
  62. border:solid 1px @selected-border-color;
  63. color:@selected-text-color;
  64. }
  65. .claro .dijitTreeRowHover {
  66. background-color:@hovered-background-color;
  67. padding: 3px 0 1px;
  68. margin: 0;
  69. border:solid 1px @hovered-border-color;
  70. color:@hovered-text-color;
  71. .transition-duration(.25s);
  72. }
  73. .claro .dijitTreeRowActive {
  74. background-color:@pressed-background-color;
  75. background-position:0 -177px;
  76. padding: 3px 0 1px;
  77. margin-left: 0;
  78. border:solid 1px @pressed-border-color;
  79. color:@selected-text-color;
  80. }
  81. .dj_ie6 .claro .dijitTreeRowActive {
  82. background-image: none;
  83. }
  84. .claro .dijitTreeRowFocused {
  85. background-repeat: repeat;
  86. }
  87. /* expando (open/closed) icon */
  88. .claro .dijitTreeExpando {
  89. background-image: url('images/treeExpandImages.png');
  90. width: 16px;
  91. height: 16px;
  92. background-position: -35px 0; /* for dijitTreeExpandoOpened */
  93. }
  94. .dj_ie6 .claro .dijitTreeExpando {
  95. background-image: url('images/treeExpandImages8bit.png');
  96. }
  97. .claro .dijitTreeRowHover .dijitTreeExpandoOpened {
  98. background-position: -53px 0;
  99. }
  100. .claro .dijitTreeExpandoClosed {
  101. background-position: 1px 0;
  102. }
  103. .claro .dijitTreeRowHover .dijitTreeExpandoClosed {
  104. background-position: -17px 0;
  105. }
  106. .claro .dijitTreeExpandoLeaf,
  107. .dj_ie6 .claro .dijitTreeExpandoLeaf {
  108. background-image:none;
  109. }
  110. .claro .dijitTreeExpandoLoading {
  111. background-image: url('images/loadingAnimation.gif');
  112. }
  113. /* Drag and Drop on TreeNodes
  114. * Put insert line on dijitTreeContent node so it's aligned w/
  115. * (ie, indented equally with) target element, even
  116. * though dijitTreeRowNode is the actual "drag object"
  117. */
  118. .claro .dijitTreeNode .dojoDndItemBefore .dijitTreeContent {
  119. border-top: 2px solid @dnd-dropseparator-color; // TODO: normal separator is just 1px, why is this 2px?
  120. }
  121. .claro .dijitTreeNode .dojoDndItemAfter .dijitTreeContent {
  122. border-bottom: 2px solid @dnd-dropseparator-color; // TODO: normal separator is just 1px, why is this 2px?
  123. }