diff --git a/bundlesize.config.json b/bundlesize.config.json index ad974a0a..28b59502 100644 --- a/bundlesize.config.json +++ b/bundlesize.config.json @@ -1,7 +1,7 @@ [ { "resourceModule": "skins.vector.styles.legacy", - "maxSize": "9 kB" + "maxSize": "7.7 kB" }, { "resourceModule": "skins.vector.styles", diff --git a/resources/skins.vector.styles.legacy/layouts/print.less b/resources/skins.vector.styles.legacy/layouts/print.less new file mode 100644 index 00000000..dba1870c --- /dev/null +++ b/resources/skins.vector.styles.legacy/layouts/print.less @@ -0,0 +1,37 @@ +/** + * Print styles previously provided by the deprecated `legacy` feature (T287410) + * Copied from mediawiki.skinning/commonPrint.less in Mediawiki 1.36 core + */ + +/** + * Hide all the elements irrelevant for printing + * Skins however can and should override. + */ +/* General hide-in-print class, please only use sparely */ +.noprint, +/* Various content classes, in alphabetical order */ +.mw-cite-backlink, +.mw-redirectedfrom, +.patrollink, +/* Various content ids, in alphabetical order */ +#column-one, +#footer-places, +#mw-navigation, +/* Deprecated, changed in core */ +#f-poweredbyico, +#f-copyrightico, +li#about, +li#disclaimer, +li#mobileview, +li#privacy { + display: none; +} + +#footer { + background: #fff; + color: #000; + margin-top: 1em; + border-top: 1pt solid #aaa; + padding-top: 5px; + direction: ltr; +} diff --git a/resources/skins.vector.styles.legacy/layouts/screen.less b/resources/skins.vector.styles.legacy/layouts/screen.less index a1786949..d8ef3052 100644 --- a/resources/skins.vector.styles.legacy/layouts/screen.less +++ b/resources/skins.vector.styles.legacy/layouts/screen.less @@ -183,3 +183,18 @@ body { right: 1em; } } + +// Directionality styles previously provided by the deprecated `legacy` feature (T287410) +// for HTML elements which do not carry dir HTML attributes. +// These have been copied across to legacy Vector to minimize disruption caused by T287701. +// If you are reading this comment in 2022, please consider checking usage in wikitext and +// removing them both. +.mw-content-ltr { + /* @noflip */ + direction: ltr; +} + +.mw-content-rtl { + /* @noflip */ + direction: rtl; +} diff --git a/resources/skins.vector.styles.legacy/skin-legacy.less b/resources/skins.vector.styles.legacy/skin-legacy.less index 7327b20f..50ba8484 100644 --- a/resources/skins.vector.styles.legacy/skin-legacy.less +++ b/resources/skins.vector.styles.legacy/skin-legacy.less @@ -12,3 +12,7 @@ @import './components/Sidebar.less'; @import './components/UserLinks.less'; } + +@media print { + @import './layouts/print.less'; +} diff --git a/skin.json b/skin.json index bbf709b9..0465b06b 100644 --- a/skin.json +++ b/skin.json @@ -107,10 +107,17 @@ "features": { "normalize": true, "elements": true, - "content": true, - "interface": true, "logo": true, - "legacy": true + "content": true, + "content-links": true, + "content-thumbnails": true, + "interface": true, + "interface-message-box": true, + "interface-category": true, + "content-tables": true, + "i18n-ordered-lists": true, + "i18n-all-lists-margins": true, + "i18n-headings": true }, "targets": [ "desktop",