Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Main Page/Sandbox/header/styles.css: Difference between revisions

Template page
Xeravax (talk | contribs)
Created page with "Main page header block: .resonite-main-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1.5em; margin-bottom: 2em; } .resonite-main-header__text { flex: 1; min-width: 0; } .resonite-main-header__title { font-size: 1.75rem; font-weight: bold; color: #fff; margin: 0 0 0.25em 0; line-height: 1.3; } .resonite-main-header__meta { font-size: 0.9rem; color:..."
 
Xeravax (talk | contribs)
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Main page header block */
.mp-top {
.resonite-main-header {
     display: flex;
     display: flex;
     flex-wrap: wrap;
     /* row-reverse: when it wraps on smaller displays, the logo appears first */
     align-items: flex-start;
     flex-flow: row-reverse wrap;
     justify-content: space-between;
     justify-content: center;
     gap: 1.5em;
     gap: 24px;
     margin-bottom: 2em;
     margin-bottom: 0;
}
}


.resonite-main-header__text {
.mp-top .mp-header {
     flex: 1;
     flex: 1;
    flex-basis: 400px;
     min-width: 0;
     min-width: 0;
}
}


.resonite-main-header__title {
.mp-header-subtitle {
     font-size: 1.75rem;
    font-family: Poppins, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Adwaita Sans, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;
     font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--mp-header-text, #d7d9db);
    margin: 0;
}
 
.mp-header-subtitle b {
    font-weight: 700;
}
 
.mp-header-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}
 
/* Gray bars to the left and right of the stats */
.mp-header-stats-sep {
    height: 0;
    border-top: 2px solid var(--mp-header-sep, var(--color-surface-2, #8b949e));
    flex: 1;
}
 
.mp-header-stats > ul {
    text-align: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
 
.mp-header-stats li {
    display: inline;
    color: var(--mp-header-muted, #8b949e);
}
 
.mp-header-stats li:not(:last-child)::after {
    content: " · ";
     font-weight: bold;
     font-weight: bold;
    color: #fff;
    margin: 0 0 0.25em 0;
    line-height: 1.3;
}
}


.resonite-main-header__meta {
.mp-header-stats a {
     font-size: 0.9rem;
     color: var(--mp-header-link, #58a6ff);
     color: #8b949e;
}
     margin: 0 0 0.5em 0;
 
/* Vertical spacing between header blocks */
.mp-header > * {
    margin: 12px 0;
}
 
.mp-header > :first-child {
     margin-top: 0;
}
 
.mp-header > :last-child {
     margin-bottom: 0;
}
}


.resonite-main-header__intro {
.mp-header-intro {
     font-size: 0.95rem;
     font-size: 0.95rem;
     color: #8b949e;
     color: var(--mp-header-muted, #8b949e);
     margin: 0;
     margin: 0;
}
}


.resonite-main-header__intro a {
.mp-header-intro a {
     color: #58a6ff;
     color: var(--mp-header-link, #58a6ff);
}
}


.resonite-main-header__logo {
/* Logo: theme-aware (black for light mode, white for dark mode).
     font-size: 1.5rem;
  Wrapper contains two spans; only one is visible at a time based on
     font-weight: bold;
  prefers-color-scheme (works when transcluded; html/body selectors
     color: #fff;
  are stripped by TemplateStyles). */
     white-space: nowrap;
.mp-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.mp-logo img {
    vertical-align: middle;
}
/* Default: show white logo (dark mode), hide black logo */
.mp-logo__light {
    display: none;
}
.mp-logo__dark {
     display: inline;
}
.mp-logo__dark a {
    display: inline-block;
}
@media screen and ( prefers-color-scheme: light ) {
    .mp-logo__light {
        display: inline;
    }
    .mp-logo__light a {
        display: inline-block;
     }
    .mp-logo__dark {
        display: none;
     }
}
 
/* Light mode: readable text and links on light background.
  Per MediaWiki: support explicit (skin-theme-clientpref-day) and
  automatic/OS mode (skin-theme-clientpref-os + prefers-color-scheme: light). */
@media screen {
    html.skin-theme-clientpref-day .mp-header-subtitle,
    html.skin-theme-clientpref-day .mp-header-intro {
        --mp-header-text: #24292f;
        --mp-header-muted: #57606a;
        --mp-header-link: #0969da;
    }
     html.skin-theme-clientpref-day .mp-header-stats-sep {
        --mp-header-sep: #d0d7de;
    }
    html.skin-theme-clientpref-day .mp-header-stats li {
        --mp-header-muted: #57606a;
    }
    html.skin-theme-clientpref-day .mp-header-stats a,
    html.skin-theme-clientpref-day .mp-header-intro a {
        --mp-header-link: #0969da;
    }
}
@media screen and ( prefers-color-scheme: light ) {
    html.skin-theme-clientpref-os .mp-header-subtitle,
    html.skin-theme-clientpref-os .mp-header-intro {
        --mp-header-text: #24292f;
        --mp-header-muted: #57606a;
        --mp-header-link: #0969da;
    }
    html.skin-theme-clientpref-os .mp-header-stats-sep {
        --mp-header-sep: #d0d7de;
    }
    html.skin-theme-clientpref-os .mp-header-stats li {
        --mp-header-muted: #57606a;
    }
    html.skin-theme-clientpref-os .mp-header-stats a,
    html.skin-theme-clientpref-os .mp-header-intro a {
        --mp-header-link: #0969da;
    }
}
}

Latest revision as of 04:10, 4 February 2026

.mp-top {
    display: flex;
    /* row-reverse: when it wraps on smaller displays, the logo appears first */
    flex-flow: row-reverse wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 0;
}

.mp-top .mp-header {
    flex: 1;
    flex-basis: 400px;
    min-width: 0;
}

.mp-header-subtitle {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Adwaita Sans, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--mp-header-text, #d7d9db);
    margin: 0;
}

.mp-header-subtitle b {
    font-weight: 700;
}

.mp-header-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Gray bars to the left and right of the stats */
.mp-header-stats-sep {
    height: 0;
    border-top: 2px solid var(--mp-header-sep, var(--color-surface-2, #8b949e));
    flex: 1;
}

.mp-header-stats > ul {
    text-align: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mp-header-stats li {
    display: inline;
    color: var(--mp-header-muted, #8b949e);
}

.mp-header-stats li:not(:last-child)::after {
    content: " · ";
    font-weight: bold;
}

.mp-header-stats a {
    color: var(--mp-header-link, #58a6ff);
}

/* Vertical spacing between header blocks */
.mp-header > * {
    margin: 12px 0;
}

.mp-header > :first-child {
    margin-top: 0;
}

.mp-header > :last-child {
    margin-bottom: 0;
}

.mp-header-intro {
    font-size: 0.95rem;
    color: var(--mp-header-muted, #8b949e);
    margin: 0;
}

.mp-header-intro a {
    color: var(--mp-header-link, #58a6ff);
}

/* Logo: theme-aware (black for light mode, white for dark mode).
   Wrapper contains two spans; only one is visible at a time based on
   prefers-color-scheme (works when transcluded; html/body selectors
   are stripped by TemplateStyles). */
.mp-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.mp-logo img {
    vertical-align: middle;
}
/* Default: show white logo (dark mode), hide black logo */
.mp-logo__light {
    display: none;
}
.mp-logo__dark {
    display: inline;
}
.mp-logo__dark a {
    display: inline-block;
}
@media screen and ( prefers-color-scheme: light ) {
    .mp-logo__light {
        display: inline;
    }
    .mp-logo__light a {
        display: inline-block;
    }
    .mp-logo__dark {
        display: none;
    }
}

/* Light mode: readable text and links on light background.
   Per MediaWiki: support explicit (skin-theme-clientpref-day) and
   automatic/OS mode (skin-theme-clientpref-os + prefers-color-scheme: light). */
@media screen {
    html.skin-theme-clientpref-day .mp-header-subtitle,
    html.skin-theme-clientpref-day .mp-header-intro {
        --mp-header-text: #24292f;
        --mp-header-muted: #57606a;
        --mp-header-link: #0969da;
    }
    html.skin-theme-clientpref-day .mp-header-stats-sep {
        --mp-header-sep: #d0d7de;
    }
    html.skin-theme-clientpref-day .mp-header-stats li {
        --mp-header-muted: #57606a;
    }
    html.skin-theme-clientpref-day .mp-header-stats a,
    html.skin-theme-clientpref-day .mp-header-intro a {
        --mp-header-link: #0969da;
    }
}
@media screen and ( prefers-color-scheme: light ) {
    html.skin-theme-clientpref-os .mp-header-subtitle,
    html.skin-theme-clientpref-os .mp-header-intro {
        --mp-header-text: #24292f;
        --mp-header-muted: #57606a;
        --mp-header-link: #0969da;
    }
    html.skin-theme-clientpref-os .mp-header-stats-sep {
        --mp-header-sep: #d0d7de;
    }
    html.skin-theme-clientpref-os .mp-header-stats li {
        --mp-header-muted: #57606a;
    }
    html.skin-theme-clientpref-os .mp-header-stats a,
    html.skin-theme-clientpref-os .mp-header-intro a {
        --mp-header-link: #0969da;
    }
}