MediaWiki:Common.css
注意: 保存後、変更を確認するにはブラウザーのキャッシュを消去する必要がある場合があります。
- Firefox / Safari: Shift を押しながら 再読み込み をクリックするか、Ctrl-F5 または Ctrl-R を押してください (Mac では ⌘-R)
- Google Chrome: Ctrl-Shift-R を押してください (Mac では ⌘-Shift-R)
- Internet Explorer / Microsoft Edge: Ctrl を押しながら 最新の情報に更新 をクリックするか、Ctrl-F5 を押してください
- Opera: Ctrl-F5を押してください
/* ここに記述したCSSはすべての外装に反映されます */
/* ===== 本文画像の幅調整(既存設定) ===== */
.full-width {
display: block;
width: 100%;
}
.full-width > a {
display: block;
width: 100%;
}
.full-width img {
display: block;
width: 100%;
height: auto;
}
/* ===== SNSシェアボタン:記事の上下 ===== */
.wn-share {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 12px 0 20px;
}
.wn-share--bottom {
margin-top: 24px;
padding-top: 16px;
border-top: 1px solid #c8ccd1;
}
.wn-share .wn-share__button {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
min-height: 44px;
padding: 8px 14px;
border-radius: 6px;
background: #202122;
color: #fff;
font-size: 14px;
font-weight: bold;
line-height: 1.4;
text-decoration: none;
}
.wn-share .wn-share__button:visited {
color: #fff;
}
.wn-share .wn-share__button[data-service="facebook"] {
background: #0866ff;
}
.wn-share .wn-share__button[data-service="line"] {
background: #087c3e;
}
.wn-share .wn-share__button:hover {
filter: brightness(0.9);
}
.wn-share a:focus-visible {
outline: 3px solid #36c;
outline-offset: 3px;
}
/* 左側のボタンは広い画面だけに表示 */
.wn-share--sidebar {
display: none;
}
/* ===== Sidebarから取り出した公式案内 ===== */
.skin-vector-2022 .wn-official-links {
box-sizing: border-box;
padding: 10px 12px;
border: 1px solid #c8ccd1;
border-radius: 6px;
background: #f8f9fa;
}
.wn-official-links .vector-menu-heading {
display: block;
margin: 0 0 6px;
padding: 0;
font-size: 14px;
font-weight: bold;
line-height: 1.5;
}
.wn-official-links .vector-menu-content-list {
display: grid;
gap: 8px;
margin: 0;
padding: 0;
list-style: none;
}
.wn-official-links .mw-list-item {
min-width: 0;
}
.wn-official-links .mw-list-item a {
display: block;
padding: 6px 0;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: 100%;
min-height: 44px;
padding: 8px 10px;
border-radius: 6px;
background: #202122;
color: #fff;
font-size: 14px;
font-weight: bold;
line-height: 1.5;
line-height: 1.4;
text-align: center;
text-decoration: none;
overflow-wrap: anywhere;
}
.wn-official-links .mw-list-item a:visited {
color: #fff;
}
.wn-official-links .mw-list-item a[href^="https://www.facebook.com/"],
.wn-official-links .mw-list-item a[href^="https://facebook.com/"] {
background: #0866ff;
}
.wn-official-links .mw-list-item a[href^="https://line.me/"] {
background: #087c3e;
}
.wn-official-links .mw-list-item a:hover {
filter: brightness(0.9);
}
.wn-official-links .mw-list-item a:focus-visible {
outline: 3px solid #36c;
outline-offset: 3px;
}
/* 小さい画面では、メニューを開かずに公式リンクを表示 */
@media screen and (max-width: 1199px) {
.skin-vector-2022 .vector-header-container {
width: 100%;
min-width: 0;
}
.wn-official-mobile-host {
padding-bottom: 12px;
}
.wn-official-mobile-host .wn-official-links {
width: 100%;
margin: 0;
padding: 8px;
}
.wn-official-mobile-host .vector-menu-heading {
display: none;
}
.wn-official-mobile-host .vector-menu-content-list {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px;
}
.wn-official-mobile-host .mw-list-item {
min-width: 0;
}
.wn-official-mobile-host .mw-list-item a {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
min-height: 44px;
height: 100%;
padding: 6px 4px;
border-radius: 4px;
background: #fff;
font-size: 12px;
text-align: center;
}
}
@media screen and (min-width: 1200px) {
.wn-official-mobile-host {
display: none;
}
.skin-vector-2022 .wn-share--sidebar {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px;
width: var(--wn-logo-size);
margin: 0 0 16px;
margin-left: calc(
-14px + (var(--wn-menu-width) - var(--wn-logo-size)) / 2
);
}
.wn-share--sidebar .wn-share__button {
min-width: 0;
padding: 6px 2px;
font-size: 12px;
overflow-wrap: anywhere;
}
/* Sidebarの公式案内を、メインメニューとは別の枠にする */
.skin-vector-2022 .wn-official-links {
width: var(--wn-logo-size);
margin: 0 0 16px;
margin-left: calc(
-14px + (var(--wn-menu-width) - var(--wn-logo-size)) / 2
);
}
}
@media print {
.wn-share,
.wn-official-links,
.wn-official-mobile-host {
display: none !important;
}
}