Common.less 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /* claro/form/Common.css */
  2. /*========================= common css =========================*/
  3. @import "../variables";
  4. /* 'dijitTextBox' refers to 'dijit(TextBox|DateTextBox|CurrencyTextBox|...)' */
  5. .claro .dijitTextBox,
  6. .claro .dijitInputInner {
  7. // .dijitInputInner selector needed for ValidationTextBox on IE6 because <input> doesn't inherit
  8. // the color setting from the ancestor div.dijitTextBox
  9. color: @text-color;
  10. }
  11. .claro .dijitTextBoxError .dijitValidationContainer {
  12. background-color: @erroricon-background-color;
  13. background-image: url("../@{image-form-error}");
  14. background-position: top center;
  15. border: solid @erroricon-background-color 0;
  16. border-left-width: 1px;
  17. width: 9px;
  18. }
  19. .claro .dijitTextBoxError .dijitValidationIcon {
  20. width: 0;
  21. background-color: transparent !important; /* so the INPUT doesn't obscure the border in rtl+a11y */
  22. }
  23. /* Padding for the input area of TextBox based widgets, and corresponding padding for the
  24. * down arrow button and the placeholder. placeholder is explicitly listed because
  25. * dijitPlaceHolder is absolutely positioned, so padding set on dijitInputField
  26. * won't affect it
  27. */
  28. .claro .dijitTextArea,
  29. .claro .dijitInputField .dijitPlaceHolder {
  30. padding: @textbox-padding;
  31. }
  32. .claro .dijitTextBox .dijitInputField {
  33. // Subtract 1px from top/bottom because we add 1px to other nodes, see rules below.
  34. // Although we are theoretically only adding 1px to top/bottom browsers seem to pad inputs by 1px on left/right,
  35. // although that varies by so compensate for that too.
  36. padding: @textbox-padding - 1px @textbox-padding;
  37. }
  38. .dj_gecko .claro .dijitTextBox .dijitInputInner,
  39. .dj_webkit .claro .dijitTextBox .dijitInputInner {
  40. // Although we are theoretically only adding 1px to top/bottom, some browsers seem to pad inputs by 1px on left/right,
  41. // so compensate for that too.
  42. padding: @textbox-padding - 1px;
  43. }
  44. .claro .dijitTextBox,
  45. .claro .dijitTextBox .dijitButtonNode {
  46. /* color for (outer) border on *TextBox widgets, and border between input and buttons on ComboBox and Spinner */
  47. border-color: @border-color;
  48. .transition-property(background-color, border);
  49. .transition-duration(.35s);
  50. }
  51. .claro .dijitTextBox {
  52. background-color: @textbox-background-color;
  53. }
  54. /* hover */
  55. .claro .dijitTextBoxHover,
  56. .claro .dijitTextBoxHover .dijitButtonNode {
  57. border-color: @hovered-border-color;
  58. .transition-duration(.25s);
  59. }
  60. .claro .dijitTextBoxHover {
  61. background-color: @textbox-hovered-background-color;
  62. background-image: url("../@{image-form-textbox-background}");
  63. background-repeat: repeat-x;
  64. }
  65. /* error state */
  66. .claro .dijitTextBoxError,
  67. .claro .dijitTextBoxError .dijitButtonNode {
  68. border-color: @error-border-color;
  69. }
  70. .claro .dijitTextBoxError,
  71. .claro .dijitTextBoxError .dijitInputContainer {
  72. background-color: @textbox-error-background-color;
  73. }
  74. /* focused state */
  75. .claro .dijitTextBoxFocused,
  76. .claro .dijitTextBoxFocused .dijitButtonNode {
  77. border-color:@focused-border-color;
  78. .transition-duration(.1s);
  79. }
  80. .claro .dijitTextBoxFocused {
  81. background-color: @textbox-focused-background-color;
  82. background-image: url("../@{image-form-textbox-background}");
  83. background-repeat: repeat-x;
  84. }
  85. .claro .dijitTextBoxFocused .dijitInputContainer {
  86. background: @textbox-focused-background-color;
  87. }
  88. .claro .dijitTextBoxErrorFocused,
  89. .claro .dijitTextBoxErrorFocused .dijitButtonNode {
  90. border-color: @error-focused-border-color;
  91. }
  92. /* disabled state */
  93. .claro .dijitTextBoxDisabled,
  94. .claro .dijitTextBoxDisabled .dijitButtonNode {
  95. border-color: @disabled-border-color;
  96. }
  97. .claro .dijitTextBoxDisabled,
  98. .claro .dijitTextBoxDisabled .dijitInputContainer {
  99. background-color: @textbox-disabled-background-color;
  100. background-image: none;
  101. }
  102. .claro .dijitTextBoxDisabled,
  103. .claro .dijitTextBoxDisabled .dijitInputInner {
  104. color: @disabled-text-color;
  105. }
  106. .dj_webkit .claro .dijitTextBoxDisabled input {
  107. /* because WebKit lightens disabled input/textarea no matter what color you specify */
  108. color: darken(@disabled-text-color, 5%)
  109. }
  110. .dj_webkit .claro textarea.dijitTextAreaDisabled {
  111. /* because WebKit lightens disabled input/textarea no matter what color you specify */
  112. color: darken(@disabled-text-color, 40%)
  113. }
  114. /*========================= for special widgets =========================*/
  115. /* Input boxes with an arrow (for a drop down) */
  116. .claro .dijitComboBox .dijitArrowButtonInner {
  117. background-image: url("../@{image-form-common-arrows}");
  118. background-position:-35px 53%;
  119. background-repeat: no-repeat;
  120. margin: 0;
  121. width:16px;
  122. border: 1px solid @arrowbutton-inner-border-color; // white gutter around the arrow button
  123. }
  124. .claro .dijitToolbar .dijitComboBox .dijitArrowButtonInner {
  125. border: none;
  126. }
  127. .claro .dijitToolbar .dijitComboBox .dijitArrowButtonInner {
  128. border: none;
  129. }
  130. /* Add 1px vertical padding to the <input> where user types and the validation icon,
  131. to match the 1px border on arrow button */
  132. .claro .dijitTextBox .dijitInputInner,
  133. .claro .dijitTextBox .dijitValidationContainer {
  134. padding: 1px 0;
  135. }
  136. .claro .dijitComboBox .dijitButtonNode {
  137. background-color: @arrowbutton-background-color;
  138. background-image: url("../@{image-form-highlight}");
  139. background-repeat:repeat-x;
  140. }
  141. /* Arrow "hover" effect:
  142. * The arrow button should change color whenever the mouse is in a position such that clicking it
  143. * will toggle the drop down. That's either (1) anywhere over the ComboBox or (2) over the arrow
  144. * button, depending on the openOnClick setting for the widget.
  145. */
  146. .claro .dijitComboBoxOpenOnClickHover .dijitButtonNode,
  147. .claro .dijitComboBox .dijitDownArrowButtonHover {
  148. background-color:@arrowbutton-hovered-background-color;
  149. }
  150. .claro .dijitComboBoxOpenOnClickHover .dijitArrowButtonInner,
  151. .claro .dijitComboBox .dijitDownArrowButtonHover .dijitArrowButtonInner {
  152. background-position:-70px 53%;
  153. }
  154. /* Arrow Button change when drop down is open */
  155. .claro .dijitComboBox .dijitHasDropDownOpen { // .dijitHasDropDown is on dijitArrowButton node
  156. background-color: @pressed-background-color;
  157. background-position:0 -177px;
  158. padding: 1px; // Since no border on arrow button (see rule below)
  159. }
  160. .claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {
  161. background-position:-70px 53%;
  162. border: 0 none;
  163. }
  164. /* disabled state */
  165. .claro div.dijitComboBoxDisabled .dijitArrowButtonInner {
  166. /* specific selector set to override background-position setting from Button.js
  167. * (.claro .dijitComboBoxDisabled .dijitArrowButtonInner) */
  168. background-position:0 50%;
  169. background-color:@disabled-background-color;
  170. }
  171. /*========================= hacks for browsers =========================*/
  172. /* it seems the input[type="hidden"] has a height (16px) too... this may cause the widget's height calculate error */
  173. .dj_ff3 .claro .dijitInputField input[type="hidden"] {
  174. display: none;
  175. height: 0;
  176. width: 0;
  177. }
  178. /* ie6 doesn't support transparent background img */
  179. .dj_ie6 .claro .dijitTextBox,
  180. .dj_ie6 .claro .dijitComboBox .dijitButtonNode {
  181. background-image: none;
  182. }
  183. .dj_borderbox .claro .dijitComboBox .dijitHasDropDownOpen .dijitArrowButtonInner {
  184. width:18px; // quirks mode means border-box sizing, so 18px with the border (same as 16px without border)
  185. }
  186. .dj_borderbox .claro .dijitComboBoxFocused .dijitHasDropDownOpen .dijitArrowButtonInner {
  187. width:16px; // when no border, then back to 16px just like content-box sizing
  188. }