Toolbar.less 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /* Toolbar
  2. *
  3. * Styling Toolbar means styling the toolbar container and the widget inside toolbar (dijitToolbar)
  4. *
  5. * 1. toolbar (default styling):
  6. * .dijitToolbar - styles for outer container
  7. *
  8. * 2. widget inside toolbar
  9. * .dijitToolbar .dijitButtonNode - Button widget
  10. * .dijitComboButton - ComboButton widget
  11. * .dijitDropDownButton - DropDownButton widget
  12. * .dijitToggleButton - ToggleButton widget
  13. *
  14. * 3. hovered widget inside toolbar (ie, mouse hover on the widget inside)
  15. * .dijitToolbar .dijitButtonNodeHover - styles for hovered Button widget
  16. *
  17. * 4. actived widget inside toolbar (ie, mouse down on the widget inside)
  18. * .dijitToolbar .dijitButtonNodeActive - mouse down on Button widget
  19. */
  20. @import "variables";
  21. .claro .dijitToolbar {
  22. border-bottom: 1px solid @border-color;
  23. background-color: @bar-background-color;
  24. .standard-gradient;
  25. padding: 2px 0 2px 4px;
  26. zoom: 1;
  27. }
  28. .claro .dijitToolbar label {
  29. padding: 0 3px 0 6px;
  30. }
  31. /** override claro/form/Button.css, and also ComboBox down arrow **/
  32. .claro .dijitToolbar .dijitButton .dijitButtonNode,
  33. .claro .dijitToolbar .dijitDropDownButton .dijitButtonNode,
  34. .claro .dijitToolbar .dijitComboButton .dijitButtonNode,
  35. .claro .dijitToolbar .dijitToggleButton .dijitButtonNode,
  36. .claro .dijitToolbar .dijitComboBox .dijitButtonNode {
  37. border-width: 0; /* on hover/active, border-->1px, padding-->1px */
  38. padding: 2px;
  39. .border-radius(@toolbar-button-border-radius);
  40. .box-shadow(none);
  41. .transition-property(background-color);
  42. .transition-duration(.3s);
  43. background-color:rgba(171,214,255,0);
  44. background-image: none; /* cancel gradient for normal buttons, we don't want any gradient besides toolbar's on non-hovered buttons */
  45. }
  46. .dj_ie .claro .dijitToolbar .dijitButton .dijitButtonNode,
  47. .dj_ie .claro .dijitToolbar .dijitDropDownButton .dijitButtonNode,
  48. .dj_ie .claro .dijitToolbar .dijitComboButton .dijitButtonNode,
  49. .dj_ie .claro .dijitToolbar .dijitToggleButton .dijitButtonNode,
  50. .dj_ie .claro .dijitToolbar .dijitComboBox .dijitButtonNode {
  51. background-color: transparent; /* for IE, which doesn't understand rgba(...) */
  52. }
  53. /* hover status */
  54. .dj_ie .claro .dijitToolbar .dijitButtonHover .dijitButtonNode,
  55. .dj_ie .claro .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,
  56. .dj_ie .claro .dijitToolbar .dijitComboButton .dijitButtonNodeHover,
  57. .dj_ie .claro .dijitToolbar .dijitComboButton .dijitDownArrowButtonHover,
  58. .dj_ie .claro .dijitToolbar .dijitToggleButtonHover .dijitButtonNode {
  59. /* button should still turn blue on hover, so need to override .dj_ie rules above */
  60. background-color: @button-hovered-background-color;
  61. }
  62. /* active status */
  63. .dj_ie .claro .dijitToolbar .dijitButtonActive .dijitButtonNode,
  64. .dj_ie .claro .dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,
  65. .dj_ie .claro .dijitToolbar .dijitComboButtonActive .dijitButtonNode,
  66. .dj_ie .claro .dijitToolbar .dijitToggleButtonActive .dijitButtonNode {
  67. /* button should still turn blue on press, so need to override .dj_ie rules above */
  68. background-color: @button-pressed-background-color;
  69. }
  70. .claro .dijitToolbar .dijitComboButton .dijitStretch {
  71. /* no rounded border on side adjacent to arrow */
  72. .border-radius(@toolbar-button-border-radius 0 0 @toolbar-button-border-radius);
  73. }
  74. .claro .dijitToolbar .dijitComboButton .dijitArrowButton {
  75. /* no rounded border on side adjacent to button */
  76. .border-radius(0 @toolbar-button-border-radius @toolbar-button-border-radius 0);
  77. }
  78. .claro .dijitToolbar .dijitComboBox .dijitButtonNode {
  79. padding: 0;
  80. }
  81. /* hover status */
  82. .claro .dijitToolbar .dijitButtonHover .dijitButtonNode,
  83. .claro .dijitToolbar .dijitDropDownButtonHover .dijitButtonNode,
  84. .claro .dijitToolbar .dijitToggleButtonHover .dijitButtonNode,
  85. .claro .dijitToolbar .dijitComboButtonHover .dijitButtonNode {
  86. border-width:1px;
  87. background-color: @hovered-background-color;
  88. .standard-gradient;
  89. padding: 1px;
  90. }
  91. .claro .dijitToolbar .dijitComboButtonHover .dijitButtonNode,
  92. .claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton {
  93. background-color: @toolbar-combobutton-hovered-unhoveredsection-background-color;
  94. }
  95. .claro .dijitToolbar .dijitComboButtonHover .dijitButtonNodeHover,
  96. .claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButtonHover {
  97. background-color: @hovered-background-color;
  98. }
  99. /* active status */
  100. .claro .dijitToolbar .dijitButtonActive .dijitButtonNode,
  101. .claro .dijitToolbar .dijitDropDownButtonActive .dijitButtonNode,
  102. .claro .dijitToolbar .dijitToggleButtonActive .dijitButtonNode {
  103. border-width: 1px;
  104. background-color:@pressed-background-color;
  105. .active-gradient;
  106. padding: 1px;
  107. }
  108. .claro .dijitToolbar .dijitComboButtonActive {
  109. .transition-duration(.2s);
  110. border-width: 1px;
  111. padding: 0;
  112. }
  113. .claro .dijitToolbar .dijitComboButtonActive .dijitButtonNode,
  114. .claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButton {
  115. background-color: @toolbar-combobutton-hovered-unhoveredsection-background-color;
  116. padding: 2px;
  117. }
  118. .claro .dijitToolbar .dijitComboButtonActive .dijitButtonNodeActive {
  119. background-color: @pressed-background-color;
  120. .active-gradient;
  121. }
  122. .claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButtonActive {
  123. background-color: @pressed-background-color;
  124. .active-gradient;
  125. }
  126. /* Avoid double border between button and arrow */
  127. .claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton,
  128. .claro .dijitToolbar .dijitComboButtonActive .dijitDownArrowButton {
  129. border-left-width: 0;
  130. }
  131. .claro .dijitToolbar .dijitComboButtonHover .dijitDownArrowButton {
  132. padding-left: 2px; /* since there's no left border, don't reduce from 2px --> 1px */
  133. }
  134. /* toggle button checked status */
  135. .claro .dijitToolbar .dijitToggleButtonChecked .dijitButtonNode {
  136. margin: 0; /* remove margin and add a border */
  137. border-width: 1px;
  138. border-style: solid;
  139. background-image: none;
  140. border-color: @selected-border-color;
  141. background-color: @toolbar-button-checked-background-color;
  142. padding: 1px;
  143. }
  144. .claro .dijitToolbarSeparator {
  145. /* separator icon in the editor sprite */
  146. background: url(@image-editor-icons-enabled);
  147. }
  148. /* Toolbar inside of disabled Editor */
  149. .claro .dijitDisabled .dijitToolbar {
  150. background:none;
  151. background-color:@disabled-background-color;
  152. border-bottom: 1px solid @disabled-border-color;
  153. }
  154. .claro .dijitToolbar .dijitComboBoxDisabled .dijitArrowButtonInner {
  155. background-position:0 50%;
  156. }