MediaWiki:Gadget-SidebarTOC.css: Difference between revisions

Jump to navigation Jump to search
(Created page with ".floatTOC { transition: 0.2s all ease; display: block; position: fixed; top: 20px; left: 0; border: none; background: #f6f6f6; font-size: 0.8em; max-width: 10em; padding: 1.2em; height: 100%; white-space: nowrap; overflow: hidden; } .floatTOC ul ul { margin: 0 0 0 0.75em; } .floatTOC:hover { max-width: 1000em; overflow: auto; box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); } .floatTOC > * { transition: 0.2s all ease; opacity: 0.5; } .floatTOC:hover > * {...")
 
mNo edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
.floatTOC {
#p-toc {
transition: 0.2s all ease;
    position: sticky;
display: block;
    top: 0.5em;
position: fixed;
top: 20px;
left: 0;
border: none;
background: #f6f6f6;
font-size: 0.8em;
max-width: 10em;
padding: 1.2em;
height: 100%;
white-space: nowrap;
overflow: hidden;
}
}


.floatTOC ul ul {
#p-toc .vector-menu-content-list {
margin: 0 0 0 0.75em;
    max-height: calc(100vh - 3.75em - 12px - var(--sticky-bottom, 0px));
    overflow-y: auto;
    color-scheme: dark;
    scrollbar-width: thin;
    overscroll-behavior: none;
}
}


.floatTOC:hover {
@media (prefers-reduced-motion: no-preference) {
max-width: 1000em;
#p-toc .vector-menu-content-list {
overflow: auto;
scroll-behavior: smooth;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
}
}


.floatTOC > * {
#p-toc .vector-menu-content-list ul {
transition: 0.2s all ease;
    margin-left: 10px;
opacity: 0.5;
}
}


.floatTOC:hover > * {
#p-toc .vector-menu-content-list ul li {
opacity: 1;
    font-size: inherit;
}
}


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


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


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

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;
	}
}