Skip to content

Commit ffda053

Browse files
committed
chore: fix some issues in dark mode and more
1 parent c7895f3 commit ffda053

File tree

1 file changed

+47
-36
lines changed

1 file changed

+47
-36
lines changed

custom.css

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
--ct-guideline-size: 2px;
4646
--ct-guideline-style: solid;
4747

48+
--ct-sidebar-resizer-background: var(--ls-secondary-background-color);
49+
--ct-sidebar-resizer-background-hover: var(--ls-secondary-background-color);
50+
4851
--ct-bullet-size: 6px;
4952
--ct-bullet-color: var(--ct-bold-color);
5053

@@ -87,7 +90,7 @@ body {
8790

8891
/* Right Sidebar card */
8992
.cp__right-sidebar-inner {
90-
--sidebar-padding: 1rem;
93+
--ct-sidebar-padding: 0.5rem;
9194
}
9295

9396
.cp__right-sidebar.is-open {
@@ -96,8 +99,8 @@ body {
9699

97100
.cp__right-sidebar .sidebar-item {
98101
border-radius: var(--ct-sidebar-item-border-radius);
99-
margin: var(--sidebar-padding) 0;
100-
background: var(--ct-background);
102+
margin: var(--ct-sidebar-padding) 0;
103+
background: transparent;
101104
border-radius: var(--ct-card-radius);
102105
box-shadow: none;
103106
}
@@ -141,24 +144,30 @@ body {
141144

142145
.cp__right-sidebar-inner .resizer {
143146
background: var(--ct-sidebar-resizer-background);
144-
width: var(--sidebar-padding);
147+
width: var(--ct-sidebar-padding);
145148
touch-action: none;
146149
z-index: 2000;
150+
opacity: 0.4;
147151
}
148152

149153
.cp__right-sidebar-inner .resizer:hover {
150-
background: var(--ls-secondary-background-color);
154+
background: var(--ct-sidebar-resizer-background-hover);
151155
opacity: 0.6;
152156
}
153157

154158
.page {
155159
margin-top: 0;
156160
}
157161

158-
.cp__right-sidebar {
162+
.cp__right-sidebar,
163+
.cp__sidebar-main-layout {
159164
background-color: transparent;
160165
}
161166

167+
.theme-inner {
168+
background: var(--ls-primary-background-color);
169+
}
170+
162171
/* Heading & Page title */
163172
h1.title {
164173
margin-top: 8px;
@@ -508,15 +517,22 @@ samp {
508517
margin-top: 0.5rem;
509518
}
510519

520+
/* Query title margin */
511521
.block-body .custom-query > .flex > div,
512-
#today-queries .custom-query > .flex > div,
513-
.dsl-query .custom-query > .flex > div {
522+
#today-queries .custom-query > .flex > div:first-of-type,
523+
.dsl-query .custom-query > .flex > div:first-of-type {
514524
padding: 12px 0;
515525
}
516526

517-
.dsl-query > .custom-query .foldable-title .opacity-70,
518-
#today-queries > .custom-query .foldable-title .opacity-70,
519-
.block-body > .custom-query .foldable-title .opacity-70 {
527+
:is(#today-queries > div > div, .dsl-query .custom-query > .flex)
528+
> div.initial {
529+
margin-bottom: 12px;
530+
}
531+
532+
:is(.dsl-query, #today-queries, .block-body)
533+
> .custom-query
534+
.foldable-title
535+
.opacity-70 {
520536
display: block;
521537
opacity: 1;
522538
padding: 5px 10px 2px 10px !important;
@@ -551,11 +567,7 @@ samp {
551567
border-radius: 8px;
552568
overflow: hidden;
553569
background: var(--ls-secondary-background-color);
554-
555-
--tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
556-
0 10px 10px -5px rgba(0, 0, 0, 0.04);
557-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
558-
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
570+
box-shadow: 8px 8px #000;
559571
}
560572

561573
.tippy-wrapper,
@@ -589,6 +601,10 @@ samp {
589601
min-width: 450px;
590602
}
591603

604+
.tippy-popper .arrow-regular {
605+
display: none; /* Hide the arrow */
606+
}
607+
592608
/* FIXME: this is a hack to remove scroll passed to scroll bottom issue */
593609
.tippy-popper[style*="visibility: hidden"] {
594610
display: none;
@@ -610,26 +626,22 @@ a.tag:hover {
610626

611627
/* Page preview title */
612628
.tippy-wrapper > h2:first-of-type {
613-
display: inline-block;
614-
align-self: flex-start;
629+
display: inline-flex;
630+
align-items: center;
615631
position: absolute;
616632
left: -0.5em;
617633
top: -0.75em;
618634
z-index: 2;
619-
padding: 5px 10px 2px 10px !important;
635+
padding: 2px 1em 2px 1em !important;
620636
background: var(--ct-query-header-background);
621637
white-space: nowrap;
622638
font-family: var(--ct-page-title-font-family);
623639
font-weight: 600;
624640
color: var(--ct-query-header-color);
625641
font-style: var(--ct-inline-code-font-style) !important;
626-
border-radius: var(--ct-inline-code-border-radius);
627-
642+
border: 2px solid #000;
643+
border-radius: 4px;
628644
text-shadow: 1px 1px 0px black, 1px 1px 1px rgb(136, 136, 136);
629-
--tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
630-
0 10px 10px -5px rgba(0, 0, 0, 0.04);
631-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
632-
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
633645
}
634646

635647
.white-theme,
@@ -640,7 +652,7 @@ html[data-theme="light"] {
640652
--ct-success-color: #0dcf82;
641653
--ct-highlight-color: #ffc600;
642654

643-
--ls-primary-background-color: transparent;
655+
--ls-primary-background-color: #fff;
644656
--ls-secondary-background-color: #f7f6f4;
645657
--ls-tertiary-background-color: #f1eee8;
646658
--ls-quaternary-background-color: #e8e5de;
@@ -662,9 +674,6 @@ html[data-theme="light"] {
662674
--ct-bullet-closed-color: rgb(200, 200, 200);
663675
--ct-block-arrow-color: rgb(98, 98, 98);
664676

665-
--ct-sidebar-resizer-background: none;
666-
--ct-sidebar-resizer-background-hover: #e1e1e1;
667-
668677
--ct-page-reference-color: var(--ls-active-primary-color);
669678

670679
--ct-mark-background: var(--ct-highlight-color);
@@ -678,14 +687,19 @@ html[data-theme="light"] {
678687
--ls-page-properties-background-color: var(--ls-secondary-background-color);
679688
}
680689

681-
html[data-theme="light"] body {
690+
#app-container::before {
691+
content: "";
692+
top: 0;
693+
left: 0;
694+
right: 0;
695+
bottom: 0;
696+
position: absolute;
682697
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACHSURBVHgB7ddRCgIhFIbRa8wK3EH731OtQLdQCIUPDUP2IDidA4Lov4EvAoC11Frv7dhHXAIAAGAOLdZpMQAAYBYt1mkxAABgFi3WaTEAAOBHpZTUzt7ftvf47pKc8zW+sPo+pXR7XT/2W9A8AgAA/t5RW43uT9liR201uj9ri422lRYDWNETCUrqfCW92rQAAAAASUVORK5CYII=)
683698
repeat;
684699
}
685700

686-
html[data-theme="light"]
687-
:is(.search-ac, .absolute-modal, .bg-base-3, .dropdown-wrapper) {
688-
background-color: #fff;
701+
html[data-theme="dark"] #app-container::before {
702+
opacity: 0.05;
689703
}
690704

691705
.dark-theme,
@@ -720,9 +734,6 @@ html[data-theme="dark"] {
720734
--ct-bullet-closed-color: #555;
721735
--ct-block-arrow-color: rgb(165, 165, 165);
722736

723-
--ct-sidebar-resizer-background: none;
724-
--ct-sidebar-resizer-background-hover: #2c2c2c;
725-
726737
--ct-page-reference-color: var(--ls-active-primary-color);
727738

728739
--ct-mark-background: var(--ct-highlight-color);

0 commit comments

Comments
 (0)