Skip to content

Commit

Permalink
refacto(open-library): small improvments on theme color
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzofox3 committed Mar 2, 2024
1 parent 3434e71 commit fd199bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions apps/open-library/book-list.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const createBookListController = ({ state }) => {
async search({ query }) {
try {
state.isLoading = true;
state.books = [];
state.error = undefined;
const { docs } = await searchService.search({ query });
state.books = docs.map(toViewModel);
Expand Down
14 changes: 9 additions & 5 deletions apps/open-library/theme.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
html {
color-scheme: light dark;
}

*,
*::before,
*::after {
Expand Down Expand Up @@ -44,15 +48,14 @@ canvas {
--bg-surface: #f5f5f5;
--gray: #1e1e1e;
--accent: #3d67a2;
--accent-100: color-mix(in lab, var(--mix) 55%, var(--accent));
--accent-300: color-mix(in lab, var(--mix) 80%, var(--accent));
--accent-100: color-mix(in srgb, var(--mix) 55%, var(--accent));
--accent-300: color-mix(in srgb, var(--mix) 80%, var(--accent));
--mix: white;
--gray-100: color-mix(in lab, var(--mix) 25%, var(--gray));
--gray-300: color-mix(in lab, var(--mix) 60%, var(--gray));
--gray-100: color-mix(in srgb, var(--mix) 25%, var(--gray));
--gray-300: color-mix(in srgb, var(--mix) 60%, var(--gray));
}

body {
color-scheme: light dark;
font-family: system-ui, sans-serif;
font-size: clamp(1.3rem, 0.5vw + 1rem, 1.4rem);
color: var(--gray);
Expand All @@ -65,6 +68,7 @@ body {

@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--bg-app: #142334;
--bg-surface: #1e334f;
--gray: #ececec;
Expand Down

0 comments on commit fd199bf

Please sign in to comment.