MediaWiki:Gadget-StickyToC.css

From SourceWorlds Wiki
Revision as of 01:34, 20 October 2026 by Vizzys (talk | contribs) (Created page with "#p-toc { position: sticky; top: 0; } #p-toc .vector-menu-content-list { max-height: clamp(180px, calc(100vh - 680px), 600px); overflow-y: auto; scrollbar-width: thin; overscroll-behavior: none; } @media (prefers-reduced-motion: no-preference) { #p-toc .vector-menu-content-list { scroll-behavior: smooth; } } #p-toc .vector-menu-content-list ul { margin-left: 10px; } #p-toc .vector-menu-content-list ul li { font-size: inherit; } #p-toc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
#p-toc {
    position: sticky;
	top: 0;
}

#p-toc .vector-menu-content-list {
    max-height: clamp(180px, calc(100vh - 680px), 600px);
    overflow-y: auto;
    scrollbar-width: thin;
    overscroll-behavior: none;
}

@media (prefers-reduced-motion: no-preference) {
	#p-toc .vector-menu-content-list {
		scroll-behavior: smooth;
	}
}

#p-toc .vector-menu-content-list ul {
    margin-left: 10px;
}

#p-toc .vector-menu-content-list ul li {
    font-size: inherit;
}

#p-toc .tocsection-current > a {
	font-weight: bold;
	text-decoration: underline;
}

#p-toc .tocnumber {
    color: white;
    display: none; /* they take up too much space */
}


#p-toc .toctext {
  padding-left: 0px !important;
}

#p-toc li {
  padding: 0.15em 0 !important;
}

#p-toc ul {
  margin-left: 0.3em !important;
}

#p-toc ul {
  list-style-position: outside !important;
  margin: 0 !important;
  padding-left: 8px !important;
}

#p-toc .toclevel-1 {
  list-style-type: none !important;
}