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 /* stylelint-disable no-duplicate-selectors */
9 @import 'mediawiki.mixins';
12 @calendarHeight: 14em;
14 .mw-widget-calendarWidget {
15 width: @calendarWidth;
18 .mw-widget-calendarWidget-header {
23 .mw-widget-calendarWidget-header .oo-ui-buttonWidget {
27 .mw-widget-calendarWidget-header .mw-widget-calendarWidget-labelButton {
30 width: @calendarWidth - 2 * 3em;
32 .oo-ui-buttonElement-button {
33 width: @calendarWidth - 2 * 3em;
38 .mw-widget-calendarWidget-upButton {
43 .mw-widget-calendarWidget-prevButton {
47 .mw-widget-calendarWidget-nextButton {
51 .mw-widget-calendarWidget-body-outer-wrapper {
55 // Fit 7 days, 3em each
56 width: @calendarWidth;
57 // Fit 6 weeks + heading line, 2em each
58 height: @calendarHeight;
61 .mw-widget-calendarWidget-body-wrapper {
62 .mw-widget-calendarWidget-body {
63 display: inline-block;
64 // Fit 7 days, 3em each
65 width: @calendarWidth;
66 // Fit 6 weeks + heading line, 2em each
67 height: @calendarHeight;
70 .mw-widget-calendarWidget-body:not( .mw-widget-calendarWidget-old-body ):first-child {
71 margin-top: -@calendarHeight; /* stylelint-disable-line value-keyword-case */
72 margin-left: -@calendarWidth; /* stylelint-disable-line value-keyword-case */
75 .mw-widget-calendarWidget-body:not( .mw-widget-calendarWidget-old-body ):last-child {
81 .mw-widget-calendarWidget-body-wrapper-fade-previous {
82 width: @calendarWidth * 2;
83 height: @calendarHeight;
85 .mw-widget-calendarWidget-body:first-child {
86 margin-top: 0 !important; /* stylelint-disable-line declaration-no-important */
87 margin-left: 0 !important; /* stylelint-disable-line declaration-no-important */
88 .transition( margin-left 500ms );
92 .mw-widget-calendarWidget-body-wrapper-fade-next {
93 width: @calendarWidth * 2;
94 height: @calendarHeight;
96 .mw-widget-calendarWidget-body:first-child {
97 margin-left: -@calendarWidth !important; /* stylelint-disable-line value-keyword-case, declaration-no-important */
98 margin-top: 0 !important; /* stylelint-disable-line declaration-no-important */
99 .transition( margin-left 500ms );
103 .mw-widget-calendarWidget-body-wrapper-fade-up {
104 width: @calendarWidth;
105 height: @calendarHeight * 2;
107 .mw-widget-calendarWidget-body {
111 .mw-widget-calendarWidget-body:first-child {
112 margin-left: 0 !important; /* stylelint-disable-line declaration-no-important */
113 margin-top: 0 !important; /* stylelint-disable-line declaration-no-important */
114 .transition( margin-top 500ms );
118 .mw-widget-calendarWidget-body-wrapper-fade-down {
119 width: @calendarWidth;
120 height: @calendarHeight * 2;
122 .mw-widget-calendarWidget-body {
126 .mw-widget-calendarWidget-body:first-child {
127 margin-left: 0 !important; /* stylelint-disable-line declaration-no-important */
128 margin-top: -@calendarHeight !important; /* stylelint-disable-line value-keyword-case, declaration-no-important */
129 .transition( margin-top 500ms );
133 .mw-widget-calendarWidget-day,
134 .mw-widget-calendarWidget-day-heading,
135 .mw-widget-calendarWidget-month,
136 .mw-widget-calendarWidget-year {
137 display: inline-block;
138 vertical-align: middle;
141 text-overflow: ellipsis;
145 .mw-widget-calendarWidget-day,
146 .mw-widget-calendarWidget-day-heading {
148 width: @calendarWidth / 7;
149 line-height: @calendarHeight / 7;
150 // Don't overlap the hacked-up fake box-shadow border we get when focussed
152 width: @calendarWidth / 7 - 0.2em;
155 &:nth-child( 7n+1 ) {
156 width: @calendarWidth / 7 - 0.2em;
159 &:nth-child( 42 ) ~ & {
160 line-height: @calendarHeight / 7 - 0.2em;
161 margin-bottom: 0.2em;
165 .mw-widget-calendarWidget-month {
167 width: @calendarWidth / 2;
168 line-height: @calendarHeight / 6;
169 // Don't overlap the hacked-up fake box-shadow border we get when focussed
171 width: @calendarWidth / 2 - 0.2em;
174 &:nth-child( 2n+1 ) {
175 width: @calendarWidth / 2 - 0.2em;
178 &:nth-child( 10 ) ~ & {
179 line-height: @calendarHeight / 6 - 0.2em;
180 margin-bottom: 0.2em;
184 .mw-widget-calendarWidget-year {
186 width: @calendarWidth / 5;
187 line-height: @calendarHeight / 4;
188 // Don't overlap the hacked-up fake box-shadow border we get when focussed
190 width: @calendarWidth / 5 - 0.2em;
193 &:nth-child( 5n+1 ) {
194 width: @calendarWidth / 5 - 0.2em;
197 &:nth-child( 15 ) ~ & {
198 line-height: @calendarHeight / 4 - 0.2em;
199 margin-bottom: 0.2em;
203 .mw-widget-calendarWidget-item {
208 .mw-widget-calendarWidget {
209 .box-sizing( border-box );
210 border: 1px solid #a2a9b1;
211 .transition( ~'border-color 100ms, box-shadow 100ms' );
215 box-shadow: inset 0 0 0 1px #36c;
238 box-shadow: inset 0 0 0 1px #36c;
242 .transition( ~'background-color 250ms, color 250ms' );
245 background-color: #36c;
250 background-color: #2a4b8d;