aboutsummaryrefslogtreecommitdiffstats
path: root/resources/src/mediawiki.special.changeslist.enhanced.less
blob: 69a4cecd932f8323c257a33cdfa62c0f7f3ef739 (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
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
/*!
 * Styling for Special:Watchlist and Special:RecentChanges when preference 'usenewrc'
 * a.k.a. Enhanced Recent Changes is enabled.
 */

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

.mw-enhancedchanges-checkbox {
	// The checkbox must be hidden. A display:none would also hide the
	// checkbox. But an element hidden by display:none is not focusable
	// via keyboard. Therefor make the checkbox invisible on another way
	// to allow to focus the checkbox with keyboard.

	// Remove any size of the checkbox.
	position: absolute;
	// Make the checkbox invisible.
	opacity: 0;
	// Prevent that the checkbox is clickable and changes the cursor.
	z-index: @z-index-bottom;

	// Hide the nested changes if the checkbox is not checked.
	&:not( :checked ) + * .mw-rcfilters-ui-highlights-enhanced-nested {
		display: none;
	}
}

table.mw-enhanced-rc {
	border: 0;
	border-spacing: 0;

	th,
	td {
		padding: 0;
		vertical-align: top;
	}

	td.mw-enhanced-rc-nested {
		padding-left: 1em;
	}
}

td.mw-enhanced-rc {
	white-space: nowrap;
	font-family: monospace, monospace;
}

.mw-enhanced-rc-time {
	font-family: monospace, monospace;
}

@width-arrow-space: 15px;

.mw-enhancedchanges-arrow {
	padding-top: 2px;
	cursor: pointer;

	.mw-enhancedchanges-checkbox + * & {
		.cdx-mixin-css-icon( @cdx-icon-down-triangle, @color-base, @size-icon-x-small );
		transition: transform 250ms ease;
	}

	.mw-enhancedchanges-checkbox:not( :checked ) + * & {
		// Rotate is not flipped by CSS Janus. [T353099]
		[ dir='ltr' ] & {
			transform: rotate( -90deg );
		}

		[ dir='rtl' ] & {
			transform: rotate( 90deg );
		}
	}

	.mw-enhancedchanges-checkbox[ type ] + * & {
		// Restore enforced space to make sure arrows align
		// with timestamp
		width: @width-arrow-space;
		height: @width-arrow-space;
	}

	// Show a focus ring around the label when focusing the invisible checkbox.
	// This simulates that the label is in focus.
	.mw-enhancedchanges-checkbox:focus + * & {
		outline: auto;
	}
}

.mw-enhancedchanges-arrow-space {
	display: inline-block;
	width: @width-arrow-space;
	height: @width-arrow-space;
}

.mw-enhanced-watched .mw-enhanced-rc-time {
	font-weight: bold;
}

/* stylelint-disable-next-line selector-class-pattern */
span.changedby {
	font-size: 95%;
}