From b1b615b7e1c4f960236d2a4d88b5afa433bd49eb Mon Sep 17 00:00:00 2001 From: Daniel O'Connell Date: Wed, 21 Feb 2024 21:06:09 +0100 Subject: [PATCH] Use vars in css --- app/components/Article/article.css | 7 +-- app/components/ArticlesDropdown/dropdown.css | 20 ++----- app/components/ArticlesDropdown/index.tsx | 9 +-- app/components/ArticlesNav/Menu.tsx | 55 +++++++++---------- app/components/ArticlesNav/menu.css | 40 ++------------ app/components/Button/button.css | 23 ++++---- app/components/CategoriesNav/Menu.tsx | 7 +-- app/components/ContentBox/box.css | 2 +- app/components/Footer/footer.css | 44 +-------------- app/components/Footer/index.tsx | 2 +- app/components/Grid/grid.css | 12 +--- app/components/Grid/index.tsx | 2 +- app/components/Menu/index.tsx | 2 +- app/components/Menu/menuItem.css | 7 +-- app/components/Nav/nav.css | 2 +- app/components/SearchInput/Input.tsx | 7 +-- app/components/SearchInput/input.css | 58 +++----------------- app/components/SearchResults/Dropdown.tsx | 6 +- app/components/SearchResults/dropdown.css | 41 +------------- app/components/Table/listTable.module.css | 8 +-- app/components/Widget/stampy.css | 2 +- app/components/pageHeaderText.css | 17 ------ app/components/pageSubheaderText.css | 10 ---- app/newRoot.css | 12 ++-- 24 files changed, 97 insertions(+), 298 deletions(-) delete mode 100644 app/components/pageHeaderText.css delete mode 100644 app/components/pageSubheaderText.css diff --git a/app/components/Article/article.css b/app/components/Article/article.css index c6dde0c8..3abd0b15 100644 --- a/app/components/Article/article.css +++ b/app/components/Article/article.css @@ -72,9 +72,8 @@ article .link-popup { font-style: normal; font-weight: 300; line-height: 170%; /* 30.6px */ - margin-left: 10px; z-index: 2; - transform: translate(-20vw, 40px); + transform: translate(-20vw, var(--spacing-40)); transition: visibility 0s 300ms, opacity cubic-bezier(1, 0, 1, 1) 300ms; @@ -97,8 +96,8 @@ article .defintion { } article .link-popup .glossary-popup > img { width: 100%; - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; + border-top-right-radius: var(--border-radius); + border-bottom-right-radius: var(--border-radius); } article .link-popup.shown { diff --git a/app/components/ArticlesDropdown/dropdown.css b/app/components/ArticlesDropdown/dropdown.css index ea96c50e..7a9c94fc 100644 --- a/app/components/ArticlesDropdown/dropdown.css +++ b/app/components/ArticlesDropdown/dropdown.css @@ -6,29 +6,19 @@ .articles-dropdown-container { z-index: 100; - position: absolute; - padding: 56px; - - background-color: #fff; - width: 756px; top: 80px; - left: 300px; + position: absolute; + padding: var(--spacing-56); justify-content: space-between; display: flex; transition: visibility 0.2s; visibility: hidden; } + .articles-dropdown-title.top-margin-large { - margin-top: 56px; + margin-top: var(--spacing-56); } .articles-dropdown-entry { - margin: 12px 0; -} -.articles-dropdown-teal-entry { - color: var(--colors-teal-500); -} -.dropdown-button { - padding: 7px 17px; - font-size: 16px; + margin: var(--spacing-12) 0; } diff --git a/app/components/ArticlesDropdown/index.tsx b/app/components/ArticlesDropdown/index.tsx index 2e1efefd..5e6e5fd7 100644 --- a/app/components/ArticlesDropdown/index.tsx +++ b/app/components/ArticlesDropdown/index.tsx @@ -49,7 +49,7 @@ export const ArticlesDropdown = ({toc, categories}: ArticlesDropdownProps) => { ) return shown ? null : ( -
+
@@ -63,12 +63,7 @@ export const ArticlesDropdown = ({toc, categories}: ArticlesDropdownProps) => { ?.sort(sortFuncs['by number of questions']) .slice(0, 12) .map((tag) => ( - + ))}