MediaWiki:Common.css

From ArchWiki
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/*
 * Override https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/resources/src/mediawiki.skinning/elements.css#n208
 * which was introduced in MediaWiki because of at least https://phabricator.wikimedia.org/T2260 and https://phabricator.wikimedia.org/T103780
 * but those problems should not affect us
 */

pre,
.mw-code {
    white-space: pre;
}


/*
 * Remove icon from links to wiki.archlinux.org because they are sometimes
 * used for example to link to edit diffs or in status templates for the
 * "Discuss" link
 */

#bodyContent a.external[href ^="http://wiki.archlinux.org"],
#bodyContent a.external[href ^="https://wiki.archlinux.org"] {
    background: none;
    padding-right: 0;
}


/* Template:Pkg, Template:AUR, Template:Grp, Template:Man */

span.archwiki-template-pkg,
span.archwiki-template-man {
    font-family: monospace;
}


/* Note, Warning, Tip templates */

div.archwiki-template-box {
    padding: 5px;
    border: thin solid black;
    margin: 0.5em 0;
    overflow: hidden; }
    div.archwiki-template-box.archwiki-template-box-note {
        background-color: #ddf;
        border-color: #bbd; }
    div.archwiki-template-box.archwiki-template-box-warning {
        background-color: #fdd;
        border-color: #dbb; }
    div.archwiki-template-box.archwiki-template-box-tip {
        background-color: #dfd;
        border-color: #bdb; }


/* Status templates */

div.archwiki-template-message {
    position: relative;
    overflow: hidden; /* This e.g. prevents the template from overlapping the related articles box;
                         using 'auto' would display a vertical scrollbar in e.g. Chromium and Opera:
                         increasing min-height would fix it too, but this seems safer and more elegant */
    min-height: 4.6em; /* Needed to better host the two icons at the sides */
    margin-bottom: 1em;
    background-color: #f9faff;
    border: 1px solid #d7dfe3;
    padding: 0 100px;
    text-align: center; }
    div.archwiki-template-message > p > a {
        display: block;
        position: absolute;
        top: 5px; }
        div.archwiki-template-message > p > a:first-of-type {
            left: 26px; /* the icon is 48px, centering in the 100px padding */ }
        div.archwiki-template-message > p > a:last-of-type {
            right: 26px; /* the icon is 48px, centering in the 100px padding */ }
    div.archwiki-template-message > div {
        font-size: 90%; }
    div.archwiki-template-message ul,
    div.archwiki-template-message ol {
        text-align: left; }


/* Related articles templates */

div.archwiki-template-meta-related-articles-start {
    float: right;
    clear: right;
    width: 25%;
    margin: 0 0 0.5em 0.5em; }
    div.archwiki-template-meta-related-articles-start > p {
        background: #333;
        color: white;
        padding: 0.2em;
        border-bottom:5px #08c solid;
        margin:0;
        text-align:center;
        font-weight:bold; }
    div.archwiki-template-meta-related-articles-start > ul {
        list-style-type: none;
        list-style-image: none;
        /* Resetting the margin of ul is necessary for compatibility among browsers */
        margin: 0;
        padding: 0.3em; }
        div.archwiki-template-meta-related-articles-start > ul > li {
            padding: 0.4em 0;
            /* line-height:1 makes wrapped long links distinguishable */
            line-height: 1; }


/*
 * Main Page columns
 * Keep coherent with https://github.com/archlinux/archwiki/search?q=deviceWidthTablet
 */

@media screen and ( min-width: 721px ) {
    div.archwiki-main-page-columns {
        column-count: 2; }
        div.archwiki-main-page-columns > * {
            page-break-inside: avoid;
            /* fix alignment of list items in multi-column layout, see https://stackoverflow.com/a/42349512/4180822 */
            display: inline-block;
            width: 100%; }
}