MediaWiki:Archlinux.css

From ArchWiki
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.
/*
 * References:
 * https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/skins
 * http://www.mediawiki.org/wiki/Manual:Interface/Stylesheets
 */

/*
 * Bugfix: the search results are floated by default, but the Archlinux skin conflicts with the setting
 * https://phabricator.wikimedia.org/T122499
 */
.mw-search-results {
    float: none;
}

/*
 * Keep it simple, use the same icon for all external links
 * Basically always apply https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/skins/archlinux/main.css#n150
 * and override https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/skins/archlinux/arch.css#n68
 * Also a workaround for FS#38769
 */

#bodyContent a.external[href],
#bodyContent a.extiw,
.link-https {
	background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTMiIHdpZHRoPSIxMyIgdmVyc2lvbj0iMS4xIiB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzYuNDY3ODA4LC0yNTguMzkwMDUpIj4KPHBhdGggc3R5bGU9Im9wYWNpdHk6MTtmaWxsOiMzMzY2YmI7IiBkPSJtNDEuNDcsMjU5LjQsNywwLDAsNy0yLTItMywyLDAtMSwzLTIuMjUsMSwxLDAtMy43NS0zLjc1LDAsMSwxLTIuMjUsMy0xLDAsMi0zeiIvPgo8cGF0aCBzdHlsZT0ib3BhY2l0eToxO2ZpbGw6IzMzNjZiYjsiIGQ9Im00My40NywyNjEuNC01LDAsMCw4LDgsMCwwLTUtMSwwLDAsNC02LDAsMC02LDQsMHoiLz4KPHBhdGggc3R5bGU9Im9wYWNpdHk6MTtmaWxsOiMxNWE1ZWE7IiBkPSJtNDAuNTUsMjYzLjljMC0wLjYyMTMsMC42MjEzLTAuNjIxMywwLjYyMTMtMC42MjEzLDEuODY0LDAuNjIxMywzLjEwNywxLjg2NCwzLjcyOCwzLjcyOCwwLDAsMCwwLjYyMTMtMC42MjEzLDAuNjIxMy0xLjI0My0xLjg2NC0xLjg2NC0yLjQ4NS0zLjcyOC0zLjcyOHoiLz4KPC9nPgo8L3N2Zz4K") center right no-repeat;
	padding-right: 13px;
}

/*
 * Still exclude 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;
}

/*
 * Override link colors in a consistent way
 */

a:link,
#toc a,
/* In https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/skins/archlinux/arch.css
 * there's a double id, so this is the only way to override it...
 */
#bodyContent #toc a,
#p-cactions li a,
#p-personal li a,
#p-cactions li a:visited,
#p-personal li a:visited,
#bodyContent a.external,
#bodyContent a.extiw {
    color: #07b;
}

a:hover,
#toc a:hover,
/* In https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/skins/archlinux/arch.css
 * there's a double id, so this is the only way to override it...
 */
#bodyContent #toc a:hover,
#p-cactions li a:hover,
#p-personal li a:hover,
#p-cactions li a:visited:hover,
#p-personal li a:visited:hover,
#bodyContent a:hover.external,
#bodyContent a:hover.extiw {
    color: #07b;
    text-decoration: underline;
}

a:visited,
#toc a:visited,
/* In https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/skins/archlinux/arch.css
 * there's a double id, so this is the only way to override it...
 */
#bodyContent #toc a:visited,
#bodyContent a:visited.external,
#bodyContent a:visited.extiw {
    color: #357;
}

a:visited:hover,
#toc a:visited:hover,
/* In https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/skins/archlinux/arch.css
 * there's a double id, so this is the only way to override it...
 */
#bodyContent #toc a:visited:hover,
#bodyContent a:visited:hover.external,
#bodyContent a:visited:hover.extiw {
    color: #357;
    text-decoration: underline;
}

a:focus,
a:active,
#toc a:focus,
#toc a:active,
/* In https://projects.archlinux.org/vhosts/wiki.archlinux.org.git/tree/skins/archlinux/arch.css
 * there's a double id, so this is the only way to override it...
 */
#bodyContent #toc a:focus,
#bodyContent #toc a:active,
#p-cactions li a:focus,
#p-cactions li a:active,
#p-personal li a:focus,
#p-personal li a:active,
#bodyContent a:focus.external,
#bodyContent a:active.external,
#bodyContent a:focus.extiw,
#bodyContent a:active.extiw {
    color: #e90 !important;
}

a.new,
#p-cactions .new a,
#p-personal a.new {
    color: #b00 !important;
}

/* Override monospace text style */

code, tt {
    /* Address https://wiki.archlinux.org/index.php?title=Help_talk:Template&oldid=431890#Problems_with_Template:ic
     * Let inline code (including [[Template:ic]], which uses <code>) wrap correctly
     * The Firefox-only triple-click feature given by display:inline-block must be sacrificed
     * Override https://github.com/archlinux/archwiki/blob/master/extensions/ArchLinux/modules/arch_common.less#L32
     */
    display: inline;
    white-space: pre;
    padding: 0.3em;
}