Jump to content

MediaWiki:Common.css

From Wikipedia, the free encyclopedia
{{#switch: MediaWiki

| MediaWiki =

 {{#ifexist: Template:Editnotices/Page/MediaWiki:Common.css
 | 
   Template:Editnotices/Page/MediaWiki:Common.css
 }}

| User = {{#ifeq:CSS|JSON||Template:Fmbox}}

}}Template:Script doc autoNote: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the Template:Key press key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* /* ALETOPEDIA HOMEPAGE — add once to MediaWiki:Common.css.
   Keep existing site CSS, including your wordmark-only header rule. */
#aletopedia-main {
  --ap-text: #202122;
  --ap-muted: #54595d;
  --ap-link: #36c;
  --ap-border: #a2a9b1;
  --ap-green: #f5fffa;
  --ap-green-head: #cef2e0;
  --ap-blue: #f5faff;
  --ap-blue-head: #cedff2;
  --ap-purple: #faf5ff;
  --ap-purple-head: #ddcef2;
  --ap-neutral: #f8f9fa;
  --ap-neutral-head: #eaecf0;
  color: var(--ap-text);
  font-size: 1em;
  line-height: 1.65;
  margin-top: 0.5em;
  width: 100%;
}
#aletopedia-main, #aletopedia-main * { box-sizing: border-box; }
#aletopedia-main a { color: var(--ap-link); }
#aletopedia-main a:focus-visible { outline: 2px solid var(--ap-link); outline-offset: 3px; }
#aletopedia-main .ap-welcome {
  background: var(--ap-neutral);
  border: 1px solid var(--ap-border);
  padding: 1.2em 1em;
  text-align: center;
}
#aletopedia-main .ap-welcome-title { font-size: 1.9em; line-height: 1.3; margin: 0 0 0.3em; }
#aletopedia-main .ap-tagline { font-size: 1.05em; }
#aletopedia-main .ap-stats { font-size: 0.88em; margin-top: 0.4em; }
#aletopedia-main .ap-topics { padding: 0.7em 0.3em; text-align: center; font-size: 0.92em; }
#aletopedia-main .ap-columns { display: grid; grid-template-columns: 46% minmax(0, 1fr); gap: 0.55em; align-items: stretch; }
#aletopedia-main .ap-column, #aletopedia-main .ap-bottom { min-width: 0; border: 1px solid var(--ap-border); padding: 0.5em; }
#aletopedia-main .ap-green { background: var(--ap-green); }
#aletopedia-main .ap-blue { background: var(--ap-blue); }
#aletopedia-main .ap-purple { background: var(--ap-purple); }
#aletopedia-main .ap-neutral { background: var(--ap-neutral); }
#aletopedia-main h2.ap-section-title {
  border: 1px solid var(--ap-border);
  font-family: inherit;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.3em 0.45em;
  margin: 0 0 0.5em;
  color: var(--ap-text);
  overflow: visible;
}
#aletopedia-main .ap-green .ap-section-title { background: var(--ap-green-head); }
#aletopedia-main .ap-blue .ap-section-title { background: var(--ap-blue-head); }
#aletopedia-main .ap-purple .ap-section-title { background: var(--ap-purple-head); }
#aletopedia-main .ap-neutral .ap-section-title { background: var(--ap-neutral-head); }
#aletopedia-main .ap-section-body { padding: 0 0.15em 0.7em; overflow-wrap: anywhere; }
#aletopedia-main .ap-section-body p { margin: 0.5em 0 0.8em; }
#aletopedia-main .ap-section-body ul { margin: 0.6em 0 0.8em 1.5em; }
#aletopedia-main .ap-section-body li { margin-bottom: 0.45em; }
#aletopedia-main .ap-kicker { font-size: 0.72em; letter-spacing: 0.1em; color: var(--ap-muted); font-weight: 700; margin-bottom: 0.65em; }
#aletopedia-main .ap-readmore { text-align: right; font-weight: 600; margin-top: 0.65em; }
#aletopedia-main .ap-related { text-align: right; font-size: 0.9em; margin-top: 0.65em; }
#aletopedia-main .ap-bottom { margin-top: 0.65em; }
#aletopedia-main .ap-bottom-links { text-align: center; }
/* Hide the redundant Main Page heading only while reading it. */
body.page-Main_Page.action-view .firstHeading { display: none; }
/* Preserve readability in Vector's dark appearance. */
html.skin-theme-clientpref-night #aletopedia-main {
  --ap-text: #eaecf0; --ap-muted: #c8ccd1; --ap-link: #88a3e8; --ap-border: #72777d;
  --ap-green: #152a23; --ap-green-head: #234637;
  --ap-blue: #172838; --ap-blue-head: #29425c;
  --ap-purple: #2a2037; --ap-purple-head: #463657;
  --ap-neutral: #202122; --ap-neutral-head: #34383d;
}
@media (prefers-color-scheme: dark) {
  html.skin-theme-clientpref-os #aletopedia-main {
    --ap-text: #eaecf0; --ap-muted: #c8ccd1; --ap-link: #88a3e8; --ap-border: #72777d;
    --ap-green: #152a23; --ap-green-head: #234637;
    --ap-blue: #172838; --ap-blue-head: #29425c;
    --ap-purple: #2a2037; --ap-purple-head: #463657;
    --ap-neutral: #202122; --ap-neutral-head: #34383d;
  }
}
@media (max-width: 760px) {
  #aletopedia-main .ap-columns { grid-template-columns: minmax(0, 1fr); }
  #aletopedia-main .ap-welcome-title { font-size: 1.55em; }
  #aletopedia-main .ap-readmore, #aletopedia-main .ap-related { text-align: left; }
}
@media print {
  #aletopedia-main { --ap-text: #000; --ap-muted: #333; --ap-link: #000; }
  #aletopedia-main .ap-columns { display: block; }
  #aletopedia-main .ap-column, #aletopedia-main .ap-bottom { margin: 0.6em 0; background: #fff; }
}
 */

#footer-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

#footer-icons li {
    float: none;
    margin: 0;
}

#footer-icons a {
    display: inline-flex;
    align-items: center;
}

#footer-icons img {
    display: block;
    max-width: 100%;
    object-fit: contain;
}


/* Article infoboxes */
.aletopedia-infobox {
    float: right;
    clear: right;
    width: 310px;
    max-width: 100%;
    margin: 0 0 1em 1.5em;
    padding: 6px;
    border: 1px solid #a2a9b1;
    border-spacing: 3px;
    background: #f8f9fa;
    color: #202122;
    font-size: 88%;
    line-height: 1.5;
}

.aletopedia-infobox caption {
    padding: 6px;
    font-size: 115%;
    font-weight: bold;
    text-align: center;
}

.aletopedia-infobox th,
.aletopedia-infobox td {
    padding: 3px;
    vertical-align: top;
}

.aletopedia-infobox th {
    width: 32%;
    text-align: left;
}

.aletopedia-infobox-photo,
.aletopedia-infobox-caption {
    text-align: center;
}

.aletopedia-infobox img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    .aletopedia-infobox {
        float: none;
        margin: 0 auto 1em;
    }
}



/* Aletopedia homepage design upgrade */
#aletopedia-main {
    --ap-text: #202b3c;
    --ap-muted: #637086;
    --ap-link: #254f88;
    --ap-border: #d9e1eb;
    --ap-green: #f7fbf9;
    --ap-green-head: #e7f2ec;
    --ap-blue: #f7faff;
    --ap-blue-head: #e6eef9;
    --ap-purple: #faf8fd;
    --ap-purple-head: #eee8f6;
    --ap-neutral: #f8fafc;
    --ap-neutral-head: #edf1f6;
    line-height: 1.8;
    margin-top: 12px;
}

/* Welcome banner */
#aletopedia-main .ap-welcome {
    position: relative;
    padding: 38px 24px 30px;
    border: 1px solid var(--ap-border);
    border-top: 4px solid var(--ap-link);
    border-radius: 10px;
    background: linear-gradient(
        135deg,
        var(--ap-neutral),
        var(--ap-blue)
    );
}

#aletopedia-main .ap-welcome-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 400;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

#aletopedia-main .ap-tagline {
    color: var(--ap-muted);
    font-size: 1.08em;
}

#aletopedia-main .ap-stats {
    margin-top: 14px;
    color: var(--ap-muted);
    font-size: 0.9em;
}

/* Topic navigation */
#aletopedia-main .ap-topics {
    padding: 17px 12px;
    margin: 12px 0 20px;
    border-bottom: 1px solid var(--ap-border);
    line-height: 2.2;
}

#aletopedia-main .ap-topics a {
    display: inline-block;
    padding: 0 7px;
    font-weight: 600;
}

/* Main panels */
#aletopedia-main .ap-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

#aletopedia-main .ap-column,
#aletopedia-main .ap-bottom {
    padding: 18px;
    border: 1px solid var(--ap-border);
    border-radius: 10px;
    box-shadow: 0 3px 14px rgba(24, 44, 75, 0.04);
}

#aletopedia-main h2.ap-section-title {
    padding: 12px 14px;
    margin: 0 0 16px;
    border: 0;
    border-radius: 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.4;
}

#aletopedia-main .ap-section-body {
    padding: 0 5px 16px;
}

#aletopedia-main .ap-section-body p {
    margin: 0 0 14px;
}

#aletopedia-main .ap-section-body li {
    margin-bottom: 10px;
}

#aletopedia-main .ap-kicker {
    color: var(--ap-muted);
    font-size: 0.72em;
    letter-spacing: 0.12em;
}

#aletopedia-main .ap-readmore,
#aletopedia-main .ap-related {
    margin-top: 18px;
    font-size: 0.9em;
}

#aletopedia-main .ap-bottom {
    margin-top: 20px;
}

#aletopedia-main a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Dark appearance */
html.skin-theme-clientpref-night #aletopedia-main {
    --ap-text: #e5eaf2;
    --ap-muted: #afbdd0;
    --ap-link: #a7c7ff;
    --ap-border: #3b4759;
    --ap-green: #172923;
    --ap-green-head: #233d32;
    --ap-blue: #192735;
    --ap-blue-head: #263d55;
    --ap-purple: #282235;
    --ap-purple-head: #3c3150;
    --ap-neutral: #202733;
    --ap-neutral-head: #303c4d;
}

@media (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os #aletopedia-main {
        --ap-text: #e5eaf2;
        --ap-muted: #afbdd0;
        --ap-link: #a7c7ff;
        --ap-border: #3b4759;
        --ap-green: #172923;
        --ap-green-head: #233d32;
        --ap-blue: #192735;
        --ap-blue-head: #263d55;
        --ap-purple: #282235;
        --ap-purple-head: #3c3150;
        --ap-neutral: #202733;
        --ap-neutral-head: #303c4d;
    }
}

/* Phones and smaller tablets */
@media (max-width: 760px) {
    #aletopedia-main .ap-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    #aletopedia-main .ap-welcome {
        padding: 26px 16px;
    }

    #aletopedia-main .ap-column,
    #aletopedia-main .ap-bottom {
        padding: 12px;
    }

    #aletopedia-main .ap-bottom {
        margin-top: 14px;
    }
}

@media print {
    #aletopedia-main .ap-columns {
        display: block;
    }

    #aletopedia-main .ap-column,
    #aletopedia-main .ap-bottom,
    #aletopedia-main .ap-welcome {
        background: white;
        color: black;
        box-shadow: none;
        border-radius: 0;
    }
}


/* Homepage discovery and article spotlight */
#aletopedia-main .ap-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

#aletopedia-main .ap-actions a {
    display: inline-block;
    padding: 9px 20px;
    border: 1px solid var(--ap-link);
    border-radius: 5px;
    font-weight: 600;
}

#aletopedia-main .ap-actions a:hover {
    background: var(--ap-blue-head);
    text-decoration: none;
}

#aletopedia-main .ap-subjects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

#aletopedia-main .ap-subject {
    padding: 18px;
    background: var(--ap-neutral);
    border: 1px solid var(--ap-border);
    border-radius: 8px;
}

#aletopedia-main .ap-subject h3 {
    margin: 0 0 6px;
    padding: 0;
    font-family: Georgia, serif;
    font-size: 1.15em;
}

#aletopedia-main .ap-subject p {
    margin: 0;
    color: var(--ap-muted);
    font-size: 0.9em;
    line-height: 1.6;
}

#aletopedia-main .ap-portrait {
    float: right;
    width: 160px;
    max-width: 45%;
    margin: 0 0 16px 20px;
    text-align: center;
}

#aletopedia-main .ap-portrait img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

#aletopedia-main .ap-caption {
    margin-top: 6px;
    color: var(--ap-muted);
    font-size: 0.8em;
}

#aletopedia-main .ap-clear {
    clear: both;
}

#aletopedia-main .ap-editor-note {
    padding: 12px 14px;
    margin-top: 18px;
    border-left: 3px solid var(--ap-link);
    background: var(--ap-neutral);
    color: var(--ap-muted);
    font-size: 0.88em;
}

@media (max-width: 760px) {
    #aletopedia-main .ap-subjects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    #aletopedia-main .ap-subjects {
        grid-template-columns: minmax(0, 1fr);
    }

    #aletopedia-main .ap-portrait {
        width: 120px;
        margin-left: 12px;
    }
}


/* Homepage cards and navigation buttons */
#aletopedia-main .ap-subjects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

#aletopedia-main .ap-subject {
    padding: 18px;
    border: 1px solid var(--ap-border);
    border-radius: 8px;
    background: var(--ap-neutral);
}

#aletopedia-main .ap-subject h3 {
    margin: 0 0 8px;
    padding: 0;
    font-family: Georgia, serif;
    font-size: 1.15em;
}

#aletopedia-main .ap-subject p {
    margin: 0;
    color: var(--ap-muted);
    font-size: 0.9em;
    line-height: 1.6;
}

#aletopedia-main .ap-actions {
    margin: 20px 0;
    text-align: center;
}

#aletopedia-main .ap-actions a {
    display: inline-block;
    margin: 5px;
    padding: 10px 20px;
    border: 1px solid var(--ap-link);
    border-radius: 5px;
    font-weight: 600;
}

#aletopedia-main .ap-actions a:hover {
    background: var(--ap-blue-head);
    text-decoration: none;
}

@media (max-width: 760px) {
    #aletopedia-main .ap-subjects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    #aletopedia-main .ap-subjects {
        grid-template-columns: minmax(0, 1fr);
    }
}