Skip to content

Commit 887576e

Browse files
committed
#129 #125 fixed
1 parent c126d42 commit 887576e

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

styles.css

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,13 @@ settings:
311311
}
312312

313313
.theme-light {
314-
--floating-toc-header-background-color: var(--background-primary);
315-
--floating-toc-background-color: transparent;
314+
--floating-toc-header-background-color: transparent;
315+
--floating-toc-background-color: var(--background-secondary);
316316
}
317317

318318
.theme-dark {
319-
--floating-toc-header-background-color: var(--background-primary);
320-
--floating-toc-background-color: transparent;
319+
--floating-toc-header-background-color: transparent;
320+
--floating-toc-background-color: var(--background-secondary);
321321
}
322322

323323

@@ -348,8 +348,8 @@ div.workspace-leaf-content[data-type="style-settings"] div.style-settings-headin
348348

349349

350350
.heading-list-item.located .line-wrap .line {
351-
background: hsla(var(--floating-toc-highlight-color-rgb), 0.8);
352-
height: 2.5px;
351+
background: hsla(var(--floating-toc-highlight-color-rgb), 1);
352+
height: 4px;
353353
}
354354

355355
.heading-list-item.located .text-wrap:not(.located) .text {
@@ -583,8 +583,12 @@ body.enable-heading-nowrap .heading-list-item .text-wrap .text {
583583
max-height: calc(100% - 135px);
584584
left: var(--floating-toc-position);
585585
padding-top: 0.5rem;
586+
padding-bottom: 0.5rem;
586587
-ms-overflow-style: none;
587588
scrollbar-width: none;
589+
590+
min-height: max-content;
591+
z-index: 2;
588592
}
589593

590594
.floating-toc-div.pin .floating-toc,
@@ -598,6 +602,10 @@ body.enable-heading-nowrap .heading-list-item .text-wrap .text {
598602
background: var(--floating-toc-background-color);
599603
}
600604

605+
.floating-toc-div.pin .floating-toc {
606+
background: var(--floating-toc-header-background-color);
607+
}
608+
601609
.floating-toc-div.pin .floating-toc::-webkit-scrollbar,
602610
.floating-toc:hover::-webkit-scrollbar {
603611
display: none;
@@ -612,6 +620,11 @@ body:not(.enable-heading-nowrap) .floating-toc:hover .heading-list-item {
612620
.floating-toc-div:is(.hover, .pin) .floating-toc .heading-list-item {
613621
padding: 0 1rem;
614622
}
623+
.floating-toc-div:is(.hover, .pin) .floating-toc{
624+
min-height: auto;
625+
height: fit-content;
626+
border: 1px solid var(--background-modifier-border);
627+
}
615628

616629
.floating-toc-div.pin .floating-toc .heading-list-item {
617630
max-width: fit-content;
@@ -684,7 +697,7 @@ body.enable-heading-nowrap .floating-toc:hover .heading-list-item>.text-wrap {
684697

685698

686699

687-
.workspace-leaf-content .floating-toc-div.floating-right~.markdown-reading-view {
700+
.workspace-leaf-content .floating-toc-div.floating-right~.markdown-reading-view .markdown-preview-view{
688701
padding-right: 2rem;
689702

690703
}
@@ -1266,7 +1279,7 @@ body.toggle-floating-toc-header-color .floating-toc-div .floating-toc .heading-l
12661279

12671280
/**************/
12681281

1269-
.enable-bar-icon .floating-toc-div:not(.hover) .floating-toc:before {
1282+
.enable-bar-icon .floating-toc-div:not(.hover) .floating-toc:has(>.heading-list-item)::before {
12701283
content: '';
12711284
height: 12px;
12721285
z-index: 10;

0 commit comments

Comments
 (0)