| 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 |
|
| 35 |
@import 'dijit_variables'; |
| 36 |
|
| 37 |
.{$theme-name} { |
| 38 |
|
| 39 |
.dijitCalendar { |
| 40 |
background-color: $calendar-background-color; |
| 41 |
text-align:center; |
| 42 |
padding: $calendar-padding; |
| 43 |
border: 1px solid $calendar-border-color; |
| 44 |
border-collapse: separate; // in case user CSS has set border-collapse: collapse for tables |
| 45 |
border-radius: $calendar-border-radius; |
| 46 |
box-shadow: $calendar-box-shadow; |
| 47 |
} |
| 48 |
|
| 49 |
.dijitCalendarMonthContainer th { |
| 50 |
text-align:center; |
| 51 |
line-height: $line-height; |
| 52 |
vertical-align:middle; |
| 53 |
margin: $calendar-padding 0; |
| 54 |
} |
| 55 |
|
| 56 |
/* next/previous month arrows */ |
| 57 |
|
| 58 |
.dijitCalendarArrow { |
| 59 |
_icon-core-style(); |
| 60 |
cursor: pointer; |
| 61 |
font-size: $calendar-icon-size; |
| 62 |
border: 1px solid transparent; |
| 63 |
padding: $padding; |
| 64 |
} |
| 65 |
|
| 66 |
// Since the arrow icons are pulled from the font, the `img` tags are not needed. |
| 67 |
.dijitCalendarDecrease, |
| 68 |
.dijitCalendarIncrease { |
| 69 |
display: none; |
| 70 |
} |
| 71 |
|
| 72 |
.dijitCalendarDecrementArrow { |
| 73 |
float: left; |
| 74 |
padding-left: ($padding / 2); |
| 75 |
|
| 76 |
&:before { |
| 77 |
content: $calendar-icon-decrease; |
| 78 |
} |
| 79 |
} |
| 80 |
|
| 81 |
.dijitCalendarIncrementArrow { |
| 82 |
float: right; |
| 83 |
padding-right: ($padding / 2); |
| 84 |
|
| 85 |
&:before { |
| 86 |
content: $calendar-icon-increase; |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
.dijitCalendarArrowHover .dijitCalendarIncrementControl, |
| 91 |
.dijitCalendarArrow:hover .dijitCalendarIncrementControl, |
| 92 |
.dijitCalendarNextYearHover, .dijitCalendarNextYear:hover, |
| 93 |
.dijitCalendarPreviousYearHover, .dijitCalendarPreviousYear:hover { |
| 94 |
button-style(); |
| 95 |
padding: $padding; |
| 96 |
} |
| 97 |
|
| 98 |
.dijitCalendarArrowActive .dijitCalendarIncrementControl, |
| 99 |
.dijitCalendarArrow:active .dijitCalendarIncrementControl, |
| 100 |
.dijitCalendarNextYearActive, .dijitCalendarNextYear:active |
| 101 |
.dijitCalendarPreviousYearActive, .dijitCalendarPreviousYear:active { |
| 102 |
button-active-style(); |
| 103 |
} |
| 104 |
|
| 105 |
.dijitA11ySideArrow { |
| 106 |
/* text +/- labels instead of arrow icons, for high contrast mode */ |
| 107 |
display: none; |
| 108 |
} |
| 109 |
|
| 110 |
.dijitCalendarContainer { |
| 111 |
th, td { |
| 112 |
padding: $calendar-day-cell-padding; |
| 113 |
} |
| 114 |
} |
| 115 |
|
| 116 |
/* day */ |
| 117 |
|
| 118 |
.dijitCalendarDayLabelTemplate { |
| 119 |
text-align: center; |
| 120 |
border-bottom: $border-color; |
| 121 |
} |
| 122 |
|
| 123 |
.dijitCalendarDayLabel { |
| 124 |
font-weight: $calendar-day-cell-font-weight; |
| 125 |
text-align: center; |
| 126 |
} |
| 127 |
|
| 128 |
/* date */ |
| 129 |
|
| 130 |
.dijitCalendarDateTemplate { |
| 131 |
font-size: $calendar-date-font-size; |
| 132 |
letter-spacing: .05em; |
| 133 |
text-align:center; |
| 134 |
|
| 135 |
.dijitCalendarDateLabel { |
| 136 |
text-decoration: none; |
| 137 |
display: block; |
| 138 |
padding: $calendar-date-cell-padding; |
| 139 |
border: 0 none; |
| 140 |
border-radius: $calendar-date-cell-border-radius; |
| 141 |
} |
| 142 |
} |
| 143 |
|
| 144 |
.dijitCalendarPreviousMonth, |
| 145 |
.dijitCalendarNextMonth { |
| 146 |
.dijitCalendarDateLabel { |
| 147 |
color: $calendar-date-cell-prev-next-month-text-color; |
| 148 |
} |
| 149 |
} |
| 150 |
|
| 151 |
.dijitCalendarCurrentDate { |
| 152 |
.dijitCalendarDateLabel { |
| 153 |
border-color: $calendar-date-cell-current-border-color; |
| 154 |
} |
| 155 |
} |
| 156 |
|
| 157 |
/* hover */ |
| 158 |
|
| 159 |
.dijitCalendarHoveredDate .dijitCalendarDateLabel, |
| 160 |
.dijitCalendarEnabledDate:hover .dijitCalendarDateLabel { |
| 161 |
background-color: $calendar-date-cell-hovered-background-color; |
| 162 |
} |
| 163 |
|
| 164 |
/* active */ |
| 165 |
|
| 166 |
.dijitCalendarActiveDate .dijitCalendarDateLabel, |
| 167 |
.dijitCalendarEnabledDate:active .dijitCalendarDateLabel { |
| 168 |
background-color: $calendar-date-cell-active-background-color; |
| 169 |
} |
| 170 |
|
| 171 |
/* selected */ |
| 172 |
|
| 173 |
.dijitCalendarSelectedDate, |
| 174 |
.dijitCalendarSelectedDate.dijitCalendarHoveredDate { |
| 175 |
.dijitCalendarDateLabel { |
| 176 |
color:$calendar-date-cell-selected-text-color; |
| 177 |
background-color: $calendar-date-cell-selected-background-color; |
| 178 |
} |
| 179 |
} |
| 180 |
|
| 181 |
/* disabled */ |
| 182 |
|
| 183 |
.dijitCalendarDisabledDate .dijitCalendarDateLabel { |
| 184 |
opacity: $disabled-opacity; |
| 185 |
} |
| 186 |
|
| 187 |
/* year */ |
| 188 |
|
| 189 |
.dijitCalendarYearContainer { |
| 190 |
vertical-align:middle; |
| 191 |
} |
| 192 |
|
| 193 |
.dijitCalendarYearLabel { |
| 194 |
padding: $calendar-year-cell-padding 0 0 0; |
| 195 |
margin: 0; |
| 196 |
font-size: $calendar-year-font-size; |
| 197 |
|
| 198 |
span { |
| 199 |
vertical-align:middle; |
| 200 |
} |
| 201 |
} |
| 202 |
|
| 203 |
.dijitCalendarSelectedYear, |
| 204 |
.dijitCalendarNextYear, |
| 205 |
.dijitCalendarPreviousYear { |
| 206 |
padding: $padding; |
| 207 |
} |
| 208 |
|
| 209 |
.dijitCalendarSelectedYear { |
| 210 |
color: $calendar-year-prev-current-year-text-color; |
| 211 |
} |
| 212 |
|
| 213 |
.dijitCalendarNextYear, |
| 214 |
.dijitCalendarPreviousYear { |
| 215 |
color: $calendar-year-prev-next-year-text-color; |
| 216 |
font-size: $calendar-year-prev-next-year-font-size; |
| 217 |
line-height: $line-height; |
| 218 |
border: 1px solid transparent; |
| 219 |
} |
| 220 |
|
| 221 |
.dijitCalendarSelectedYear { |
| 222 |
padding: 0 $calendar-year-cell-padding; |
| 223 |
} |
| 224 |
|
| 225 |
/* month dropdown */ |
| 226 |
|
| 227 |
.dijitCalendar .dijitDropDownButton { |
| 228 |
margin: 0; |
| 229 |
|
| 230 |
.dijitButtonNode { |
| 231 |
} |
| 232 |
} |
| 233 |
|
| 234 |
.dijitCalendarMonthMenu { |
| 235 |
padding: $calendar-month-dropdown-menu-padding 0; |
| 236 |
|
| 237 |
.dijitCalendarMonthLabel { |
| 238 |
padding: $calendar-month-dropdown-menu-item-padding; |
| 239 |
} |
| 240 |
|
| 241 |
.dijitCalendarMonthLabelHover { |
| 242 |
color: $calendar-month-dropdown-menu-item-hovered-text-color; |
| 243 |
background-color: $calendar-month-dropdown-menu-item-hovered-background-color; |
| 244 |
} |
| 245 |
} |
| 246 |
|
| 247 |
} |