mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Prevent skinStyles from applying to the Vector 2022 skin.
With related changes to the DOM in the new Vector skin, most skin styles are no longer necessary for Vector 2022. This patch also fixes an issue with the font-size of the toolbar when $wgVectorTitleAboveTabs = true. Bug: T310197 Depends-On: Idae6755c90eacaab1a9daa88c6e28850d427810c Change-Id: I6776f08b24f83cf4daeef70bfdeb73dfeafc785a
This commit is contained in:
parent
61a7269261
commit
763f953423
|
@ -376,7 +376,7 @@
|
|||
],
|
||||
"vector-2022": [
|
||||
"modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-wikimediatheme.css",
|
||||
"modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-vector.less"
|
||||
"modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-vector-2022.less"
|
||||
],
|
||||
"monobook": [
|
||||
"modules/ve-mw/preinit/styles/ve.init.mw.DesktopArticleTarget.init-apextheme.css"
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*!
|
||||
* VisualEditor MediaWiki DesktopArticleTarget Vector-2022 skin init styles.
|
||||
*
|
||||
* @copyright 2011-2020 VisualEditor Team and others; see AUTHORS.txt
|
||||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
// Local copy of Vector variables.
|
||||
@padding-top-content: 0.5em;
|
||||
@padding-horizontal-content: 0.5em;
|
||||
// End local copy of Vector variables.
|
||||
|
||||
@padding-top-toolbar: -@padding-top-content/0.875;
|
||||
@padding-horizontal-toolbar: -@padding-horizontal-content/0.875;
|
||||
|
||||
.ve-init-mw-desktopArticleTarget-toolbar,
|
||||
.ve-init-mw-desktopArticleTarget-toolbarPlaceholder {
|
||||
|
||||
// New Vector with $wgVectorTitleAboveTabs = false
|
||||
/* stylelint-disable-next-line selector-max-id */
|
||||
#content.ve-init-mw-desktopArticleTarget-targetContainer & {
|
||||
font-size: 0.875em;
|
||||
margin: @padding-top-toolbar @padding-horizontal-toolbar -@padding-top-toolbar @padding-horizontal-toolbar;
|
||||
}
|
||||
}
|
|
@ -5,38 +5,16 @@
|
|||
* @license The MIT License (MIT); see LICENSE.txt
|
||||
*/
|
||||
|
||||
// Local copy of Vector variables.
|
||||
// Can be removed after I87c5502530cd0039b090fbd3cfa7615d6cd64b36 is merged.
|
||||
@padding-top-content: 0.5em;
|
||||
@padding-horizontal-content: 0.5em;
|
||||
// End local copy of Vector variables.
|
||||
|
||||
@padding-top-toolbar: -@padding-top-content/0.875;
|
||||
@padding-horizontal-toolbar: -@padding-horizontal-content/0.875;
|
||||
|
||||
.ve-init-mw-desktopArticleTarget-toolbar,
|
||||
.ve-init-mw-desktopArticleTarget-toolbarPlaceholder {
|
||||
font-size: 0.875em;
|
||||
/* 1/0.875 */
|
||||
margin: -1.14em -1.14em 1.14em -1.14em;
|
||||
|
||||
// New Vector with $wgVectorTitleAboveTabs = false
|
||||
margin: @padding-top-toolbar @padding-horizontal-toolbar -@padding-top-toolbar @padding-horizontal-toolbar;
|
||||
|
||||
// New Vector with $wgVectorTitleAboveTabs = true
|
||||
/* stylelint-disable-next-line selector-class-pattern */
|
||||
.vector-article-toolbar ~ .vector-body & {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
// Legacy Vector
|
||||
.skin-vector-legacy & {
|
||||
/* 1/0.875 */
|
||||
margin: -1.14em -1.14em 1.14em -1.14em;
|
||||
|
||||
/* High-definition-specific styles (because Vector adds 1em to the leftNav if width is 982px+ */
|
||||
@media screen and ( min-width: 982px ) {
|
||||
/* 1.25/0.875, 1.5/0.875 */
|
||||
margin: -1.43em -1.71em 1.43em -1.71em;
|
||||
}
|
||||
/* High-definition-specific styles (because Vector adds 1em to the leftNav if width is 982px+ */
|
||||
@media screen and ( min-width: 982px ) {
|
||||
/* 1.25/0.875, 1.5/0.875 */
|
||||
margin: -1.43em -1.71em 1.43em -1.71em;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue