From 9ff1fdd280f4b4c554f1bddfa51689fcb1576558 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Fri, 02 Feb 2024 18:52:51 +0000
Subject: [PATCH] fix(search): oops restore ability to preview on hover lol

---
 quartz/components/styles/search.scss |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/quartz/components/styles/search.scss b/quartz/components/styles/search.scss
index 8703399..9cc85df 100644
--- a/quartz/components/styles/search.scss
+++ b/quartz/components/styles/search.scss
@@ -83,11 +83,14 @@
       }
 
       & > #search-layout {
-        display: flex;
+        display: none;
         flex-direction: row;
-        visibility: hidden;
         border: 1px solid var(--lightgray);
 
+        &.display-results {
+          display: flex;
+        }
+
         @media all and (min-width: $tabletBreakpoint) {
           &[data-preview] {
             & .result-card > p.preview {
@@ -114,7 +117,8 @@
         }
 
         @media all and (max-width: $tabletBreakpoint) {
-          display: block;
+          display: block !important;
+
           & > *:not(#results-container) {
             display: none !important;
           }
@@ -128,6 +132,7 @@
         & .highlight {
           background: color-mix(in srgb, var(--tertiary) 60%, transparent);
           border-radius: 5px;
+          scroll-margin-top: 2rem;
         }
 
         & > #preview-container {
@@ -138,7 +143,7 @@
           font-family: inherit;
           color: var(--dark);
           line-height: 1.5em;
-          font-weight: 400;
+          font-weight: $normalWeight;
           background: var(--light);
           border-top-right-radius: 5px;
           border-bottom-right-radius: 5px;
@@ -149,10 +154,6 @@
             margin: 0 auto;
             width: min($pageWidth, 100%);
           }
-
-          a.internal {
-            background-color: none;
-          }
         }
 
         & > #results-container {
@@ -178,6 +179,7 @@
             outline: none;
             font-weight: inherit;
 
+            &:hover,
             &:focus,
             &.focus {
               background: var(--lightgray);
@@ -198,7 +200,7 @@
               padding: 0.2rem 0.4rem;
               margin: 0 0.1rem;
               line-height: 1.4rem;
-              font-weight: bold;
+              font-weight: $boldWeight;
               color: var(--secondary);
 
               &.match-tag {

--
Gitblit v1.10.0