From 2b5c38dc7cc6f241f2561c560c913ff711650bca Mon Sep 17 00:00:00 2001 From: Artur Janas Date: Tue, 22 Aug 2023 13:37:53 +0100 Subject: [PATCH] chore: improve styling --- src/components/GlossarySearch/GlossaryCard.css | 11 ++++------- src/components/GlossarySearch/GlossaryCard.tsx | 14 ++++++-------- .../GlossaryTermPage/GlossaryTermPage.css | 17 +++++++++++------ .../GlossaryTermPage/GlossaryTermPageAside.tsx | 8 ++------ 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/components/GlossarySearch/GlossaryCard.css b/src/components/GlossarySearch/GlossaryCard.css index d6507a36..e1c46a88 100644 --- a/src/components/GlossarySearch/GlossaryCard.css +++ b/src/components/GlossarySearch/GlossaryCard.css @@ -3,19 +3,19 @@ .glossary-term__card { display: flex; flex-direction: column; + justify-content: space-between; gap: .5rem; - padding: 1rem; + padding: 1rem 1.5rem; border: 1px solid var(--border-color); border-radius: 8px; transition: all 0.2s ease-in-out; - background-color: var(--nu10); border: 1px solid var(--border-light); } .glossary-term__card-title { font-size: 1.5rem; - margin-bottom: 0; + margin-bottom: .5rem; font-weight: bold; display: flex; gap: 0.5rem; @@ -30,7 +30,7 @@ } .glossary-term__card:hover { - background-color: #eeeef7; + background-color: #fafafa; transform: translateY(-.25rem) scale(1.02); } @@ -44,7 +44,6 @@ background-position: 0 0; display: inline; transition: .2s ease-in; - padding-left: 1.5rem; } @@ -57,8 +56,6 @@ align-items: center; gap: 0.325rem; width: fit-content; - padding-left: 1.5rem; - } .glossary-term__card-link:hover .arrow-icon { diff --git a/src/components/GlossarySearch/GlossaryCard.tsx b/src/components/GlossarySearch/GlossaryCard.tsx index 1ed7e320..1ee1a7a3 100644 --- a/src/components/GlossarySearch/GlossaryCard.tsx +++ b/src/components/GlossarySearch/GlossaryCard.tsx @@ -2,18 +2,16 @@ import React from 'react'; import { GlossaryTermType } from './index'; import './GlossaryCard.css'; import ArrowIcon from '../icons/ArrowIcon'; -import BookIcon from '../icons/BookIcon'; const GlossaryTerm = ({ term }: { term: GlossaryTermType }) => (
-
-

- - {term.termTitle} -

-
+
+
+

{term.termTitle}

+
-
{term.definition}
+
{term.definition}
+
{term.slug && ( ( );