MediaWiki:Common.css

提供:WikiNebula
2026年10月19日 (月) 17:49時点におけるHiratatomotaka (トーク | 投稿記録)による版

注意: 保存後、変更を確認するにはブラウザーのキャッシュを消去する必要がある場合があります。

  • 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;
}

@media screen and (min-width: 1200px) {
    .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 {
        box-sizing: border-box;
        width: var(--wn-logo-size);
        margin: 0 0 16px;
        margin-left: calc(
            -14px + (var(--wn-menu-width) - var(--wn-logo-size)) / 2
        );
        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 {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .wn-official-links .mw-list-item a {
        display: block;
        padding: 6px 0;
        font-size: 14px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

}

@media print {
    .wn-share,
    .wn-official-links {
        display: none !important;
    }
}