MediaWiki:CollapsibleTree.css
From The Seven Sages of Rome
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;
}