Template:TOC/styles.css: Difference between revisions

From Space Station 14 Wiki
(Created page with "→‎hide all links under level 2 header: .toclimit-2 .toclevel-1 ul, →‎hide all links under level 3 header: .toclimit-3 .toclevel-2 ul, →‎hide all links under level 4 header: .toclimit-4 .toclevel-3 ul, →‎hide all links under level 5 header: .toclimit-5 .toclevel-4 ul { display: none; }")
 
(wip)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
.custom-toc {
/* used in the template */
--toc-margin: .5rem;
}
.custom-toc.float-left {
float: left;
margin-right: var(--toc-margin);
}
.custom-toc.float-right {
float: right;
margin-left: var(--toc-margin);
}
/* when on tablet or smaller device, disable float and take up the whole width of the page. */
@media (max-width:801px) {
.custom-toc.float-left,
.custom-toc.float-right {
float: none;
width: 100%;
margin-left: 0;
margin-right: 0;
}
}
/* hide all links under level 2 header */
/* hide all links under level 2 header */
.toclimit-2 .toclevel-1 ul,
.custom-toc.toclimit-2 .toclevel-1 ul,
/* hide all links under level 3 header */
/* hide all links under level 3 header */
.toclimit-3 .toclevel-2 ul,
.custom-toc.toclimit-3 .toclevel-2 ul,
/* hide all links under level 4 header */
/* hide all links under level 4 header */
.toclimit-4 .toclevel-3 ul,
.custom-toc.toclimit-4 .toclevel-3 ul,
/* hide all links under level 5 header */
/* hide all links under level 5 header */
.toclimit-5 .toclevel-4 ul {
.custom-toc.toclimit-5 .toclevel-4 ul {
     display: none;
     display: none;
}
}

Latest revision as of 08:21, 24 August 2024

.custom-toc {
	/* used in the template */
	--toc-margin: .5rem;
}

.custom-toc.float-left {
	float: left; 
	margin-right: var(--toc-margin);
}

.custom-toc.float-right {
	float: right; 
	margin-left: var(--toc-margin);
}

/* when on tablet or smaller device, disable float and take up the whole width of the page. */
@media (max-width:801px) {
	.custom-toc.float-left,
	.custom-toc.float-right {
		float: none;
		width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}


/* hide all links under level 2 header */
.custom-toc.toclimit-2 .toclevel-1 ul,
/* hide all links under level 3 header */
.custom-toc.toclimit-3 .toclevel-2 ul,
/* hide all links under level 4 header */
.custom-toc.toclimit-4 .toclevel-3 ul,
/* hide all links under level 5 header */
.custom-toc.toclimit-5 .toclevel-4 ul {
    display: none;
}