MediaWiki:Gadget-vector-headanchor.css

From Wikivoyage
Jump to navigation Jump to search

Note: After publishing, 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 / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/*!
 * Vector HeadAnchors gadget, from <https://mediawiki.org/wiki/MediaWiki:Gadget-vector-headanchor.js>
 *
 * Copyright 2013-2020 Timo Tijhof
 * @license MIT <https://opensource.org/licenses/MIT>
 */
/* Revision as of 2021-01-29 */

/* Use `.mw-body in the selector to apply our padding
   at a higher specificity than Vector's `.mw-body h2` */ 
.mw-body .tpl-vheadanchor-heading {
	overflow: hidden; /* Same as core, set here for sanity since we also depend on it. */
	position: relative;
	left: -17px;
	padding-left: 17px;
}

.tpl-vheadanchor {
	position: absolute;
	left: 0;
	/* padding instead of margin, as otherwise there is a pointer gap between
	  the headline and icon, and thus possible flickering. */
	padding-right: 3px;
	padding-top: 7px;
	width: 14px;
	height: 12px;
}
.tpl-vheadanchor,
.tpl-vheadanchor:hover,
.tpl-vheadanchor:visited,
.tpl-vheadanchor:focus {
	color: inherit;
	text-decoration: none;
	outline: 0;
}

.tpl-vheadanchor-heading:hover .tpl-vheadanchor,
.tpl-vheadanchor-heading .mw-headline:target ~ .tpl-vheadanchor {
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSI3Ij48ZyBmaWxsPSIjNDE0MDQyIj48cGF0aCBkPSJNOS44IDdoLS45bC0uOS0uMWMtLjctLjMtMS40LS43LTEuOC0xLjMtLjItLjEtLjMtLjMtLjMtLjVsLS4zLS40Yy0uMS0uNC0uMi0uOC0uMi0xLjIgMC0uNC4xLS44LjItMS4yaDEuN2MtLjMuNC0uNC44LS40IDEuMiAwIC40LjEuOC4zIDEuMS4xLjIuMi4zLjQuNC4xLjEuMi4yLjQuMy4zLjIuNy4zIDEgLjNoMy40YzEuMiAwIDIuMi0uOSAyLjItMi4xcy0xLTIuMS0yLjItMi4xaC0xLjRjLS4zLS42LS43LTEtMS4yLTEuNGgyLjZjMiAwIDMuNiAxLjYgMy42IDMuNXMtMS42IDMuNS0zLjYgMy41aC0yLjZ6TTguNCAyYy0uMS0uMS0uMi0uMy0uNC0uMy0uMy0uMi0uNy0uMy0xLS4zaC0zLjRjLTEuMiAwLTIuMi45LTIuMiAyLjEgMCAxLjIgMSAyLjEgMi4yIDIuMWgxLjRjLjMuNS43IDEgMS4yIDEuNGgtMi42Yy0yIDAtMy42LTEuNi0zLjYtMy41czEuNi0zLjUgMy42LTMuNWgzLjUwMDAwMDAwMDAwMDAwMDRsLjkuMWMuNy4yIDEuNC43IDEuOCAxLjMuMS4xLjIuMy4zLjUuMS4xLjIuMy4yLjUuMS40LjIuOC4yIDEuMiAwIC40LS4xLjgtLjIgMS4yaC0xLjZjLjMtLjUuNC0uOS40LTEuM3MtLjEtLjgtLjMtMS4xYy0uMS0uMi0uMi0uMy0uNC0uNHoiLz48L2c+PC9zdmc+);
}