Tweak page width based on the new vector theme.
Reduce article width ≦ 16cm
Authorwintus
LicenseGNU GPLv3
Categorywikipedia
Created
Updated
Size3.2 kB
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Tweak page width based on the new vector theme.
Reduce article width ≦ 16cm
This user style assumes that the new skin is enabled:
https://en.wikipedia.org/wiki/Special:Preferences#mw-input-wpVectorSkinVersion
Details:
https://www.mediawiki.org/wiki/Reading/Web/Desktop_Improvements
If you prefer not to log in, use "legacy support": https://userstyles.world/style/2978/wikipedia-org-old-vector
/* ==UserStyle==
@name wikipedia.org | new vector
@version 20220819.23.39
@namespace userstyles.world/user/wintus
@description tweak page width based on the new vector theme.
@author wintus
@license No License
==/UserStyle== */
@-moz-document domain("wikipedia.org"), domain("wikibooks.org"), domain("wiktionary.org"), domain("mediawiki.org"), domain("wikimedia.org"), domain("wikiquote.org") {
/* vector 2022 */
:root
{
--main-width: 24cm;
--read-width: 16cm;
--side-width: 0cm;
--max-width: 36cm;
--base-color: /*藍白*/
hsl(185 43% 95%);
}
body > .mw-page-container,
body > .mw-page-container > .mw-page-container-inner,
body > .mw-page-container > .mw-page-container-inner > header.mw-header,
body > .mw-page-container > .mw-page-container-inner > .mw-workspace-container,
#mw-navigation
{
max-inline-size: var(--max-width);
background-color: var(--base-color);
}
.mw-content-container,
#siteNotice,
#content > nav > .mw-article-toolbar-container
{
max-inline-size: var(--main-width);
margin-inline-start: var(--side-width);
}
main,
#content
{
margin-inline-start: 0;
}
#bodyContent
{
font-size: 1rem;
}
#p-search,
#mw-content-text > .mw-parser-output,
#mw-content-text > .mw-parser-output > .nomobile,
#mw-content-text > .mw-parser-output > #mf-section-0
{
max-inline-size: var(--main-width);
margin-inline: unset;
}
#p-search
{
margin-inline-start: 1cm;
}
#mw-content-text > .mw-parser-output > *,
#mw-content-text > .mw-parser-output > #mf-section-0 > *,
#mw-content-text > .mw-parser-output > .nomobile > *
{
max-inline-size: var(--read-width);
}
/* link: back to the old */
#mw-panel > .mw-sidebar-action > a.mw-sidebar-action-link:first-child,
#mw-panel > .mw-sidebar-action > .mw-sidebar-action-item > .mw-sidebar-action-content > a
{
visibility: hidden;
display: none;
}
#mw-content-text > .mw-parser-output > table.wikitable,
#mw-content-text > .mw-parser-output > .documentation-container,
#mw-content-text > .mw-parser-output table.clade
{
inline-size: clamp(400px, 20cm, 90vw);
inline-size: fit-content;
max-inline-size: max-content;
}
blockquote
{
overflow: unset;
inline-size: fit-content;
}
/* pre { max-inline-size: clamp(10em, 24cm, 90vw); } */
/* revision diff page */
#mw-content-text table.diff
{
inline-size: fit-content;
max-inline-size: max-content;
}
/* fix template */
#coordinates
{
clear: both;
}
/* script pages */
#mw-content-text > .mw-parser-output > .mw-highlight.mw-highlight-lang-lua.mw-content-ltr.mw-highlight-lines > pre
{
min-inline-size: 40em;
}
/* language selector */
body > .grid.uls-menu.uls-wide,
#search,
body > .grid.uls-menu.uls-wide > .row.uls-search,
body > .grid.uls-menu.uls-wide > .row.uls-language-list.uls-lcd,
#uls-settings-block
{
min-width: unset;
}
body > .grid.uls-menu.uls-wide > .row.uls-language-list.uls-lcd ul.three.columns
{
width: unset;
float: unset;
padding: unset;
}
#search
{
min-inline-size: 7cm;
}
/* TOC */
#mw-panel-toc,
.vector-toc-enabled .sidebar-toc,
body > .mw-page-container > .mw-page-container-inner > .mw-workspace-container > .mw-table-of-contents-container.mw-sticky-header-element > nav
{
margin-block-start: 1cm;
}
}