「MediaWiki:Common.css」の版間の差分

提供:WikiNebula
編集の要約なし
編集の要約なし
 
(同じ利用者による、間の3版が非表示)
71行目: 71行目:
.wn-share--sidebar {
.wn-share--sidebar {
     display: none;
     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 a {
    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.4;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}
/* 公式リンクの配色は、スマホのレイアウト指定より優先する */
#p-公式案内 .mw-list-item a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}
#p-公式案内 .mw-list-item a[href^="https://x.com/"],
#p-公式案内 .mw-list-item a[href^="https://twitter.com/"] {
    background: #202122;
}
#p-公式案内 .mw-list-item a[href^="https://www.facebook.com/"],
#p-公式案内 .mw-list-item a[href^="https://facebook.com/"] {
    background: #0866ff;
}
#p-公式案内 .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 {
        height: 100%;
        padding: 6px 4px;
        font-size: 12px;
    }
}
}


@media screen and (min-width: 1200px) {
@media screen and (min-width: 1200px) {
    .wn-official-mobile-host {
        display: none;
    }
     .skin-vector-2022 .wn-share--sidebar {
     .skin-vector-2022 .wn-share--sidebar {
         display: grid;
         display: grid;
94行目: 211行目:
     /* Sidebarの公式案内を、メインメニューとは別の枠にする */
     /* Sidebarの公式案内を、メインメニューとは別の枠にする */
     .skin-vector-2022 .wn-official-links {
     .skin-vector-2022 .wn-official-links {
        box-sizing: border-box;
         width: var(--wn-logo-size);
         width: var(--wn-logo-size);
         margin: 0 0 16px;
         margin: 0 0 16px;
100行目: 216行目:
             -14px + (var(--wn-menu-width) - var(--wn-logo-size)) / 2
             -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;
     }
     }


133行目: 222行目:
@media print {
@media print {
     .wn-share,
     .wn-share,
     .wn-official-links {
     .wn-official-links,
    .wn-official-mobile-host {
         display: none !important;
         display: none !important;
     }
     }
}
}

2026年10月19日 (月) 18:11時点における最新版

/* ここに記述した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 a {
    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.4;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* 公式リンクの配色は、スマホのレイアウト指定より優先する */
#p-公式案内 .mw-list-item a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

#p-公式案内 .mw-list-item a[href^="https://x.com/"],
#p-公式案内 .mw-list-item a[href^="https://twitter.com/"] {
    background: #202122;
}

#p-公式案内 .mw-list-item a[href^="https://www.facebook.com/"],
#p-公式案内 .mw-list-item a[href^="https://facebook.com/"] {
    background: #0866ff;
}

#p-公式案内 .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 {
        height: 100%;
        padding: 6px 4px;
        font-size: 12px;
    }
}

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