MediaWiki:CollapsibleTree.css

From The Seven Sages of Rome
Revision as of 09:05, 13 January 2026 by Noeth (talk | contribs) (Created page with ".collapsible-tree > ul { margin: 0; padding-left: 25px; list-style: none; line-height: 2em; } .collapsible-tree > ul li { position: relative; } .collapsible-tree > ul li::before, .collapsible-tree > ul li::after { content: ""; position: absolute; left: -15px; border-left: 1px dashed #999; } .collapsible-tree > ul li::before { top: 0; width: 15px; height: 1em; border-bottom: 1px dashed #999; } Hide vertical line for first item: .collapsi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.
.collapsible-tree > ul {
  margin: 0;
  padding-left: 25px;
  list-style: none;
  line-height: 2em;
}

.collapsible-tree > ul li {
  position: relative;
}

.collapsible-tree > ul li::before,
.collapsible-tree > ul li::after {
  content: "";
  position: absolute;
  left: -15px;
  border-left: 1px dashed #999;
}

.collapsible-tree > ul li::before {
  top: 0;
  width: 15px;
  height: 1em;
  border-bottom: 1px dashed #999;
}

/* Hide vertical line for first item */
.collapsible-tree > ul > li:first-child::before {
  border-left: none;
}

.collapsible-tree > ul li::after {
  top: 1.1em;
  bottom: 1px;
}

/* Hide lines for last item */
.collapsible-tree > ul li:last-child::after {
  display: none;
}

/* Toggle icon (inserted via JS) */
.js-toggle-icon {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 14px;
  margin: 0 2px 0 -23px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
  font-style: normal;
  background-color: #fff;
  border: 1px solid #666;
  border-radius: 2px;
}