summaryrefslogtreecommitdiff
path: root/www/wiki/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
blob: 8ec2735ea4c502508047aaf154621eb84444fe83 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
/* interwiki search results */
/*==========================*/

@import 'mediawiki.ui/variables.less';
@import 'mediawiki.mixins';

.mw-searchresults-has-iw {

	.iw-headline {
		font-weight: bold;
	}

	.iw-results {
		list-style: none;
		margin: 0;
	}

	.iw-resultset {
		.box-sizing(border-box);
		padding: 0.5em;
		vertical-align: top;
		width: 100%;
		float: left;
		background-color: @colorGray15;
		margin-bottom: 1em;
		word-break: break-word;
	}

	.iw-result__title {
		font-size: 108%; /* matching regular search title */
	}

	.iw-result:after,
	.iw-result__content:after { /* clearfix */
		visibility: hidden;
		display: block;
		font-size: 0;
		content: ' ';
		clear: both;
		height: 0;
	}

	.iw-result__footer {
		float: right;
		font-size: 97%; /* matching main search result font-size */
		margin-top: 0.5em;
	}
	.iw-result__footer a {
		vertical-align: middle;
		font-style: italic;
	}

	.oo-ui-icon-favicon {
		padding-right: 1em;
	}

	/* image search result */
	.iw-result__mini-gallery {
		position: relative;
		float: left;
		width: 100%;
		height: 200px;
		.box-sizing(border-box);
		padding: 0.25rem;
	}

	/* second and third images are small */
	.iw-result__mini-gallery:nth-child( 2 ),
	.iw-result__mini-gallery:nth-child( 3 ) { /* stylelint-disable-line indentation */
		width: 50%;
		height: 100px;
	}

	.iw-result__mini-gallery__image {
		display: block;
		position: relative;
		width: 100%;
		height: 100%;
		background-size: 100% auto;
		background-size: cover;
		background-repeat: no-repeat;
		background-position: center center;
	}

	/* image gallery text */
	.iw-result__mini-gallery__image > .iw-result__mini-gallery__caption {
		visibility: hidden;
		position: absolute;
		bottom: 0;
		left: 0;
		text-align: center;
		color: #fff;
		font-size: 0.8em;
		padding: 0.5em;
		background-color: rgba( 0, 0, 0, 0.5 );
	}

	.iw-result__mini-gallery__image:hover > .iw-result__mini-gallery__caption {
		visibility: visible;
	}

	/* tablet and up */

	@media only screen and ( min-width: @deviceWidthTablet ) {

		#mw-interwiki-results {
			width: 30%;
			display: inline-block; /* used to align interwiki sidebar with the top of the main search results */
			margin-left: 8%; /* since inline-block causes whitespace issues, this is 8 instead of 10% */
		}
		.mw-search-createlink,
		.mw-search-nonefound,
		.mw-search-results,
		.mw-search-interwiki-header {
			float: left;
			width: 60%;
			clear: left;
			max-width: 60%;
		}
	}
}