From 421d4064e14ef580bedb7a77e6b4269ebda72a17 Mon Sep 17 00:00:00 2001 From: Sandy McFadden Date: Fri, 30 Jul 2021 12:59:02 -0300 Subject: [PATCH 1/4] Start of updating note list components to use CSS variables for colors --- lib/note-list/index.tsx | 4 +-- lib/note-list/no-notes.tsx | 2 +- lib/note-list/note-cell.tsx | 8 ++--- lib/note-list/style.scss | 59 +++++++++++++++++++++---------------- scss/theme.scss | 45 ---------------------------- 5 files changed, 41 insertions(+), 77 deletions(-) diff --git a/lib/note-list/index.tsx b/lib/note-list/index.tsx index d39f1842f..efc007fed 100644 --- a/lib/note-list/index.tsx +++ b/lib/note-list/index.tsx @@ -74,7 +74,7 @@ const renderNote = ( rowIndex={index} >
- No Notes + No Notes
); @@ -310,7 +310,7 @@ export class NoteList extends Component { const isEmptyList = compositeNoteList.length === 0; const emptyTrashButton = ( -
+
-
+
{hasPendingChanges && ( Date: Fri, 30 Jul 2021 13:43:48 -0300 Subject: [PATCH 2/4] Fix search results colors --- lib/note-list/style.scss | 2 +- lib/tag-suggestions/style.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/note-list/style.scss b/lib/note-list/style.scss index fd0f1946e..cd9c7fba2 100644 --- a/lib/note-list/style.scss +++ b/lib/note-list/style.scss @@ -60,7 +60,7 @@ height: 100vh; } - .search-match { + .note-list-item .search-match { background-color: transparent; color: var(--accent-color); padding-left: 0; diff --git a/lib/tag-suggestions/style.scss b/lib/tag-suggestions/style.scss index 295efc58e..9d2314067 100644 --- a/lib/tag-suggestions/style.scss +++ b/lib/tag-suggestions/style.scss @@ -5,7 +5,7 @@ list-style-type: none; padding: 0; margin: 0; - border-bottom: 1px solid; + border-bottom: 1px solid var(--secondary-color); .tag-suggestion-row { height: 36px; From b55d4681a1b6e698aeed24aee8c1dd672912a310 Mon Sep 17 00:00:00 2001 From: Sandy McFadden Date: Fri, 30 Jul 2021 13:59:13 -0300 Subject: [PATCH 3/4] Fix CSS linting error --- lib/note-list/style.scss | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/lib/note-list/style.scss b/lib/note-list/style.scss index cd9c7fba2..b3dd38437 100644 --- a/lib/note-list/style.scss +++ b/lib/note-list/style.scss @@ -169,23 +169,6 @@ color: var(--foreground-color); } - .note-list-item-title { - color: var(--primary-color); - } - - &.note-list-item-selected { - background: var(--highlight-color); - - .note-list-item-excerpt { - color: var(--primary-color); - } - - .note-list-item-pending-changes, - .note-list-item-published-icon { - color: var(--primary-color); - } - } - &:not(.note-list-item-pinned):hover .note-list-item-pinner { color: var(--foreground-color); } @@ -234,6 +217,7 @@ justify-content: space-between; font-size: 16px; font-weight: 500; + color: var(--primary-color); & span { text-overflow: ellipsis; @@ -248,6 +232,17 @@ } &.note-list-item-selected { + background: var(--highlight-color); + + .note-list-item-excerpt { + color: var(--primary-color); + } + + .note-list-item-pending-changes, + .note-list-item-published-icon { + color: var(--primary-color); + } + &.note-list-item-pinned .note-list-item-pinner { color: var(--primary-color); } From 378bf3585a8d675e7abf0b41f1af92fe21e74272 Mon Sep 17 00:00:00 2001 From: Sandy McFadden Date: Sat, 31 Jul 2021 22:12:00 -0300 Subject: [PATCH 4/4] Fix note list hover color --- lib/note-list/style.scss | 2 +- scss/_variables.scss | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/note-list/style.scss b/lib/note-list/style.scss index b3dd38437..ad1c536ad 100644 --- a/lib/note-list/style.scss +++ b/lib/note-list/style.scss @@ -175,7 +175,7 @@ &:not(.note-list-item-selected) { &:hover { - background: var(--secondary-color); + background: var(--alternative-highlight-color); } } diff --git a/scss/_variables.scss b/scss/_variables.scss index e82117713..16f95d1f0 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -60,6 +60,7 @@ body[data-theme='light'] { --primary-tag-chip-color: #dcdcde; // $studio-gray-5 --secondary-tag-chip-color: #facfd2; // $studio-red-5 --settings-fg-color: #2c3338; // $studio-gray-80 + --alternative-highlight-color: #f6f7f7; // $studio-gray-0; } body[data-theme='dark'] { @@ -85,4 +86,5 @@ body[data-theme='dark'] { --primary-tag-chip-color: #3c434a; // $studio-gray-70 --secondary-tag-chip-color: #8a2424; // $studio-red-70 --settings-fg-color: #dcdcde; // $studio-gray-5 + --alternative-highlight-color: #2c3338; // $studio-gray-80 }