Remove unnecessary imports in component stylesheets, make variable and mixin imports consistent

Bug: T345766
Change-Id: I2ae1d1668849a04520b73ac04fe16e1ff7f22fa6
This commit is contained in:
bwang 2023-10-02 12:52:33 -05:00 committed by Jdlrobson
parent a04ff40809
commit 5e15edb9a2
35 changed files with 5 additions and 87 deletions

View file

@ -4,7 +4,7 @@
*/
@import './variables.less';
@import 'mediawiki.mixins.less';
@import './mixins.less';
@media screen {
// Common styles

View file

@ -1,5 +1,3 @@
@import '../variables.less';
/* Footer */
.mw-footer {
direction: ltr;

View file

@ -1,5 +1,3 @@
@import '../variables.less';
.mw-indicators {
font-size: @font-size-base;
line-height: @line-height-base;

View file

@ -1,5 +1,3 @@
@import '../variables.less';
/* Logo */
#p-logo {
width: 10em;

View file

@ -1,5 +1,3 @@
@import '../variables.less';
/** element that wraps a notice that comes from wiki page */
#localNotice {
margin-bottom: 0.9em;

View file

@ -2,7 +2,7 @@
* Less mixins shared between both legacy and Vector 2022.
*/
@import '../common/variables.less';
@import 'mediawiki.mixins.less';
.mixin-vector-menu-heading() {
align-self: center;

View file

@ -1,6 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
// Navigation: Main
@font-size-nav-main: inherit;
@font-size-nav-main-heading: unit( 12 / @font-size-browser, em ); // Equals `0.75em`.

View file

@ -1,7 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
@import '../../common/mixins.less';
// Flips the chevron so it points up when the dropdown is open.
.vector-menu-checkbox:checked + .vector-menu-heading::after {
transform: scaleY( -1 );

View file

@ -1,6 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
/**
* Styling for namespace tabs (page, discussion) and views (read, edit, view history, watch and other actions)
*/

View file

@ -1,5 +1,3 @@
@import 'mediawiki.mixins.less';
// Defined as `div`.
// Provide extra element for gadgets due to `form` already carrying an `id`.
.vector-search-box-inner {

View file

@ -1,5 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
@import 'mediawiki.mixins.rotation.less';
/* Watch/Unwatch Icon Styling */

View file

@ -1,5 +1,3 @@
@import '../../common/variables.less';
/* Personal Menu */
.vector-user-menu-legacy {
li {

View file

@ -2,6 +2,8 @@
* Vector legacy stylesheets
* See '../common/common.less' for common screen and print Vector stylesheets.
*/
@import '../common/variables.less';
@import '../common/mixins.less';
@media screen {
// Layouts

View file

@ -1,5 +1,3 @@
@import '../../common/variables.less';
.client-nojs .vector-settings {
display: none;
}

View file

@ -1,7 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
@import 'mediawiki.skin.variables.less';
.cdx-button:not( .cdx-button--icon-only ) .vector-icon {
// Add spacing between icon and text
margin-right: @spacing-35;

View file

@ -1,7 +1,3 @@
@import '../../common/variables.less';
@import '../../common/mixins.less';
@import 'mediawiki.mixins.less';
/**
* Dropdown container
*/

View file

@ -1,7 +1,3 @@
@import '../../common/variables.less';
@import '../../common/mixins.less';
@import 'mediawiki.mixins.less';
.mw-header {
// Vertical centering of header elements (IE>=11), requires Flexbox.
.flex-display();

View file

@ -1,6 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
.vector-icon {
.cdx-mixin-css-icon-background( );
.cdx-mixin-css-icon-size( );

View file

@ -1,8 +1,3 @@
// The use of mixins.buttons requires @font-size-base to be defined for this to work in Storybook
@import '../../common/variables.less';
@import '../../common/mixins.less';
@import 'mediawiki.mixins.less';
// Note vector-feature-language-in-header-enabled class is not used here as that class
// only applies to main page.
// This must be limited to vector-page-titlebar as the mw-portlet-lang class is shared with

View file

@ -1,6 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
.mw-logo {
.flex-display();
// If icon is not configured, ensure that the logo still takes up available

View file

@ -1,7 +1,3 @@
@import '../../common/variables.less';
@import '../../common/mixins.less';
@import 'mediawiki.mixins.less';
// Ensure there is only 1 main menu landmark at anytime
&.vector-feature-main-menu-pinned-enabled .vector-header-start .vector-main-menu-landmark,
&.vector-feature-main-menu-pinned-disabled .vector-main-menu-container .vector-main-menu-landmark {

View file

@ -1,6 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
/**
* Styling for namespace tabs (page, discussion) and views (read, edit, view history, watch and other actions)
*/

View file

@ -1,5 +1,3 @@
@import '../../common/variables.less';
.vector-page-titlebar {
position: relative;
display: flex;

View file

@ -1,6 +1,3 @@
@import '../../common/variables.less';
@import '../../common/mixins.less';
@border-base-ems: unit( @border-width-base / @font-size-browser / @font-size-base, em );
.vector-page-toolbar-container {

View file

@ -1,6 +1,3 @@
@import '../../common/variables.less';
@import '../../common/mixins.less';
// Ensure there is only 1 page tools landmark at anytime
&.vector-feature-page-tools-pinned-enabled .vector-page-toolbar-container .vector-page-tools-landmark,
&.vector-feature-page-tools-pinned-disabled .vector-column-end .vector-page-tools-landmark {

View file

@ -1,5 +1,3 @@
@import '../../common/variables.less';
.vector-pinned-container .vector-pinnable-element {
// Make the heading border line up with the edge of the text
// (Whereas in a dropdown, the border lines up with the edge of the dropdown container).

View file

@ -1,5 +1,3 @@
@import '../../common/variables.less';
// Search container
// We have to put those styles outside `.skin-vector-search-vue`,
// as we can't address no-JS modern and Vue enhanced otherwise.

View file

@ -1,7 +1,3 @@
@import '../../common/variables.less';
@import '../../common/mixins.less';
@import 'mediawiki.mixins.less';
@spacing-search-title-divider: 30px;
@font-size-sticky-header-links: unit( 14 / @font-size-browser, em ); // Equals `0.875em`.

View file

@ -1,5 +1,3 @@
@import '../../common/variables.less';
/**
* Checkbox hack used by collapsed TOC on narrow viewports for no JS users.
* Although it's display:none, the :checked state is still affected when clicking

View file

@ -1,7 +1,3 @@
@import '../../common/variables.less';
@import '../../common/mixins.less';
@import 'mediawiki.mixins.less';
@font-size-user-links: unit( 14 / @font-size-browser, em ); // Equals `0.875em`.
// Applies to links in the overflow menu that do not have the .cdx-button class.
@overflow-link-margin: 0 8px;

View file

@ -1,5 +1,3 @@
@import '../../common/variables.less';
@import 'mediawiki.mixins.less';
@import 'mediawiki.mixins.rotation.less';
/* Watch/Unwatch Icon Styling */

View file

@ -1,5 +1,3 @@
@import '../../common/mixins.less';
.vector-header-container {
.mixin-page-container();
}

View file

@ -2,8 +2,6 @@
* Vector modern stylesheets
* See '../common/common.less' for common screen and print Vector stylesheets.
*/
@import 'mediawiki.mixins.less';
@import '../common/variables.less';
@import '../common/mixins.less';

View file

@ -1,6 +1,7 @@
/**
* Less mixins.
*/
@import 'mediawiki.mixins.less';
.mixin-vector-page-container-sizing() {
// Set a min-width to make explicit we do not support anything below this threshold.

View file

@ -6,7 +6,6 @@
* the feature flag as been removed.
*/
@import 'mediawiki.mixins.less';
@import './variables.less';
@import './mixins.less';