Emoji u1f384.svg
Merry Christmas from the IIWiki Team! Have a happy new year!

MediaWiki:Gadget-SidebarTOC.css: Difference between revisions

Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
.mw-table-of-contents-container {
#p-toc {
    position: -webkit-sticky;
     position: sticky;
     position: sticky;
     top: 20px; /* Adjust as needed */
     top: 0.5em;
     height: calc(100vh - 20px); /* Adjust as needed */
}
 
#p-toc .vector-menu-content-list {
     max-height: calc(100vh - 3.75em - 12px - var(--sticky-bottom, 0px));
     overflow-y: auto;
     overflow-y: auto;
    color-scheme: dark;
    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;
}
/* Customize the styling of the current section in the table of contents */
#p-toc .tocsection-current a {
    color: black; /* Set text color to black */
    font-weight: bold; /* Make the text bold */
}
#p-toc .tocnumber {
    color: white;
    display: none; /* they take up too much space */
}
}


.vector-sticky-toc-container {
@media screen and (max-width: 720px) {
    padding: 10px; /* Adjust as needed */
#p-toc {
    background-color: #f8f9fa; /* Adjust as needed */
    display: none;
    border: 1px solid #c8ccd1; /* Adjust as needed */
}
}
}

Latest revision as of 22:08, 22 February 2024

#p-toc {
    position: sticky;
    top: 0.5em;
}

#p-toc .vector-menu-content-list {
    max-height: calc(100vh - 3.75em - 12px - var(--sticky-bottom, 0px));
    overflow-y: auto;
    color-scheme: dark;
    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;
}

/* Customize the styling of the current section in the table of contents */
#p-toc .tocsection-current a {
    color: black; /* Set text color to black */
    font-weight: bold; /* Make the text bold */
}

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

@media screen and (max-width: 720px) {
	#p-toc {
    	display: none;
	}
}