Difference between revisions of "MediaWiki:Common.css"

From WhyAskWhy.org Wiki
Jump to: navigation, search
m (Testing some CSS rules found at http://wiki.nginx.org/skins/bluwiki_skin/main.css)
m (Testing some CSS rules for reference tags)
 
(5 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
     display: inline-block;
 
     display: inline-block;
 
     color: black;
 
     color: black;
     margin: 1em;
+
     margin: 0em;
 
     font: normal bold larger sans-serif;
 
     font: normal bold larger sans-serif;
 
}
 
}
Line 31: Line 31:
 
}
 
}
  
/*  
+
/* Testing some settings found at http://en.wikipedia.org/wiki/MediaWiki:Common.css */
* Trying to merge this rule with the existing one to prevent the font from being so small
 
*/
 
  
.mw-geshi.mw-content-ltr {
+
/* Make the list of references smaller */
     font-size: 1.2em;
+
ol.references,
 +
div.reflist,
 +
div.refbegin {
 +
     font-size: 90%;            /* Default font-size */
 +
    margin-bottom: 0.5em;
 
}
 
}
 
+
div.refbegin-100 {
/* Borrowing some rules from http://wiki.nginx.org/skins/bluwiki_skin/main.css */
+
    font-size: 100%;          /* Option for normal fontsize in {{refbegin}} */
 
+
}
#bodycontent .directive-ref-table {
+
div.reflist ol.references {
     font-size: 95%;
+
    font-size: 100%;          /* Reset font-size when nested in div.reflist */
     margin: 0em 1em 1em 1em;
+
    list-style-type: inherit;  /* Enable custom list style types */
     border-color: #ccc;
+
}
     border-width: 5px 0px;
+
 +
/* 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;
 
}
 
}
 
+
#bodycontent .directive-ref-table td {
+
/* Styling for citations (CSS3). Breaks long urls, etc., rather than overflowing box */
    padding: 0.5em 1em;
+
.citation {
     border: none;
+
     word-wrap: break-word;
 
}
 
}
 
+
#bodycontent .directive-ref-table .drt-td2 {
+
/* Default styling for titles of works, styling for the title of an article
     text-align: left;
+
  within a periodical, or a contribution within a compilation. */
    width: 500px;
+
cite,
 +
.citation cite.article,
 +
.citation cite.contribution {
 +
     font-style: inherit;
 
}
 
}
 
+
#bodycontent .modules-index-table {
+
/* Styling for the title of any work within a citation,
     font-size: 95%;
+
  or specifically the title of a periodical. */
    margin: 1em;
+
.citation cite,
    border-color: #ddd;
+
.citation cite.periodical {
    border-width: 5px 0px;
+
     font-style: italic;
 
}
 
}
 
+
#bodycontent .modules-index-table td {
+
/* For linked citation numbers and document IDs, where
    padding: 4px;
+
  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;
    }
}