Skip to content

Commit fdcf332

Browse files
authored
Merge pull request #4 from ReDoIngMods/copilot/fix-3
2 parents 8de3c6e + 07ab67d commit fdcf332

2 files changed

Lines changed: 39 additions & 9 deletions

File tree

src/components/ImprovedSearch.astro

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,15 @@ const {
574574
display: block;
575575
padding: 1.25rem 1.5rem;
576576
text-decoration: none;
577-
color: white;
577+
color: white !important;
578578
transition: all 0.2s ease;
579579
border-left: 3px solid transparent;
580580
}
581581

582+
.search-result-link * {
583+
color: inherit !important;
584+
}
585+
582586
.search-result-link:hover {
583587
background-color: rgba(255, 215, 0, 0.1);
584588
border-left-color: var(--sm-yellow);
@@ -589,37 +593,48 @@ const {
589593
display: flex;
590594
flex-direction: column;
591595
gap: 0.5rem;
596+
color: white;
597+
}
598+
599+
.result-content * {
600+
color: inherit !important;
601+
}
602+
603+
/* Ensure all text elements within search results are white */
604+
.search-result-link,
605+
.search-result-link *:not(mark) {
606+
color: white !important;
592607
}
593608

594609
.result-title {
595610
font-weight: 700;
596611
font-size: 1.125rem;
597-
color: var(--sm-yellow);
612+
color: var(--sm-yellow) !important;
598613
line-height: 1.4;
599614
}
600615

601616
.result-url {
602617
font-size: 0.8rem;
603-
color: rgba(255, 255, 255, 0.6);
618+
color: rgba(255, 255, 255, 0.6) !important;
604619
font-family: monospace;
605620
}
606621

607622
.result-snippet {
608623
font-size: 0.9rem;
609-
color: rgba(255, 255, 255, 0.8);
624+
color: rgba(255, 255, 255, 0.8) !important;
610625
line-height: 1.5;
611626
}
612627

613628
.result-matches {
614629
font-size: 0.75rem;
615-
color: rgba(255, 215, 0, 0.7);
630+
color: rgba(255, 215, 0, 0.7) !important;
616631
font-style: italic;
617632
}
618633

619634
.result-snippet mark,
620635
.result-title mark {
621636
background-color: var(--sm-yellow);
622-
color: black;
637+
color: #1a1a1a !important;
623638
padding: 0.125rem 0.25rem;
624639
border-radius: 3px;
625640
font-weight: 600;

src/components/Search.astro

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,14 @@
326326
display: block;
327327
padding: 0.75rem;
328328
text-decoration: none;
329-
color: white;
329+
color: white !important;
330330
transition: background-color 0.2s ease;
331331
}
332332

333+
.search-result-link * {
334+
color: inherit !important;
335+
}
336+
333337
.search-result-link:hover {
334338
background-color: rgba(255, 215, 0, 0.1);
335339
color: white;
@@ -339,12 +343,23 @@
339343
display: flex;
340344
flex-direction: column;
341345
gap: 0.25rem;
346+
color: white;
347+
}
348+
349+
.result-layout * {
350+
color: inherit !important;
351+
}
352+
353+
/* Ensure all text elements within search results are white */
354+
.search-result-link,
355+
.search-result-link *:not(mark) {
356+
color: white !important;
342357
}
343358

344359
.result-title {
345360
font-weight: 600;
346361
font-size: 1rem;
347-
color: var(--sm-yellow);
362+
color: var(--sm-yellow) !important;
348363
}
349364

350365
.result-section { /* This class is no longer used, but kept for now to avoid breaking other things if referenced elsewhere by mistake */
@@ -359,7 +374,7 @@
359374

360375
.result-snippet {
361376
font-size: 0.85rem;
362-
color: rgba(255, 255, 255, 0.7);
377+
color: rgba(255, 255, 255, 0.7) !important;
363378
margin-top: 0.25rem;
364379
line-height: 1.4;
365380
}

0 commit comments

Comments
 (0)