From b8f5d669fe400989083878c44406251fd8b495fd Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 28 Nov 2023 23:04:20 -0500 Subject: [PATCH] Improve styling of search results --- app/components/DocumentListItem.tsx | 4 ++-- app/components/Highlight.tsx | 7 +++---- app/scenes/Search/components/SearchInput.tsx | 5 +++-- app/typings/styled-components.d.ts | 1 - shared/styles/theme.ts | 1 - 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/components/DocumentListItem.tsx b/app/components/DocumentListItem.tsx index 9f220f76e..1b8862952 100644 --- a/app/components/DocumentListItem.tsx +++ b/app/components/DocumentListItem.tsx @@ -260,8 +260,8 @@ const Title = styled(Highlight)` const ResultContext = styled(Highlight)` display: block; - color: ${s("textTertiary")}; - font-size: 14px; + color: ${s("textSecondary")}; + font-size: 15px; margin-top: -0.25em; margin-bottom: 0.25em; `; diff --git a/app/components/Highlight.tsx b/app/components/Highlight.tsx index f57e7135f..d071dc6d7 100644 --- a/app/components/Highlight.tsx +++ b/app/components/Highlight.tsx @@ -2,7 +2,6 @@ import escapeRegExp from "lodash/escapeRegExp"; import * as React from "react"; import replace from "string-replace-to-array"; import styled from "styled-components"; -import { s } from "@shared/styles"; type Props = React.HTMLAttributes & { highlight: (string | null | undefined) | RegExp; @@ -44,9 +43,9 @@ function Highlight({ } export const Mark = styled.mark` - background: ${s("searchHighlight")}; - border-radius: 2px; - padding: 0 2px; + color: inherit; + background: transparent; + font-weight: 600; `; export default Highlight; diff --git a/app/scenes/Search/components/SearchInput.tsx b/app/scenes/Search/components/SearchInput.tsx index d645b9c1c..2487d9600 100644 --- a/app/scenes/Search/components/SearchInput.tsx +++ b/app/scenes/Search/components/SearchInput.tsx @@ -33,7 +33,7 @@ function SearchInput( return ( - +