2019-10-25 20:46:51 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
@import 'mediawiki.ui/variables.less';
|
2016-07-07 12:35:17 +00:00
|
|
|
|
2014-08-07 11:38:34 +00:00
|
|
|
/* Search */
|
|
|
|
#p-search {
|
|
|
|
float: left;
|
|
|
|
margin-right: 0.5em;
|
|
|
|
margin-left: 0.5em;
|
|
|
|
|
|
|
|
h3 {
|
2016-07-07 12:35:17 +00:00
|
|
|
.mixin-screen-reader-text;
|
2014-08-07 11:38:34 +00:00
|
|
|
}
|
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
form {
|
|
|
|
margin: 0.5em 0 0;
|
2014-08-07 11:38:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-10 00:44:34 +00:00
|
|
|
#simpleSearch {
|
2014-08-07 11:38:34 +00:00
|
|
|
display: block;
|
2019-04-18 19:54:17 +00:00
|
|
|
width: 13.2em;
|
2015-10-31 12:43:08 +00:00
|
|
|
width: 20vw; /* responsive width */
|
|
|
|
min-width: 5em;
|
|
|
|
max-width: 20em;
|
2019-04-18 19:54:17 +00:00
|
|
|
height: 100%;
|
|
|
|
margin-top: 0;
|
2014-08-07 11:38:34 +00:00
|
|
|
position: relative;
|
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
// Styles for both the search input and the button.
|
2014-08-07 11:38:34 +00:00
|
|
|
input {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2019-04-18 19:54:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// The search input.
|
|
|
|
#searchInput {
|
2019-10-02 07:24:25 +00:00
|
|
|
// Support IE6-8: Fallback for browsers, which don't support `rgba()`.
|
|
|
|
background-color: @background-color-base;
|
|
|
|
background-color: rgba( 255, 255, 255, 0.5 );
|
|
|
|
color: @color-base--emphasized;
|
2019-04-18 19:54:17 +00:00
|
|
|
width: 100%;
|
|
|
|
.box-sizing( border-box );
|
2019-09-28 07:25:09 +00:00
|
|
|
border: @border-width-base @border-style-base @colorGray10;
|
2019-04-18 19:54:17 +00:00
|
|
|
border-radius: @borderRadius;
|
|
|
|
// `padding-right` equals to `#searchbutton` width below.
|
2019-09-18 22:26:38 +00:00
|
|
|
padding: 0.4em @width-search-button 0.4em 0.4em;
|
2019-04-18 19:54:17 +00:00
|
|
|
.box-shadow( @boxShadowWidget );
|
2019-09-18 22:26:38 +00:00
|
|
|
font-size: @font-size-search-input;
|
2019-04-18 19:54:17 +00:00
|
|
|
direction: ltr;
|
|
|
|
.transition( ~'border-color 250ms, box-shadow 250ms' );
|
|
|
|
// Support: Webkit browsers. Undo the proprietary styles applied to `type=search` fields,
|
|
|
|
// we provide our own.
|
|
|
|
-webkit-appearance: textfield;
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
#simpleSearch:hover & {
|
|
|
|
border-color: @colorGray7;
|
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
&:focus,
|
|
|
|
#simpleSearch:hover &:focus {
|
|
|
|
outline: 0;
|
|
|
|
border-color: @colorProgressive;
|
|
|
|
.box-shadow( @boxShadowProgressiveFocus );
|
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
.mixin-placeholder( {
|
|
|
|
color: @colorGray7;
|
|
|
|
opacity: 1;
|
|
|
|
} );
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
&::-webkit-search-decoration,
|
|
|
|
&::-webkit-search-cancel-button,
|
|
|
|
&::-webkit-search-results-button,
|
|
|
|
&::-webkit-search-results-decoration {
|
2014-08-07 11:38:34 +00:00
|
|
|
-webkit-appearance: textfield;
|
|
|
|
}
|
2019-04-18 19:54:17 +00:00
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
// The buttons. They are displayed in the same position, and if both are
|
|
|
|
// present the fulltext search one obscures the 'Go' one.
|
|
|
|
#searchButton,
|
|
|
|
#mw-searchButton {
|
2019-10-14 14:50:17 +00:00
|
|
|
background-color: transparent;
|
2019-04-18 19:54:17 +00:00
|
|
|
position: absolute;
|
|
|
|
top: @border-width-base;
|
|
|
|
bottom: @border-width-base;
|
2019-09-18 22:26:38 +00:00
|
|
|
// `@border-width-base * 2` is in regards to harmonize position start and end.
|
2019-04-18 19:54:17 +00:00
|
|
|
right: @border-width-base;
|
2019-09-18 22:26:38 +00:00
|
|
|
min-width: 24px;
|
|
|
|
width: @width-search-button;
|
2019-04-18 19:54:17 +00:00
|
|
|
border: 0;
|
|
|
|
padding: 0;
|
|
|
|
cursor: pointer;
|
2019-09-18 22:26:38 +00:00
|
|
|
// Equal `font-size` to search input for `padding` calculationo.
|
|
|
|
font-size: @font-size-search-input;
|
2019-04-18 19:54:17 +00:00
|
|
|
/* Opera 12 on RTL flips the text in a funny way without this. */
|
|
|
|
/* @noflip */
|
|
|
|
direction: ltr;
|
|
|
|
/* Hide button text and replace it with the image. */
|
|
|
|
text-indent: -99999px;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
2016-09-18 14:09:13 +00:00
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
#searchButton {
|
2019-07-18 17:59:40 +00:00
|
|
|
.background-image-svg( 'images/search.svg', 'images/search.png' );
|
2019-04-18 19:54:17 +00:00
|
|
|
background-position: center center;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
#mw-searchButton {
|
|
|
|
z-index: 1;
|
2014-08-07 11:38:34 +00:00
|
|
|
}
|