Merge "Remove parameter 'options' from hook 'SkinEditSectionLinks'"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.TitleWidget.less
1 /*!
2 * MediaWiki Widgets - TitleWidget styles.
3 *
4 * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
6 */
7 @import 'mediawiki.mixins';
8
9 .mw-widget-titleWidget-menu {
10 .mw-widget-titleOptionWidget {
11 line-height: normal;
12
13 &-description {
14 color: #72777d;
15 }
16 }
17
18 &-withImages {
19 .mw-widget-titleOptionWidget {
20 .box-sizing( border-box );
21 min-height: 3.75em;
22 padding-left: 4.75em;
23 padding-top: 0.5em;
24 padding-bottom: 0.5em;
25
26 &:not( :last-child ) {
27 margin-bottom: 2px;
28 }
29
30 > .oo-ui-labelElement-label {
31 line-height: 2.8em;
32 }
33
34 &.oo-ui-iconElement {
35 > .oo-ui-iconElement-icon {
36 display: block;
37 width: 3.75em;
38 height: 3.75em;
39 left: 0;
40
41 &:not( .mw-widget-titleOptionWidget-hasImage ) {
42 background-size: 80%;
43 background-color: #c8ccd1;
44 opacity: 0.4;
45 }
46
47 &.mw-widget-titleOptionWidget-hasImage {
48 border: 0;
49 background-size: cover;
50 opacity: 0.7;
51 }
52 }
53 }
54
55 &.oo-ui-optionWidget-highlighted,
56 &.oo-ui-optionWidget-selected {
57 &.oo-ui-iconElement > .mw-widget-titleOptionWidget-hasImage {
58 opacity: 1;
59 }
60 }
61 }
62 }
63
64 &-withDescriptions {
65 .mw-widget-titleOptionWidget {
66 > .oo-ui-labelElement-label {
67 line-height: 1.5em;
68 }
69
70 &-description {
71 display: block;
72 white-space: nowrap;
73 text-overflow: ellipsis;
74 overflow: hidden;
75 }
76 }
77 }
78
79 /* TODO: Should be able to use :not( &-withDescriptions ) but LESS version is buggy (T204816) */
80 &:not( .mw-widget-titleWidget-menu-withDescriptions ) {
81 .mw-widget-titleOptionWidget-description {
82 display: none;
83 }
84 }
85 }