Jump to content

MediaWiki:Common.css: Difference between revisions

added some TODO comments and placed some more markup under the "to port" section
(okay, here's one thing we still need)
(added some TODO comments and placed some more markup under the "to port" section)
Line 4: Line 4:
/* The original markup on Wikipedia's Common.css page should be checked once in a while for updates to, or removal of, this markup */
/* The original markup on Wikipedia's Common.css page should be checked once in a while for updates to, or removal of, this markup */


// TODO: Localize checkerboard image
@media screen {
@media screen {
/* Put a chequered background behind images, only visible if they have transparency,
/* Put a chequered background behind images, only visible if they have transparency,
Line 34: Line 35:
font-size: 85%;
font-size: 85%;
}
}
.mw-body-content sub,
.mw-body-content sub,
.mw-body-content sup {
.mw-body-content sup {
Line 49: Line 49:
.client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child),
.client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child),


// TODO: Doesn't seem to work in hiding the "do it yourself" box on [[Developer Mode]]
/* Avoid FOUC/reflows on collapsed elements. */
/* Avoid FOUC/reflows on collapsed elements. */
/* This copies MediaWiki's solution for T42812 to apply to innercollapse/outercollapse (T325115). */
/* This copies MediaWiki's solution for T42812 to apply to innercollapse/outercollapse (T325115). */
Line 68: Line 69:
counter-reset: mw-ref-linkback 0;
counter-reset: mw-ref-linkback 0;
}
}
span[ rel='mw:referencedBy' ] > a::before {
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-ref-linkback, lower-alpha );
content: counter( mw-ref-linkback, lower-alpha );
Line 75: Line 75:
font-style: italic;
font-style: italic;
}
}
a[ rel="mw:referencedBy" ]::before {
a[ rel="mw:referencedBy" ]::before {
font-weight: bold;
font-weight: bold;
content: "^";
content: "^";
}
}
span[ rel="mw:referencedBy" ]::before {
span[ rel="mw:referencedBy" ]::before {
content: "^ ";
content: "^ ";
}
}


.collapseButton {         /* 'show'/'hide' buttons created dynamically */
// TODO: Correct/replace for use in Vector 2022
     float: right;         /* by the CollapsibleTables javascript in   */
/* When <div class="nonumtoc"> is used on the table of contents,
    font-weight: normal;   /* [[MediaWiki:Common.js]] are styled here  */
  the ToC will display without numbers */
    text-align: right;     /* so they can be customised.               */
.nonumtoc .tocnumber { display: none; }
    width: auto;
.nonumtoc #toc ul,
.nonumtoc .toc ul {
    line-height: 1.5em;
    list-style: none;
    margin: .3em 0 0;
    padding: 0;
}
.nonumtoc #toc ul ul,
.nonumtoc .toc ul ul {
    margin: 0 0 0 2em;
}
 
// TODO: Correct/replace for use in Vector 2022
/* Allow limiting of which header levels are shown in a TOC;
  <div class="toclimit-3">, for instance, will limit to
  showing ==headings== and ===headings=== but no further
  (as long as there are no =headings= on the page, which
  there shouldn't be according to the MoS).
*/
.toclimit-2 .toclevel-1 ul,
.toclimit-3 .toclevel-2 ul,
.toclimit-4 .toclevel-3 ul,
.toclimit-5 .toclevel-4 ul,
.toclimit-6 .toclevel-5 ul,
.toclimit-7 .toclevel-6 ul {
    display: none;
}
/* Above, but for Vector 2022 */
.toclimit-2 .sidebar-toc-level-1 ul,
.toclimit-3 .sidebar-toc-level-2 ul,
.toclimit-4 .sidebar-toc-level-3 ul,
.toclimit-5 .sidebar-toc-level-4 ul,
.toclimit-6 .sidebar-toc-level-5 ul,
.toclimit-7 .sidebar-toc-level-6 ul {
     display: none;
}
 
/* CUSTOM ONI WIKI ADDITIONS */
 
// TODO: Restore to working order
/* Redesigned outbound arrow for external links */
div#content a.external
{
background-image:url(/w/images/e/ea/Link_icon_-_external.svg);
background-size:10px;
background-position:top right;
background-repeat:no-repeat;
padding-right:11px;
}
 
/* Replace the padlock icon used for HTTPS links with the same
   outward arrow used for external HTTP links */
div#content a.external[href^="https://"]
{
background-image:url(/w/images/e/ea/Link_icon_-_external.svg);
background-position:top right;
background-repeat:no-repeat;
padding-right:11px;
}
 
/* Provide sideways arrow for links to other Oni2.net sites */
div#content a.external[href*=".oni2.net"]
{
background-image:url(/w/images/9/98/Link_icon_-_oni2.net.svg);
background-size:12px;
background-position:top right;
background-repeat:no-repeat;
padding-right:13px;
}
 
/* Provide circular arrow for external internal links */
div#content a.external[href*="wiki.oni2.net"]
{
background-image:url(/w/images/7/7d/Link_icon_-_external_internal.svg);
background-position:top right;
background-repeat:no-repeat;
padding-right:12px;
}
 
/* Show movie icon for links to movie files that typically play in-browser */
div#content a.external[href$=".avi"],
div#content a.external[href$=".mov"],
div#content a.external[href$=".mp4"],
div#content a.external[href$=".wmv"]
{
background-image:url(/w/images/4/45/Link_icon_-_movie_file.svg);
background-size:12px;
background-position:top right;
background-repeat:no-repeat;
padding-right:14px;
}
 
/* Show sound icon for links to audio files that typically play in-browser */
div#content a.external[href$=".m4a"],
div#content a.external[href$=".mp3"],
div#content a.external[href$=".wav"]
{
background-image:url(/w/images/5/52/Link_icon_-_sound_file.svg);
background-size:12px;
background-position:top right;
background-repeat:no-repeat;
padding-right:14px;
}
 
/* Provide green upward arrow for interwiki links */
div#content a.extiw
{
background-image:url(/w/images/d/dd/Link_icon_-_interwiki.svg);
background-position:top right;
background-repeat:no-repeat;
padding-right:11px;
}
}
.navbox .collapseButton {  /* In navboxes, the show/hide button balances */
    width: 6em;            /* the vde links from [[Template:Navbar]],    */
}                          /* so they need to be the same width.        */


/* Cell sizes for ambox/tmbox/imbox/cmbox/ombox/fmbox/dmbox message boxes */
/* TODO: TO BE PORTED TO TEMPLATESTYLES */
 
/* Cell sizes for ambox/tmbox/imbox/cmbox/ombox/fmbox/dmbox message boxes, used by [[Template:Fmbox]] */
th.mbox-text, td.mbox-text {  /* The message body cell(s) */
th.mbox-text, td.mbox-text {  /* The message body cell(s) */
     border: none;  
     border: none;  
Line 420: Line 527:
}
}


/* When <div class="nonumtoc"> is used on the table of contents,
/* Hide/show buttons */
  the ToC will display without numbers */
.collapseButton {         /* 'show'/'hide' buttons created dynamically */
.nonumtoc .tocnumber { display: none; }
    float: right;         /* by the CollapsibleTables javascript in    */
.nonumtoc #toc ul,
     font-weight: normal;  /* [[MediaWiki:Common.js]] are styled here  */
.nonumtoc .toc ul {
     text-align: right;    /* so they can be customised.               */
     line-height: 1.5em;
     width: auto;
     list-style: none;
     margin: .3em 0 0;
     padding: 0;
}
}
.nonumtoc #toc ul ul,
.navbox .collapseButton { /* In navboxes, the show/hide button balances */
.nonumtoc .toc ul ul {  
     width: 6em;           /* the vde links from [[Template:Navbar]],   */
    margin: 0 0 0 2em;
}                         /* so they need to be the same width.         */
}
 
/* Allow limiting of which header levels are shown in a TOC;
  <div class="toclimit-3">, for instance, will limit to
  showing ==headings== and ===headings=== but no further
  (as long as there are no =headings= on the page, which
  there shouldn't be according to the MoS).
*/
.toclimit-2 .toclevel-1 ul,
.toclimit-3 .toclevel-2 ul,
.toclimit-4 .toclevel-3 ul,
.toclimit-5 .toclevel-4 ul,
.toclimit-6 .toclevel-5 ul,
.toclimit-7 .toclevel-6 ul {
    display: none;
}
/* Above, but for Vector 2022 */
.toclimit-2 .sidebar-toc-level-1 ul,
.toclimit-3 .sidebar-toc-level-2 ul,
.toclimit-4 .sidebar-toc-level-3 ul,
.toclimit-5 .sidebar-toc-level-4 ul,
.toclimit-6 .sidebar-toc-level-5 ul,
.toclimit-7 .sidebar-toc-level-6 ul {
     display: none;
}
 
/* CUSTOM ONI WIKI ADDITIONS */
 
/* Redesigned outbound arrow for external links */
div#content a.external
{
background-image:url(/w/images/e/ea/Link_icon_-_external.svg);
background-size:10px;
background-position:top right;
background-repeat:no-repeat;
padding-right:11px;
}
 
/* Replace the padlock icon used for HTTPS links with the same
  outward arrow used for external HTTP links */
div#content a.external[href^="https://"]
{
background-image:url(/w/images/e/ea/Link_icon_-_external.svg);
background-position:top right;
background-repeat:no-repeat;
padding-right:11px;
}
 
/* Provide sideways arrow for links to other Oni2.net sites */
div#content a.external[href*=".oni2.net"]
{
background-image:url(/w/images/9/98/Link_icon_-_oni2.net.svg);
background-size:12px;
background-position:top right;
background-repeat:no-repeat;
padding-right:13px;
}
 
/* Provide circular arrow for external internal links */
div#content a.external[href*="wiki.oni2.net"]
{
background-image:url(/w/images/7/7d/Link_icon_-_external_internal.svg);
background-position:top right;
background-repeat:no-repeat;
padding-right:12px;
}
 
/* Show movie icon for links to movie files that typically play in-browser */
div#content a.external[href$=".avi"],
div#content a.external[href$=".mov"],
div#content a.external[href$=".mp4"],
div#content a.external[href$=".wmv"]
{
background-image:url(/w/images/4/45/Link_icon_-_movie_file.svg);
background-size:12px;
background-position:top right;
background-repeat:no-repeat;
padding-right:14px;
}
 
/* Show sound icon for links to audio files that typically play in-browser */
div#content a.external[href$=".m4a"],
div#content a.external[href$=".mp3"],
div#content a.external[href$=".wav"]
{
background-image:url(/w/images/5/52/Link_icon_-_sound_file.svg);
background-size:12px;
background-position:top right;
background-repeat:no-repeat;
padding-right:14px;
}
 
/* Provide green upward arrow for interwiki links */
div#content a.extiw
{
background-image:url(/w/images/d/dd/Link_icon_-_interwiki.svg);
background-position:top right;
background-repeat:no-repeat;
padding-right:11px;
}
 
/* TO BE PORTED TO TEMPLATESTYLES */


/**
/**