mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-17 20:52:14 +00:00
edd2f4ff85
Separating most LESS files into 2 ResourceLoader modules and a common folder: - skins.vector.styles - skins.vector.styles.legacy - common This changes aims to clearly separate the old (“legacy”), the new (“modern”) and the common styles which were previously all placed under `skins.vector.styles/`. Inside each directory are separate folders for `layouts` and `components`. The entry files, `skin.less` and `skin-legacy.less` are moved into the specific folders and a third, `common.less` entry file is created that contains the common imports for both old and new Vector. Aliases have been added to the Storybook Webpack config to avoid adding the story file changes to this patch. Images coming from CSS `url()`'s have also been temporarily disabled in Storybook until Storybook can be upgraded to use Webpack 5, and use array values for aliases, in a follow-up patch. This patch also slightly changes a footer layout specific rule so that existing `padding` remains unchanged in rendering due to new common and component structure. Bug: T264309 Change-Id: I1cd2681a2b61edb7be56c38f9bb3994827d7e322
83 lines
2.1 KiB
Plaintext
83 lines
2.1 KiB
Plaintext
/**
|
|
* Loading indicator for search widget
|
|
*
|
|
* By adding a class on the parent search form
|
|
* <div id="simpleSearch" class="search-form__loader"></div>
|
|
* A pseudo element is added via ':after' that mimics the appearance
|
|
* of the search suggestion and contains the text
|
|
* "Loading search suggestions" (message key: vector-search-loader).
|
|
*
|
|
* After appearing for more than a second, a progress-bar animation appears
|
|
* above the loading indicator.
|
|
*
|
|
**/
|
|
|
|
@import '../../common/variables.less';
|
|
|
|
#simpleSearch.search-form__loader:after {
|
|
// Set the i18n message.
|
|
content: attr( data-loading-msg );
|
|
//
|
|
// Position loader below the input.
|
|
display: block;
|
|
position: absolute;
|
|
top: 100%;
|
|
width: 100%;
|
|
//
|
|
// Ensure the 100% width doesn't extend beyond the input.
|
|
box-sizing: border-box;
|
|
//
|
|
// Align loader style with input.
|
|
border: @border-base;
|
|
border-top-width: 0; // Hide the top border so it doesn't interfere with focus state.
|
|
border-radius: 0 0 @border-radius-base @border-radius-base;
|
|
color: @color-base--disabled;
|
|
font-size: @font-size-notification;
|
|
padding: 0.4em;
|
|
box-shadow: @box-shadow-base;
|
|
//
|
|
// Hide text in case it extends beyond the input.
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
//
|
|
// Prevent Vector tabs from overlapping T254695#6461044
|
|
z-index: @z-index-search-loader;
|
|
//
|
|
// Add a progress-bar to the loading indicator,
|
|
// but only show it animating after 1 second of loading.
|
|
background: /*image*/ linear-gradient( 90deg, @colorProgressive 0%, @colorProgressive 100% )
|
|
/* position / size*/ -10% 0 ~'/' 0 2px
|
|
/* repeat */ no-repeat,/*second bg, just color*/#fff;
|
|
//
|
|
// Animates the progress-bar.
|
|
animation: /* name */ search-loader-progress-bar
|
|
/* duration */ 1200ms
|
|
/* timing function */ linear
|
|
/* delay */ 1000ms
|
|
/* iteration count */ infinite
|
|
/* fill direction */ alternate;
|
|
}
|
|
|
|
@keyframes search-loader-progress-bar {
|
|
0% {
|
|
background-size: 0 2px;
|
|
background-position: -10% 0;
|
|
}
|
|
|
|
30% {
|
|
background-size: 30% 2px;
|
|
background-position: -10% 0;
|
|
}
|
|
|
|
70% {
|
|
background-size: 30% 2px;
|
|
background-position: 110% 0;
|
|
}
|
|
|
|
100% {
|
|
background-size: 0 2px;
|
|
background-position: 110% 0;
|
|
}
|
|
}
|