aboutsummaryrefslogtreecommitdiffstats
path: root/resources/src/jquery/jquery.makeCollapsible.less
blob: 5984ce473bff66084ee4ee2e9e9e9ba819bed239 (plain) (blame)
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
/*
 * Please do not add any CSS rules here that impact the positioning of the element
 *  e.g. padding, margin, position or float.
 * These instead should live in jquery.makeCollapsible.styles
*/

@import 'mediawiki.skin.variables.less';

/* See also jquery.makeCollapsible.js */
.mw-collapsible-toggle {
	float: right;
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.mw-collapsible-toggle-default {
	// stylelint-disable plugin/no-unsupported-browser-features
	// This element is now a button, but it used to be a link, so keep link styles for now
	// (until someone dares to try to change the design).
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	// stylelint-enable plugin/no-unsupported-browser-features
	background: none;
	margin: 0;
	padding: 0;
	border: 0;
	font: inherit;

	.mw-collapsible-text {
		color: @color-link;

		.mw-underline-always & {
			text-decoration: underline;
		}

		.mw-underline-never & {
			text-decoration: none;
		}
	}

	&:hover .mw-collapsible-text {
		text-decoration: underline;
	}

	&:active .mw-collapsible-text {
		color: @color-link--active;
	}

	&::before {
		content: '[';
	}

	&::after {
		content: ']';
	}
}

.mw-customtoggle,
.mw-collapsible-toggle {
	cursor: pointer;
}

/* Collapse links in captions should be inline */
caption .mw-collapsible-toggle,
.mw-content-ltr caption .mw-collapsible-toggle,
.mw-content-rtl caption .mw-collapsible-toggle,
.mw-content-rtl .mw-content-ltr caption .mw-collapsible-toggle,
.mw-content-ltr .mw-content-rtl caption .mw-collapsible-toggle {
	float: none;
}