Difference between revisions of "MediaWiki:Common.css"

From WhyAskWhy.org Wiki
Jump to: navigation, search
m (Testing the results of tossing the margin)
m (Testing some CSS rules for reference tags)
 
Line 29: Line 29:
 
     background: black url(/skins/common/images/critical-32.png) no-repeat 0.5em 1em;
 
     background: black url(/skins/common/images/critical-32.png) no-repeat 0.5em 1em;
 
     color: white;
 
     color: white;
 +
}
 +
 +
/* Testing some settings found at http://en.wikipedia.org/wiki/MediaWiki:Common.css */
 +
 +
/* Make the list of references smaller */
 +
ol.references,
 +
div.reflist,
 +
div.refbegin {
 +
    font-size: 90%;            /* Default font-size */
 +
    margin-bottom: 0.5em;
 +
}
 +
div.refbegin-100 {
 +
    font-size: 100%;          /* Option for normal fontsize in {{refbegin}} */
 +
}
 +
div.reflist ol.references {
 +
    font-size: 100%;          /* Reset font-size when nested in div.reflist */
 +
    list-style-type: inherit;  /* Enable custom list style types */
 +
}
 +
 +
/* Highlight clicked reference in blue to help navigation */
 +
ol.references li:target,
 +
sup.reference:target,
 +
span.citation:target {
 +
    background-color: #DEF;
 +
}
 +
 +
/* Ensure refs in table headers and the like aren't bold or italic */
 +
sup.reference {
 +
    font-weight: normal;
 +
    font-style: normal;
 +
}
 +
 +
/* Allow hidden ref errors to be shown by user CSS */
 +
span.brokenref {
 +
    display: none;
 +
}
 +
 +
/* Styling for citations (CSS3). Breaks long urls, etc., rather than overflowing box */
 +
.citation {
 +
    word-wrap: break-word;
 +
}
 +
 +
/* Default styling for titles of works, styling for the title of an article
 +
  within a periodical, or a contribution within a compilation. */
 +
cite,
 +
.citation cite.article,
 +
.citation cite.contribution {
 +
    font-style: inherit;
 +
}
 +
 +
/* Styling for the title of any work within a citation,
 +
  or specifically the title of a periodical. */
 +
.citation cite,
 +
.citation cite.periodical {
 +
    font-style: italic;
 +
}
 +
 +
/* For linked citation numbers and document IDs, where
 +
  the number need not be shown on a screen or a handheld,
 +
  but should be included in the printed version */
 +
@media screen, handheld {
 +
    .citation *.printonly {
 +
        display: none;
 +
    }
 
}
 
}

Latest revision as of 07:23, 19 August 2012

/* CSS placed here will be applied to all skins */

/* 
 * Using images included with MediaWiki installation, but
 * using some ideas gained from http://www.mediawiki.org/wiki/MediaWiki:Common.css

 * Selector chaining tip from http://stackoverflow.com/questions/558721/css-classes-subclasses
 * specifically, http://stackoverflow.com/a/558778
 */

.callout {
    padding: 1em 1em 1em 3em;
    min-height: 28px;
    display: inline-block;
    color: black;
    margin: 0em;
    font: normal bold larger sans-serif;
}

.callout.info {
    background: #F0F0E7  url(/skins/common/images/info-32.png) no-repeat 0.5em 1em;
}

.callout.warning {
    background: #F0CF69  url(/skins/common/images/warning-32.png) no-repeat 0.5em 1em;
}

.callout.error {
    background: black url(/skins/common/images/critical-32.png) no-repeat 0.5em 1em;
    color: white;
}

/* Testing some settings found at http://en.wikipedia.org/wiki/MediaWiki:Common.css */

/* Make the list of references smaller */
ol.references,
div.reflist,
div.refbegin {
    font-size: 90%;            /* Default font-size */
    margin-bottom: 0.5em;
}
div.refbegin-100 {
    font-size: 100%;           /* Option for normal fontsize in {{refbegin}} */
}
div.reflist ol.references {
    font-size: 100%;           /* Reset font-size when nested in div.reflist */
    list-style-type: inherit;  /* Enable custom list style types */
}
 
/* Highlight clicked reference in blue to help navigation */
ol.references li:target,
sup.reference:target,
span.citation:target {
    background-color: #DEF;
}
 
/* Ensure refs in table headers and the like aren't bold or italic */
sup.reference {
    font-weight: normal;
    font-style: normal;
}
 
/* Allow hidden ref errors to be shown by user CSS */
span.brokenref {
    display: none;
}
 
/* Styling for citations (CSS3). Breaks long urls, etc., rather than overflowing box */
.citation {
    word-wrap: break-word;
}
 
/* Default styling for titles of works, styling for the title of an article
   within a periodical, or a contribution within a compilation. */
cite,
.citation cite.article,
.citation cite.contribution {
    font-style: inherit;
}
 
/* Styling for the title of any work within a citation,
   or specifically the title of a periodical. */
.citation cite,
.citation cite.periodical {
    font-style: italic;
}
 
/* For linked citation numbers and document IDs, where
   the number need not be shown on a screen or a handheld,
   but should be included in the printed version */
@media screen, handheld {
    .citation *.printonly {
        display: none;
    }
}