Localisation updates from https://translatewiki.net.
[mediawiki.git] / resources / src / mediawiki.widgets.datetime / CalendarWidget.less
bloba6f8aec46dae036d353a33cd0ba302bb8ab65eb4
1 @import 'mediawiki.skin.variables.less';
2 @import 'mediawiki.widgets.datetime.definitions';
4 /* stylelint-disable no-duplicate-selectors */
5 .mw-widgets-datetime-calendarWidget {
6         background-color: @background-color-base;
7         display: inline-block;
8         position: relative;
9         border: @border-base;
10         border-radius: @border-radius-base;
11         padding: 0.5em;
12         box-shadow: @box-shadow-drop-medium;
13         vertical-align: middle;
15         &:focus {
16                 border-color: @border-color-progressive--focus;
17                 outline: @outline-base--focus;
18                 box-shadow: @box-shadow-inset-small @box-shadow-color-progressive--focus, @box-shadow-drop-medium;
19         }
21         &.mw-widgets-datetime-calendarWidget-dependent {
22                 display: block;
23                 position: absolute;
24                 z-index: 4;
25         }
27         &-grid {
28                 table-layout: fixed;
30                 .mw-widgets-datetime-calendarWidget-cell {
31                         display: table-cell;
32                         white-space: nowrap;
33                 }
34         }
36         &.mw-widgets-datetime-calendarWidget-dependent {
37                 margin-top: -1px;
38         }
40         &-heading {
41                 font-weight: bold;
42                 text-align: center;
43                 vertical-align: middle;
44                 white-space: nowrap;
46                 .mw-widgets-datetime-calendarWidget-previous {
47                         float: left;
49                         // Overwrite OOUI's `.oo-ui-buttonElement-frameless.oo-ui-iconElement:first-child`
50                         &:first-child {
51                                 margin-left: 0;
52                         }
53                 }
55                 .mw-widgets-datetime-calendarWidget-next {
56                         float: right;
57                 }
58         }
60         &-grid {
61                 margin: 0 auto;
63                 .mw-widgets-datetime-calendarWidget-cell {
64                         text-align: center;
66                         .oo-ui-buttonElement-button {
67                                 width: 100%;
68                                 border: 1px solid rgba( 255, 255, 255, 0 );
69                                 transition-property: @transition-property-base;
70                                 transition-duration: @transition-duration-base;
71                         }
73                         &.mw-widgets-datetime-calendarWidget-extra .oo-ui-buttonElement-button {
74                                 .oo-ui-labelElement-label {
75                                         color: @color-subtle;
76                                 }
78                                 &:hover .oo-ui-labelElement-label {
79                                         color: @color-inverted;
80                                 }
81                         }
83                         &.mw-widgets-datetime-calendarWidget-selected .oo-ui-buttonElement-button {
84                                 background-color: @background-color-progressive--active;
86                                 .oo-ui-labelElement-label {
87                                         color: @color-inverted;
88                                 }
89                         }
91                         &.oo-ui-widget-enabled .oo-ui-buttonElement-button:hover {
92                                 background-color: #36c;
93                                 color: @color-inverted;
94                                 border-color: #36c;
95                         }
96                 }
97         }
99         &:focus &-grid &-cell&-focused .oo-ui-buttonElement-button {
100                 border-color: rgba( 0, 0, 0, 0.3 );
101         }