2019-10-25 20:46:51 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
2021-02-02 10:04:37 +00:00
|
|
|
@import '../../common/variables.less';
|
2016-07-07 12:35:17 +00:00
|
|
|
|
2020-06-15 23:10:25 +00:00
|
|
|
// Defined as `div`.
|
|
|
|
// Provide extra element for gadgets due to `form` already carrying an `id`.
|
2021-09-28 16:27:10 +00:00
|
|
|
.vector-search-box-inner {
|
2020-06-15 23:10:25 +00:00
|
|
|
position: relative;
|
2019-04-18 19:54:17 +00:00
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The search input.
|
2021-09-16 18:00:05 +00:00
|
|
|
// Note that these rules only apply to the non-Vue enabled search input field.
|
|
|
|
// When Vue.js has loaded this element will no longer be in the page and subsituted with
|
|
|
|
// a WVUI element.
|
|
|
|
.vector-search-box-input {
|
2019-10-02 07:24:25 +00:00
|
|
|
background-color: rgba( 255, 255, 255, 0.5 );
|
|
|
|
color: @color-base--emphasized;
|
2019-04-18 19:54:17 +00:00
|
|
|
width: 100%;
|
2020-10-30 19:39:13 +00:00
|
|
|
// Reduce height slightly from standard to match legacy Vector tabs.
|
|
|
|
height: unit( 28 / @font-size-browser / @font-size-search-input, em ); // Equals `2.15384615em`.
|
2022-05-12 20:17:03 +00:00
|
|
|
box-sizing: border-box;
|
2020-04-23 21:41:05 +00:00
|
|
|
border: @border-base;
|
|
|
|
border-radius: @border-radius-base;
|
2019-04-18 19:54:17 +00:00
|
|
|
// `padding-right` equals to `#searchbutton` width below.
|
2020-10-30 19:39:13 +00:00
|
|
|
padding: 5px @width-search-button 5px 0.4em;
|
2021-03-24 21:03:25 +00:00
|
|
|
box-shadow: @box-shadow-base;
|
2020-10-30 19:39:13 +00:00
|
|
|
// Match WVUI.
|
|
|
|
font-family: inherit;
|
2019-09-18 22:26:38 +00:00
|
|
|
font-size: @font-size-search-input;
|
2019-04-18 19:54:17 +00:00
|
|
|
direction: ltr;
|
2022-05-13 19:41:15 +00:00
|
|
|
transition-property: border-color, box-shadow;
|
|
|
|
transition-duration: 250ms;
|
2020-03-10 18:06:19 +00:00
|
|
|
|
|
|
|
// Undo the proprietary styles, we provide our own.
|
|
|
|
// Support: Safari/iOS `none` needed, Chrome would accept `textfield` as well. See T247299.
|
2022-05-16 13:04:28 +00:00
|
|
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
2020-03-10 18:06:19 +00:00
|
|
|
-webkit-appearance: none;
|
|
|
|
// Support: Firefox.
|
2022-05-16 13:04:28 +00:00
|
|
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
2020-03-10 18:06:19 +00:00
|
|
|
-moz-appearance: textfield;
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2021-09-28 16:27:10 +00:00
|
|
|
.vector-search-box-inner:hover & {
|
2019-04-18 19:54:17 +00:00
|
|
|
border-color: @colorGray7;
|
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2019-04-18 19:54:17 +00:00
|
|
|
&:focus,
|
2021-09-28 16:27:10 +00:00
|
|
|
.vector-search-box-inner:hover &:focus {
|
2019-04-18 19:54:17 +00:00
|
|
|
outline: 0;
|
2021-03-24 21:03:25 +00:00
|
|
|
border-color: @border-color-base--focus;
|
|
|
|
box-shadow: @box-shadow-base--focus;
|
2019-04-18 19:54:17 +00:00
|
|
|
}
|
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 {
|
2020-02-19 06:30:19 +00:00
|
|
|
display: none;
|
2014-08-07 11:38:34 +00:00
|
|
|
}
|
2019-04-18 19:54:17 +00:00
|
|
|
}
|
2014-08-07 11:38:34 +00:00
|
|
|
|
2020-10-30 19:39:13 +00:00
|
|
|
// The search buttons. Fallback and search button are displayed in the same position,
|
|
|
|
// and if both are present the fulltext search one obscures the 'Go' one.
|
2021-09-16 18:00:05 +00:00
|
|
|
.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;
|
2020-10-30 19:39:13 +00:00
|
|
|
min-width: @min-width-search-button;
|
2019-09-18 22:26:38 +00:00
|
|
|
width: @width-search-button;
|
2019-04-18 19:54:17 +00:00
|
|
|
border: 0;
|
|
|
|
padding: 0;
|
|
|
|
cursor: pointer;
|
2020-10-30 19:39:13 +00:00
|
|
|
// Equal `font-size` to search input for `padding` calculation.
|
2019-09-18 22:26:38 +00:00
|
|
|
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;
|
2020-04-02 16:50:46 +00:00
|
|
|
z-index: @z-index-search-button;
|
2019-04-18 19:54:17 +00:00
|
|
|
}
|
2016-09-18 14:09:13 +00:00
|
|
|
|
2021-09-16 18:00:05 +00:00
|
|
|
.searchButton[ name='go' ] {
|
2020-10-30 19:39:13 +00:00
|
|
|
background: no-repeat center/unit( 16 / @font-size-browser / @font-size-search-input, em ) url( images/search.svg );
|
2020-11-26 12:19:11 +00:00
|
|
|
opacity: 0.67;
|
2019-04-18 19:54:17 +00:00
|
|
|
}
|
2021-06-02 22:57:43 +00:00
|
|
|
|
|
|
|
.search-toggle {
|
|
|
|
// At lower resolutions the search input is hidden and a toggle is shown
|
|
|
|
display: block;
|
|
|
|
float: right;
|
|
|
|
|
2021-07-15 19:29:18 +00:00
|
|
|
@media ( min-width: @width-breakpoint-desktop ) {
|
2021-06-02 22:57:43 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-search-box-collapses > div {
|
|
|
|
display: none;
|
|
|
|
|
2021-07-15 19:29:18 +00:00
|
|
|
@media ( min-width: @width-breakpoint-desktop ) {
|
2021-06-02 22:57:43 +00:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|