Jump to content

MediaWiki:Common.css: Difference between revisions

From Astrill Wiki
Add responsive platform grid styles for Main Page
Correct file-wrapper selectors for MediaWiki 1.43 markup
Line 32: Line 32:


/* Keep every tile the same height regardless of icon aspect ratio, so labels
/* Keep every tile the same height regardless of icon aspect ratio, so labels
   line up across rows. */
   line up across rows. MediaWiki 1.43 wraps file links in
  <span typeof="mw:File">; the older .mw-file-description / a.image selectors
  are kept for safety across skin and version changes. */
.astrill-platform span[typeof~="mw:File"],
.astrill-platform .mw-file-description,
.astrill-platform .mw-file-description,
.astrill-platform a.image {
.astrill-platform a.image {
Line 41: Line 44:
}
}


.astrill-platform img {
.astrill-platform img,
.astrill-platform .mw-file-element {
     max-width: 80px;
     max-width: 80px;
     max-height: 80px;
     max-height: 80px;
Line 75: Line 79:
         gap: 1em 0.75em;
         gap: 1em 0.75em;
     }
     }
    .astrill-platform span[typeof~="mw:File"],
     .astrill-platform .mw-file-description,
     .astrill-platform .mw-file-description,
     .astrill-platform a.image {
     .astrill-platform a.image {
         height: 64px;
         height: 64px;
     }
     }
     .astrill-platform img {
     .astrill-platform img,
    .astrill-platform .mw-file-element {
         max-width: 64px;
         max-width: 64px;
         max-height: 64px;
         max-height: 64px;
     }
     }
}
}

Revision as of 16:18, 2 August 2026

@import url('https://fonts.googleapis.com/css?family=Roboto');
/* CSS placed here will be applied to all skins */
#content h2 {
border-bottom: 3px solid #AAAAAA !important;
}
#toctitle h2 {
border-bottom: 1px solid #AAAAAA !important;
}
body,.mw-body h1, .mw-body-content h1, .mw-body-content h2{
    font-family: 'Roboto', sans-serif !important;
}

/* ---------------------------------------------------------------------------
   Main Page platform grid.
   Replaces the old wikitables, which used dozens of empty cells ("| ||||||...")
   as spacers. That forced a fixed, very wide table that could not reflow, so it
   overflowed on narrow desktop windows and was unusable on phones.
   --------------------------------------------------------------------------- */
.astrill-platforms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5em 1.25em;
    margin: 1.5em 0 2em;
}

.astrill-platform {
    flex: 0 0 auto;
    width: 116px;
    text-align: center;
}

/* Keep every tile the same height regardless of icon aspect ratio, so labels
   line up across rows. MediaWiki 1.43 wraps file links in
   <span typeof="mw:File">; the older .mw-file-description / a.image selectors
   are kept for safety across skin and version changes. */
.astrill-platform span[typeof~="mw:File"],
.astrill-platform .mw-file-description,
.astrill-platform a.image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.astrill-platform img,
.astrill-platform .mw-file-element {
    max-width: 80px;
    max-height: 80px;
    height: auto;
    width: auto;
}

.astrill-platform-label {
    display: block;
    margin-top: 0.5em;
    font-weight: bold;
    font-size: 0.9em;
    line-height: 1.25;
}

/* Labels are links; keep them readable rather than bright blue on every tile. */
.astrill-platform-label a,
.astrill-platform-label a.external {
    color: inherit;
    background: none !important;
    padding-right: 0 !important;
}

.astrill-platform-label a:hover {
    text-decoration: underline;
}

@media screen and (max-width: 640px) {
    .astrill-platform {
        width: 88px;
    }
    .astrill-platforms {
        gap: 1em 0.75em;
    }
    .astrill-platform span[typeof~="mw:File"],
    .astrill-platform .mw-file-description,
    .astrill-platform a.image {
        height: 64px;
    }
    .astrill-platform img,
    .astrill-platform .mw-file-element {
        max-width: 64px;
        max-height: 64px;
    }
}