「MediaWiki:Vector-2022.css」の版間の差分
表示
Hiratatomotaka (トーク | 投稿記録) 編集の要約なし |
Hiratatomotaka (トーク | 投稿記録) 編集の要約なし |
||
| (同じ利用者による、間の1版が非表示) | |||
| 130行目: | 130行目: | ||
); | ); | ||
} | } | ||
} | |||
/* WikiNebula: Vector 1.46 desktop layout compatibility. | |||
* Append to MediaWiki:Vector-2022.css; retain existing rules above. | |||
* Keeps the large logo above the left column. Does not affect mobile rules. | |||
*/ | |||
@media screen and (min-width: 1200px) { | |||
.skin-vector-2022 .mw-page-container .mw-page-container-inner { | |||
grid-template-columns: var(--wn-menu-width) minmax(0, 1fr); | |||
} | |||
.skin-vector-2022 .vector-header-container > .mw-header { | |||
display: grid; | |||
grid-template-columns: var(--wn-menu-width) minmax(0, 1fr); | |||
grid-template-areas: "headerStart headerEnd"; | |||
column-gap: 64px; | |||
max-width: none; | |||
padding-left: 0; | |||
padding-right: 0; | |||
} | |||
.skin-vector-2022 .mw-header .vector-header-start { | |||
grid-area: headerStart; | |||
position: relative; | |||
display: block; | |||
height: 50px; | |||
min-width: 0; | |||
} | |||
.skin-vector-2022 .mw-header .vector-header-end { | |||
grid-area: headerEnd; | |||
min-width: 0; | |||
} | |||
/* Keep the unpinned main-menu button accessible beside the search area. */ | |||
.skin-vector-2022 .mw-header .vector-header-start .vector-main-menu-landmark { | |||
position: absolute; | |||
left: calc(var(--wn-menu-width) + 16px); | |||
top: 15px; | |||
} | |||
.skin-vector-2022 .mw-header .mw-logo, | |||
.skin-vector-2022 .wn-share--sidebar, | |||
.skin-vector-2022 .wn-official-links { | |||
margin-left: calc((var(--wn-menu-width) - var(--wn-logo-size)) / 2); | |||
} | |||
} | |||
/* Append to MediaWiki:Vector-2022.css AFTER the desktop compatibility patch. */ | |||
@media screen and (max-width: 1199px) { | |||
.skin-vector-2022 .vector-header-container:not(.vector-sticky-header-container) { | |||
flex-wrap: wrap; | |||
} | |||
.skin-vector-2022 .vector-header-container > .mw-header { | |||
flex: 0 0 100%; | |||
width: 100%; | |||
min-width: 0; | |||
max-width: 100%; | |||
} | |||
.skin-vector-2022 .wn-official-mobile-host { | |||
flex: 0 0 100%; | |||
order: 2; | |||
box-sizing: border-box; | |||
width: 100%; | |||
min-width: 0; | |||
max-width: 100%; | |||
padding: 0 24px 12px; | |||
} | |||
.skin-vector-2022 .wn-official-mobile-host .wn-official-links { | |||
box-sizing: border-box; | |||
width: 100%; | |||
min-width: 0; | |||
max-width: 100%; | |||
margin: 0; | |||
} | |||
.skin-vector-2022 .wn-official-mobile-host .vector-menu-content-list { | |||
display: grid; | |||
grid-template-columns: minmax(0, 1fr); | |||
gap: 8px; | |||
} | |||
.skin-vector-2022 .wn-official-mobile-host .mw-list-item { | |||
min-width: 0; | |||
} | |||
.skin-vector-2022 .wn-official-mobile-host .mw-list-item a { | |||
box-sizing: border-box; | |||
width: 100%; | |||
min-height: 44px; | |||
height: auto; | |||
padding: 10px 12px; | |||
font-size: 14px; | |||
line-height: 1.5; | |||
white-space: normal; | |||
word-break: normal; | |||
overflow-wrap: anywhere; | |||
} | |||
} | } | ||
2026年10月23日 (金) 11:29時点における最新版
/* ===== 調整項目 ===== */
.skin-vector-2022 {
/* 広い画面での幅:0.8=80%、1=100%、0.65=65% */
--wn-logo-scale: 1;
/* スマホのロゴサイズ */
--wn-logo-mobile-size: 60px;
/* 中くらいの画面のロゴサイズ */
--wn-logo-tablet-size: 135px;
/* 画面端の内余白:メニューのはみ出しを防ぐ */
--wn-page-padding: 24px;
}
/* ===== 共通:ロゴと説明文 ===== */
.skin-vector-2022 .mw-header .mw-logo {
min-width: 0;
flex-direction: row;
align-items: center;
gap: 10px;
}
.skin-vector-2022 .mw-logo-icon {
display: block;
width: var(--wn-logo-tablet-size);
height: var(--wn-logo-tablet-size);
flex-shrink: 0;
object-fit: contain;
margin-right: 0;
}
/* 標準のサイト名と説明画像は、読み上げ用に残して隠す */
.skin-vector-2022 .mw-logo-container {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
/* 小さい画面では、説明文をロゴの右に表示 */
.skin-vector-2022 .mw-logo::after {
content: "女尊男卑の百科事典";
display: block;
flex-shrink: 0;
max-width: 9em;
color: #202122;
font-size: 14px;
line-height: 20px;
}
/* ===== スマホ ===== */
@media screen and (max-width: 767px) {
.skin-vector-2022 .mw-logo-icon {
width: var(--wn-logo-mobile-size);
height: var(--wn-logo-mobile-size);
}
}
/* ===== 広い画面 ===== */
@media screen and (min-width: 1200px) {
.skin-vector-2022 {
--wn-menu-width: calc(15.5em + 14px);
--wn-logo-size: calc(
var(--wn-menu-width) * var(--wn-logo-scale)
);
}
/* ページとヘッダーを、画面の横幅いっぱいに広げる */
.skin-vector-2022 .mw-page-container,
.skin-vector-2022 .vector-header-container {
width: 100%;
max-width: none;
box-sizing: border-box;
padding-left: var(--wn-page-padding);
padding-right: var(--wn-page-padding);
}
/* 左右のメニューを保ち、本文の幅上限も解除 */
.skin-vector-2022 .mw-content-container {
min-width: 0;
max-width: none;
}
.skin-vector-2022 .mw-body {
grid-template-columns: minmax(0, 1fr) min-content;
}
/* ロゴを左メニューの中央に配置。
ヘッダーの高さは50pxに保ち、本文を下げない */
.skin-vector-2022 .mw-header .mw-logo {
width: var(--wn-logo-size);
height: 50px;
flex-shrink: 0;
flex-direction: column;
gap: 8px;
margin-left: calc(
-14px + (var(--wn-menu-width) - var(--wn-logo-size)) / 2
);
}
.skin-vector-2022 .mw-logo-icon {
width: var(--wn-logo-size);
height: var(--wn-logo-size);
}
/* 全角9文字の文字サイズを、ロゴ幅から計算 */
.skin-vector-2022 .mw-logo::after {
width: 100%;
max-width: none;
font-size: calc(var(--wn-logo-size) / 9);
line-height: 1.5;
letter-spacing: 0;
font-kerning: none;
font-variant-east-asian: full-width;
text-align: center;
white-space: nowrap;
}
/* 説明文の高さ=ロゴ幅÷9×1.5=ロゴ幅÷6 */
.skin-vector-2022 .vector-main-menu-container {
padding-top: max(
0px,
calc(
var(--wn-logo-size) - 50px
+ 8px + var(--wn-logo-size) / 6
)
);
}
}
/* WikiNebula: Vector 1.46 desktop layout compatibility.
* Append to MediaWiki:Vector-2022.css; retain existing rules above.
* Keeps the large logo above the left column. Does not affect mobile rules.
*/
@media screen and (min-width: 1200px) {
.skin-vector-2022 .mw-page-container .mw-page-container-inner {
grid-template-columns: var(--wn-menu-width) minmax(0, 1fr);
}
.skin-vector-2022 .vector-header-container > .mw-header {
display: grid;
grid-template-columns: var(--wn-menu-width) minmax(0, 1fr);
grid-template-areas: "headerStart headerEnd";
column-gap: 64px;
max-width: none;
padding-left: 0;
padding-right: 0;
}
.skin-vector-2022 .mw-header .vector-header-start {
grid-area: headerStart;
position: relative;
display: block;
height: 50px;
min-width: 0;
}
.skin-vector-2022 .mw-header .vector-header-end {
grid-area: headerEnd;
min-width: 0;
}
/* Keep the unpinned main-menu button accessible beside the search area. */
.skin-vector-2022 .mw-header .vector-header-start .vector-main-menu-landmark {
position: absolute;
left: calc(var(--wn-menu-width) + 16px);
top: 15px;
}
.skin-vector-2022 .mw-header .mw-logo,
.skin-vector-2022 .wn-share--sidebar,
.skin-vector-2022 .wn-official-links {
margin-left: calc((var(--wn-menu-width) - var(--wn-logo-size)) / 2);
}
}
/* Append to MediaWiki:Vector-2022.css AFTER the desktop compatibility patch. */
@media screen and (max-width: 1199px) {
.skin-vector-2022 .vector-header-container:not(.vector-sticky-header-container) {
flex-wrap: wrap;
}
.skin-vector-2022 .vector-header-container > .mw-header {
flex: 0 0 100%;
width: 100%;
min-width: 0;
max-width: 100%;
}
.skin-vector-2022 .wn-official-mobile-host {
flex: 0 0 100%;
order: 2;
box-sizing: border-box;
width: 100%;
min-width: 0;
max-width: 100%;
padding: 0 24px 12px;
}
.skin-vector-2022 .wn-official-mobile-host .wn-official-links {
box-sizing: border-box;
width: 100%;
min-width: 0;
max-width: 100%;
margin: 0;
}
.skin-vector-2022 .wn-official-mobile-host .vector-menu-content-list {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 8px;
}
.skin-vector-2022 .wn-official-mobile-host .mw-list-item {
min-width: 0;
}
.skin-vector-2022 .wn-official-mobile-host .mw-list-item a {
box-sizing: border-box;
width: 100%;
min-height: 44px;
height: auto;
padding: 10px 12px;
font-size: 14px;
line-height: 1.5;
white-space: normal;
word-break: normal;
overflow-wrap: anywhere;
}
}