summaryrefslogtreecommitdiff
path: root/www/wiki/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.less
blob: be3c10e5fc76b3223b1288e6305880046cca9326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*!
 * MediaWiki Widgets - TitleWidget styles.
 *
 * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
 * @license The MIT License (MIT); see LICENSE.txt
 */
@import 'mediawiki.mixins';

.mw-widget-titleWidget-menu {
	.mw-widget-titleOptionWidget {
		line-height: normal;

		&-description {
			color: #72777d;
		}
	}

	&-withImages {
		.mw-widget-titleOptionWidget {
			.box-sizing( border-box );
			min-height: 3.75em;
			padding-left: 4.75em;
			padding-top: 0.5em;
			padding-bottom: 0.5em;

			&:not( :last-child ) {
				margin-bottom: 2px;
			}

			> .oo-ui-labelElement-label {
				line-height: 2.8em;
			}

			&.oo-ui-iconElement {
				> .oo-ui-iconElement-icon {
					display: block;
					width: 3.75em;
					height: 3.75em;
					left: 0;
					&:not( .mw-widget-titleOptionWidget-hasImage ) {
						background-color: #c8ccd1;
						opacity: 0.4;
					}
					&.mw-widget-titleOptionWidget-hasImage {
						border: 0;
						background-size: cover;
						opacity: 0.7;
					}
				}
			}

			&.oo-ui-optionWidget-highlighted,
			&.oo-ui-optionWidget-selected {
				&.oo-ui-iconElement > .mw-widget-titleOptionWidget-hasImage {
					opacity: 1;
				}
			}
		}
	}

	&-withDescriptions {
		.mw-widget-titleOptionWidget {
			> .oo-ui-labelElement-label {
				line-height: 1.5em;
			}

			&-description {
				display: block;
				white-space: nowrap;
				text-overflow: ellipsis;
				overflow: hidden;
			}
		}
	}

	&:not( &-withDescriptions ) {
		.mw-widget-titleOptionWidget-description {
			display: none;
		}
	}
}

/* Icons */

.oo-ui-icon-page-disambiguation {
	/* @embed */
	background-image: url( images/page-disambiguation-ltr.svg );
}

.oo-ui-icon-page-existing {
	/* @embed */
	background-image: url( images/page-existing-ltr.svg );
}

.oo-ui-icon-page-not-found {
	/* @embed */
	background-image: url( images/page-not-found-ltr.svg );
}

.oo-ui-icon-page-not-found:lang( he ) {
	/* @embed */
	background-image: url( images/page-not-found-he-yi.svg );
}

.oo-ui-icon-page-redirect {
	/* @embed */
	background-image: url( images/page-redirect-ltr.svg );
}