Skip to content

Commit dc12214

Browse files
committed
样式上一些调整,颜色使用主题变量
1 parent fb96af0 commit dc12214

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

styles.css

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ settings:
133133
alt-format:
134134
-
135135
id: floating-toc-highlight-color-rgb
136-
format: rgb-values
136+
format: hsl-values
137137
default: '#ff8000'
138138
-
139139
id: floating-toc-line-color
@@ -299,8 +299,8 @@ settings:
299299
--floating-toc-font-color: var(--text-normal);
300300
--floating-toc-hover-color: var(--text-accent-hover);
301301
--floating-toc-font-size: 0.7rem;
302-
--floating-toc-highlight-color: var(--text-highlight-bg-active);
303-
--floating-toc-highlight-color-rgb: 255, 128, 0;
302+
--floating-toc-highlight-color: var(--text-accent);
303+
--floating-toc-highlight-color-rgb: var(--interactive-accent-hsl);
304304
--floating-toc-line-color: var(--text-accent);
305305
--floating-toc-line-height: 1.5rem;
306306
--floating-toc-response-time: 0.3s;
@@ -312,12 +312,12 @@ settings:
312312

313313
.theme-light {
314314
--floating-toc-header-background-color: var(--background-primary);
315-
--floating-toc-background-color: rgba(221, 221, 221, 0.3);
315+
--floating-toc-background-color: transparent;
316316
}
317317

318318
.theme-dark {
319-
--floating-toc-header-background-color: rgb(32 32 32 / 77%);
320-
--floating-toc-background-color: rgba(32, 32, 32, 0.4);
319+
--floating-toc-header-background-color: var(--background-primary);
320+
--floating-toc-background-color: transparent;
321321
}
322322

323323

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

349349

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

@@ -357,7 +357,9 @@ div.workspace-leaf-content[data-type="style-settings"] div.style-settings-headin
357357
}
358358

359359
.heading-list-item .text-wrap.located .text {
360-
background-color: rgba(var(--floating-toc-highlight-color-rgb), 0.4);
360+
/* background-color: hsla(var(--floating-toc-highlight-color-rgb), 0.4); */
361+
color:var(--color-accent);
362+
font-weight: bold !important;
361363
}
362364

363365
.heading-list-item {
@@ -407,6 +409,7 @@ div.workspace-leaf-content[data-type="style-settings"] div.style-settings-headin
407409
align-items: center;
408410
animation: textAppear-72a6a55b 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
409411
position: relative;
412+
text-wrap: inherit;
410413
}
411414

412415
@keyframes textAppear-72a6a55b {
@@ -425,7 +428,6 @@ div.workspace-leaf-content[data-type="style-settings"] div.style-settings-headin
425428
text-decoration: none;
426429
cursor: pointer;
427430
color: var(--floating-toc-font-color);
428-
backdrop-filter: blur(5px);
429431
background: var(--floating-toc-header-background-color);
430432
}
431433

@@ -570,11 +572,12 @@ body.enable-heading-nowrap .heading-list-item .text-wrap .text {
570572
margin: 0;
571573
padding: 0;
572574
position: absolute;
573-
top: 95px;
575+
top: 100px;
574576
display: flex;
575577
flex-direction: column;
576578
justify-content: flex-start;
577579
bottom: 40px;
580+
border-radius:var(--radius-s);
578581
/* width: 13rem; */
579582
scroll-behavior: smooth;
580583
max-height: calc(100% - 135px);
@@ -736,7 +739,7 @@ body.enable-heading-nowrap .floating-toc:hover .heading-list-item>.text-wrap {
736739

737740
.floating-right.floating-toc-div .toolbar.pin {
738741
right: 10px;
739-
742+
left:unset;
740743
}
741744

742745

@@ -789,10 +792,10 @@ body.enable-heading-nowrap .floating-toc:hover .heading-list-item>.text-wrap {
789792
display: list-item;
790793
opacity: 0.8;
791794
z-index: 2;
792-
background: var(--floating-toc-background-color);
793795
position: fixed;
794796
top: 75px;
795-
margin-left: 10px;
797+
left: 0;
798+
width: 6rem;
796799
}
797800

798801
.floating-toc-div.pin .toolbar.pin {

0 commit comments

Comments
 (0)