2 * MediaWiki Widgets – CalendarWidget styles.
4 * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
8 @import 'mediawiki.mixins';
11 @calendarHeight: 14em;
13 .mw-widget-calendarWidget {
14 width: @calendarWidth;
17 .mw-widget-calendarWidget-header {
22 .mw-widget-calendarWidget-header .oo-ui-buttonWidget {
26 .mw-widget-calendarWidget-header .mw-widget-calendarWidget-labelButton {
29 width: @calendarWidth - 2*3em;
31 .oo-ui-buttonElement-button {
32 width: @calendarWidth - 2*3em;
37 .mw-widget-calendarWidget-upButton {
42 .mw-widget-calendarWidget-prevButton {
46 .mw-widget-calendarWidget-nextButton {
50 .mw-widget-calendarWidget-body-outer-wrapper {
54 // Fit 7 days, 3em each
55 width: @calendarWidth;
56 // Fit 6 weeks + heading line, 2em each
57 height: @calendarHeight;
60 .mw-widget-calendarWidget-body-wrapper {
61 .mw-widget-calendarWidget-body {
62 display: inline-block;
63 // Fit 7 days, 3em each
64 width: @calendarWidth;
65 // Fit 6 weeks + heading line, 2em each
66 height: @calendarHeight;
69 .mw-widget-calendarWidget-body:not( .mw-widget-calendarWidget-old-body ):first-child {
70 margin-top: -@calendarHeight;
71 margin-left: -@calendarWidth;
74 .mw-widget-calendarWidget-body:not( .mw-widget-calendarWidget-old-body ):last-child {
80 .mw-widget-calendarWidget-body-wrapper-fade-previous {
81 width: @calendarWidth * 2;
82 height: @calendarHeight;
84 .mw-widget-calendarWidget-body:first-child {
85 margin-top: 0 !important;
86 margin-left: 0 !important;
87 .transition( margin-left 500ms );
91 .mw-widget-calendarWidget-body-wrapper-fade-next {
92 width: @calendarWidth * 2;
93 height: @calendarHeight;
95 .mw-widget-calendarWidget-body:first-child {
96 margin-left: -@calendarWidth !important;
97 margin-top: 0 !important;
98 .transition( margin-left 500ms );
102 .mw-widget-calendarWidget-body-wrapper-fade-up {
103 width: @calendarWidth;
104 height: @calendarHeight * 2;
106 .mw-widget-calendarWidget-body {
110 .mw-widget-calendarWidget-body:first-child {
111 margin-left: 0 !important;
112 margin-top: 0 !important;
113 .transition( margin-top 500ms );
117 .mw-widget-calendarWidget-body-wrapper-fade-down {
118 width: @calendarWidth;
119 height: @calendarHeight * 2;
121 .mw-widget-calendarWidget-body {
125 .mw-widget-calendarWidget-body:first-child {
126 margin-left: 0 !important;
127 margin-top: -@calendarHeight !important;
128 .transition( margin-top 500ms );
132 .mw-widget-calendarWidget-day,
133 .mw-widget-calendarWidget-day-heading,
134 .mw-widget-calendarWidget-month,
135 .mw-widget-calendarWidget-year {
136 display: inline-block;
137 vertical-align: middle;
140 text-overflow: ellipsis;
144 .mw-widget-calendarWidget-day,
145 .mw-widget-calendarWidget-day-heading {
147 width: @calendarWidth / 7;
148 line-height: @calendarHeight / 7;
149 // Don't overlap the hacked-up fake box-shadow border we get when focussed
151 width: @calendarWidth / 7 - 0.2em;
154 &:nth-child( 7n+1 ) {
155 width: @calendarWidth / 7 - 0.2em;
158 &:nth-child( 42 ) ~ & {
159 line-height: @calendarHeight / 7 - 0.2em;
160 margin-bottom: 0.2em;
164 .mw-widget-calendarWidget-month {
166 width: @calendarWidth / 2;
167 line-height: @calendarHeight / 6;
168 // Don't overlap the hacked-up fake box-shadow border we get when focussed
170 width: @calendarWidth / 2 - 0.2em;
173 &:nth-child( 2n+1 ) {
174 width: @calendarWidth / 2 - 0.2em;
177 &:nth-child( 10 ) ~ & {
178 line-height: @calendarHeight / 6 - 0.2em;
179 margin-bottom: 0.2em;
183 .mw-widget-calendarWidget-year {
185 width: @calendarWidth / 5;
186 line-height: @calendarHeight / 4;
187 // Don't overlap the hacked-up fake box-shadow border we get when focussed
189 width: @calendarWidth / 5 - 0.2em;
192 &:nth-child( 5n+1 ) {
193 width: @calendarWidth / 5 - 0.2em;
196 &:nth-child( 15 ) ~ & {
197 line-height: @calendarHeight / 4 - 0.2em;
198 margin-bottom: 0.2em;
202 .mw-widget-calendarWidget-item {
207 .mw-widget-calendarWidget {
208 .box-sizing( border-box );
209 border: 1px solid #a2a9b1;
210 .transition( ~'border-color 100ms, box-shadow 100ms' );
214 box-shadow: inset 0 0 0 1px #36c;
237 box-shadow: inset 0 0 0 1px #36c;
241 .transition( ~'background-color 250ms, color 250ms' );
244 background-color: #36c;
249 background-color: #2a4b8d;