MediaWiki:Common.css

From Cannabis
Jump to navigation Jump to 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.
/* CSS placed here will be applied to all skins */

/* User CSS page changes can show up in around 15 seconds with Ctrl-F5, etc... 
/* CSS changes made here may take around 5 minutes to show up with Ctrl-F5, etc..
/* Your user personal CSS page:
/* http://cannabis.shoutwiki.com/wiki/Special:MyPage/common.css 
/* Additional measures to try after waiting longer for CSS changes here: 
/* Try purging: https://www.mediawiki.org/wiki/Manual:Purge 
/* Click on the history link, and substitute "purge" for "history" in the URL.
/* If nothing after days, go to http://www.shoutwiki.com/wiki/Special:Contact */



/* === Black background. Used mainly for small divs and tables ===
/* Plain text color, and link color, are also set.
/* Allows use on the news list, news archive, and on multiple wikis. 
/* !important necessary on Shoutwiki, but not Wikia */

.blackbackground {
    background-color: black !important;
    color: white !important;
    padding: 3px;
}
.blackbackground a:link { color: lime; }
.blackbackground a:visited { color: palegreen !important; }



/* === Dark background colors. Link colors too. ===
/* https://community.fandom.com/wiki/Thread:1666538 
/* https://cannabis.wikia.org/wiki/Template:News_list_beta/Sandbox  (protected).
/* https://cannabis.wikia.org/wiki/Template:News_list_beta/Sandbox2  (protected).
/* https://cannabis.wikia.org/wiki/Template:News_list_beta/Sandbox3 (unprotected).
/* https://htmldog.com/guides/css/intermediate/pseudoclasses
/* https://htmldog.com/guides/css/intermediate/classid
/* https://en.wikipedia.org/wiki/Web_colors
/* Clear recent history to reset all links to unvisited color.
/* https://cannabis.wikia.org/wiki/Special:ThemeDesigner 
/* Theme designer colors can be found via these methods:
/* Link text: Firefox > tools menu > web developer > eye dropper. 
/* a:visited color in Qualaroo.css file from page save. 
/* Used class=darkbackground here: 
/* http://cannabis.shoutwiki.com/wiki/Template:News_list */

.darkbackground {
    background-color: maroon;
    color: white;
    padding: 3px;
}
.darkbackground a:link { color: lime; }
.darkbackground a:visited { color: palegreen !important; }

.darkbackground div.thumbinner {background-color: maroon; }
/* Above is for background color for transparent images and image captions */



/* === Collapsible elements. Toggle-link moved to left. === 
/* Margin around it adjusted. 
/* https://community.fandom.com/wiki/Thread:1104268
/* https://community.wikia.com/wiki/Thread:499656 
/* https://community.wikia.com/wiki/Help:Collapsing 
/* https://cannabis.wikia.com/wiki/MediaWiki:Wikia.css */

.mw-collapsible .mw-collapsible-toggle {
    float:left;
    margin-left:0;
    margin-right:1em;
}

/* === Long image filenames in categories, etc. === 
/* Long filenames are the default setting on the Commons. Via a default gadget.
/* https://commons.wikimedia.org/wiki/Special:Preferences#mw-prefsection-gadgets 
/* https://commons.wikimedia.org/wiki/Special:Gadgets 
/* https://commons.wikimedia.org/wiki/MediaWiki:Gadget-Long-Image-Names-in-Categories.css 
/* More info: http://www.shoutwiki.com/wiki/Forum:Long_image_names_in_categories */

/* Long filenames on category pages */
#mw-category-media .galleryfilename-truncate,
/* Long filenames on special pages (new files etc.) */
.ns-special .galleryfilename-truncate {
    white-space: normal; 
    overflow: visible;
    display: inline;
}

#mw-category-media .galleryfilename-truncate:after,
.ns-special .galleryfilename-truncate:after {
    content: '\A';
    white-space: pre;
    white-space: pre-wrap; /* Workaround for Chromium bug which seems to apply the rule to the whole line, breaking text wrapping with 'pre' */
}

/* === Easy method of auto numbering of table rows === 
/* Just add class="sortable autonumber" to top line of table wikitext.
/* This is Yair_rand's CSS (slightly adapted). See his CSS and comment: 
/* See https://phabricator.wikimedia.org/T42618#434018 */

  table.autonumber > tbody {
    counter-reset: autonumbering;
  }
  table.autonumber > tbody > tr::before {
    counter-increment: autonumbering;
    content: counter(autonumbering);
  }
  table.autonumber > thead > tr::before {
    content: " ";
  }
  table.autonumber > thead > tr::before, table.autonumber > tbody > tr::before
{
    display: table-cell;
    padding: 0.2em;
    border: 1px solid;
    vertical-align: middle;
    text-align: center;
  }

/* === Automatic row numbering of some tables === 
/* This is the hard method. 
/* This method is no longer used here except in tests, sandboxes, etc.. 
/* This CSS is kept mainly so old revisions work for showing others. 
/* For example: 
/* http://cannabis.shoutwiki.com/w/index.php?title=2014list&oldid=21668 
/* http://cannabis.shoutwiki.com/w/index.php?title=GMMcities&oldid=6398
/* Add class=rownumber to top line of table. 
/* Add class=rownumber-value to first cell in each row. 
/* Info: en.wikipedia.org/wiki/User:Timeshifter/Sandbox33 
/* https://phabricator.wikimedia.org/T42618 */
 
table.rownumber {
        counter-reset: tablerownumber;
}
table.rownumber td.rownumber-value:before {
        content: counter(tablerownumber);
        counter-increment: tablerownumber;
}