Calendar.less 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. /* Calendar
  2. *
  3. * Styling Calendar mainly includes:
  4. *
  5. * 1. Calendar container
  6. * .dijitCalendar - main container
  7. * .dijitCalendarHover / .dijitCalendarActive - states e.g. hover,active
  8. *
  9. * 2. Month
  10. * .dijitCalendarMonthContainer
  11. * .dijitCalendarMonthLabel
  12. * .dijitCalendarDecrease / .dijitCalendarDecrease - icons for switching to previous/next month
  13. * .dijitCalendarArrowActive .dijitCalendarDecrease - states e.g. hover,active
  14. *
  15. * 3. Date
  16. * .dijitCalendarDayLabelTemplate - week day column header e.g. S M T W T F S
  17. * .dijitCalendarDateTemplate - date label wrapper
  18. * .dijitCalendarPreviousMonth .dijitCalendarDateLabel - special labels for previous or next month
  19. * .dijitCalendarSelectedDate .dijitCalendarDateLabel - styles for selected date
  20. * .dijitCalendarDisabledDate .dijitCalendarDateLabel - styles for disabled date
  21. * .dijitCalendarActiveDate .dijitCalendarDateLabel - states e.g. hover,active
  22. *
  23. * 4. Year
  24. * .dijitCalendarYearContainer
  25. * .dijitCalendarYearLabel
  26. * .dijitCalendarPreviousYear /.dijitCalendarNextYear
  27. * .dijitCalendarNextYearHover / .dijitCalendarPreviousYearHover - states e.g. hover,active
  28. *
  29. * 5. Dropdown Month Menu
  30. * .dijitCalendarMonthMenu - menu container
  31. * .dijitCalendarMonthMenu .dijitCalendarMonthLabel - month label in menu item
  32. * .dijitCalendarMonthMenu .dijitCalendarMonthLabelHover - menu item hover state
  33. */
  34. @import "variables";
  35. .claro .dijitCalendar {
  36. border: solid 1px @border-color;
  37. border-collapse: separate; // in case user CSS has set border-collapse: collapse for tables
  38. .border-radius(4px);
  39. // Background color and alpha-gradient
  40. background-color: @calendar-background-color;
  41. background-image: url("images/calendar.png"); // fallback for browsers that don't support CSS gradients
  42. background-repeat: repeat-x; // so bottom of calendar isn't affected by gradient image repeating
  43. .alpha-white-gradient(1, 0px, 0.4, 2px, 0, 100%);
  44. text-align:center;
  45. padding:6px 5px 3px 5px;
  46. }
  47. .dj_ie6 .claro .dijitCalendar {
  48. background-image:none; // because on IE6 background-image overrides background-color
  49. }
  50. .claro .dijitCalendar img {
  51. border:none;
  52. }
  53. .claro .dijitCalendarHover, .claro .dijitCalendar:hover,
  54. .claro .dijitCalendarActive {
  55. /* treat dijitCalendarActive like hover since there's
  56. * no concept of clicking a Calendar as a whole (although you can click things inside the calendar)
  57. */
  58. background-color: @hovered-background-color;
  59. border:solid 1px @hovered-border-color;
  60. }
  61. .claro .dijitCalendarMonthContainer th {
  62. text-align:center;
  63. padding-bottom:4px;
  64. vertical-align:middle;
  65. }
  66. .claro .dijitCalendarMonthLabel {
  67. color: @text-color;
  68. font-size: 1.091em;
  69. padding: 0 4px;
  70. }
  71. /* next/previous month arrows */
  72. .claro .dijitCalendarIncrementControl {
  73. width:18px;
  74. height:16px;
  75. background-image: url(@image-calendar-arrows);
  76. background-repeat: no-repeat;
  77. }
  78. .dj_ie6 .claro .dijitCalendarIncrementControl {
  79. background-image: url(@image-calendar-arrows-ie6);
  80. }
  81. .claro .dijitCalendarIncrease {
  82. background-position:-18px 0;
  83. }
  84. .claro .dijitCalendarArrowHover .dijitCalendarDecrease,
  85. .claro .dijitCalendarArrow:hover .dijitCalendarDecrease {
  86. background-position:-36px 0;
  87. }
  88. .claro .dijitCalendarArrowHover .dijitCalendarIncrease,
  89. .claro .dijitCalendarArrow:hover .dijitCalendarIncrease {
  90. background-position:-55px 0;
  91. }
  92. .claro .dijitCalendarArrowActive .dijitCalendarDecrease,
  93. .claro .dijitCalendarArrow:active .dijitCalendarDecrease {
  94. background-position:-72px 0;
  95. }
  96. .claro .dijitCalendarArrowActive .dijitCalendarIncrease,
  97. .claro .dijitCalendarArrow:active .dijitCalendarIncrease {
  98. background-position:-91px 0;
  99. }
  100. .claro .dijitA11ySideArrow {
  101. /* text +/- labels instead of arrow icons, for high contrast mode */
  102. display: none;
  103. }
  104. .claro .dijitCalendarDayLabelTemplate {
  105. padding-bottom:0;
  106. text-align:center;
  107. border-bottom:1px solid @border-color;
  108. padding:0 3px 2px;
  109. }
  110. .claro .dijitCalendarDayLabel {
  111. padding:0 4px 0 4px;
  112. font-weight:bold;
  113. font-size:0.909em;
  114. text-align:center;
  115. color: @text-color;
  116. }
  117. .claro .dijitCalendarDateTemplate {
  118. text-align:center;
  119. background-color:@calendar-currentmonth-background-color;
  120. border-bottom: 1px solid @minor-border-color;
  121. padding-top:0;
  122. font-size:0.909em;
  123. font-family: Arial;
  124. font-weight:bold;
  125. letter-spacing:.05em;
  126. text-align:center;
  127. color: @text-color;
  128. }
  129. .dj_ie6 .claro .dijitCalendarDateTemplate {
  130. background-image: none;
  131. }
  132. .claro .dijitCalendarPreviousMonth,
  133. .claro .dijitCalendarNextMonth {
  134. background-color: @calendar-adjacentmonth-background-color;
  135. background-image:none;
  136. border-bottom:solid 1px @minor-border-color; /* todo: redundant with above .dijitCalendarDateTemplate rule */
  137. }
  138. .claro .dijitCalendarDateTemplate .dijitCalendarDateLabel {
  139. text-decoration:none;
  140. display:block;
  141. padding:3px 5px 3px 4px;
  142. border:solid 1px @calendar-currentmonth-background-color; /* intentionally matches background-color, no visible border until hover/selection */
  143. background-color:rgba(171,212,251,0); /* transparent causes black-flash animation problem on webkit */
  144. .transition-property(background-color, border);
  145. .transition-duration(.35s);
  146. }
  147. .claro .dijitCalendarPreviousMonth .dijitCalendarDateLabel,
  148. .claro .dijitCalendarNextMonth .dijitCalendarDateLabel{
  149. color: @calendar-adjacentmonth-text-color;
  150. border-color: @calendar-adjacentmonth-background-color; /* intentionally matches background-color, no visible border until hover/selection */
  151. }
  152. .claro .dijitCalendarYearContainer {
  153. vertical-align:middle;
  154. }
  155. .claro .dijitCalendarYearControl {
  156. padding: 1px 2px 2px 2px;
  157. }
  158. .claro .dijitCalendarYearLabel {
  159. padding: 2px 0 0 0;
  160. margin: 0;
  161. font-size: 1.17em;
  162. }
  163. .claro .dijitCalendarYearLabel span {
  164. /* trying to center next/current/previous year vertically, doesn't work on IE6/7 though */
  165. vertical-align:middle;
  166. }
  167. .claro .dijitCalendarSelectedYear {
  168. padding:0 3px;
  169. }
  170. .claro .dijitCalendarNextYear,
  171. .claro .dijitCalendarPreviousYear {
  172. padding: 1px 6px 1px 6px;
  173. font-size:0.909em;
  174. }
  175. .claro .dijitCalendarSelectedYear {
  176. font-size:1.091em;
  177. color:@selected-text-color;
  178. }
  179. /* End Normal Calendar Style */
  180. /* Hovered Calendar Style */
  181. .claro .dijitCalendarHoveredDate .dijitCalendarDateLabel,
  182. .claro .dijitCalendarEnabledDate:hover .dijitCalendarDateLabel {
  183. background-color:@hovered-background-color;
  184. border:solid 1px @hovered-border-color;
  185. color:@hovered-text-color;
  186. .transition-duration(.2s);
  187. }
  188. .claro .dijitCalendarNextYearHover, .claro .dijitCalendarNextYear:hover,
  189. .claro .dijitCalendarPreviousYearHover, .claro .dijitCalendarPreviousYear:hover {
  190. color:@hovered-text-color;
  191. border:solid 1px @calendar-button-hovered-border-color;
  192. padding: 0 5px 0 5px; /* reduced by 1 to make room for border */
  193. background-color: @calendar-button-hovered-background-color;
  194. }
  195. /* End Hovered Calendar Style */
  196. /* Active Calendar Style */
  197. .claro .dijitCalendarNextYearActive, .claro .dijitCalendarNextYear:active
  198. .claro .dijitCalendarPreviousYearActive, .claro .dijitCalendarPreviousYear:active {
  199. border: solid 1px @calendar-button-pressed-border-color;
  200. padding: 0 5px 0 5px; /* reduced by 1 to make room for border */
  201. background-color:@calendar-button-pressed-background-color;
  202. }
  203. .claro .dijitCalendarActiveDate .dijitCalendarDateLabel,
  204. .claro .dijitCalendarEnabledDate:active .dijitCalendarDateLabel {
  205. background-color: @calendar-date-pressed-background-color;
  206. border:solid 1px @calendar-date-pressed-border-color;
  207. .transition-duration(.1s);
  208. }
  209. .dj_ie6 .claro .dijitCalendarActiveDate .dijitCalendarDateLabel {
  210. background-image:none;
  211. }
  212. /* End Active Calendar Style */
  213. /* Selected Calendar Style */
  214. .claro .dijitCalendarSelectedDate .dijitCalendarDateLabel {
  215. color:@selected-text-color;
  216. background-color: @calendar-date-selected-background-color;
  217. border-color: @calendar-date-selected-border-color;
  218. }
  219. /* End Selected Calendar Style */
  220. /* Disabled Calendar Style*/
  221. .claro .dijitCalendarDisabledDate .dijitCalendarDateLabel {
  222. color: @disabled-text-color;
  223. text-decoration:line-through;
  224. }
  225. /* End Disabled Calendar Style */
  226. /* Styling for month DropDownButton */
  227. .claro .dijitCalendar .dijitDropDownButton {
  228. margin: 0;
  229. }
  230. .claro .dijitCalendar .dijitButtonText {
  231. padding: 1px 0 3px;
  232. margin-right:-4px;
  233. }
  234. .claro .dijitCalendar .dijitDropDownButton .dijitButtonNode {
  235. padding: 0 3px 0 2px;
  236. border:solid 1px @border-color;
  237. .box-shadow(0 0 0 rgba(0,0,0,0));
  238. // Override background settings from vanilla .dijitButtonNode. We want to inherit background of Calendar.
  239. background-color: transparent;
  240. background-image: none;
  241. }
  242. .claro .dijitCalendar .dijitDropDownButtonHover .dijitButtonNode,
  243. .claro .dijitCalendar .dijitDropDownButton:hover .dijitButtonNode {
  244. background-color: @calendar-button-hovered-background-color;
  245. border:solid 1px @calendar-button-hovered-border-color;
  246. }
  247. /* Styling for month drop down list */
  248. .claro .dijitCalendarMonthMenu {
  249. border-color: @popup-border-color;
  250. background-color: @menu-background-color;
  251. text-align:center;
  252. background-image: none;
  253. }
  254. .claro .dijitCalendarMonthMenu .dijitCalendarMonthLabel {
  255. border-top: solid 1px @menu-background-color; /* intentionally invisible until hover */
  256. border-bottom: solid 1px @menu-background-color;
  257. padding: 2px 0;
  258. }
  259. .claro .dijitCalendarMonthMenu .dijitCalendarMonthLabelHover,
  260. .claro .dijitCalendarMonthMenu .dijitCalendarMonthLabel:hover {
  261. border-color: @hovered-border-color;
  262. border-width:1px 0;
  263. .gradient-and-filter(@hovered-background-color, 70, 0);
  264. }