Fix light/dark mode toggle position when add new recipe and style the scroll
This commit is contained in:
parent
f5cd32bd58
commit
46d245ed78
@ -598,9 +598,9 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="light"] {
|
[data-theme="light"] {
|
||||||
--bg: #f9fafb7a;
|
--bg: #f9fafbef;
|
||||||
--bg-elevated: #ffffff7c;
|
--bg-elevated: #ffffffd7;
|
||||||
--card: #ffffff54;
|
--card: #ffffffd5;
|
||||||
--card-soft: #f3f4f6;
|
--card-soft: #f3f4f6;
|
||||||
--border-subtle: rgba(107, 114, 128, 0.25);
|
--border-subtle: rgba(107, 114, 128, 0.25);
|
||||||
--accent: #059669;
|
--accent: #059669;
|
||||||
@ -640,20 +640,20 @@ body {
|
|||||||
[data-theme="light"] .btn.ghost {
|
[data-theme="light"] .btn.ghost {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
border: 1px solid rgba(107, 114, 128, 0.3);
|
border: 1px solid rgba(214, 210, 208, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="light"] .btn.ghost:hover {
|
[data-theme="light"] .btn.ghost:hover {
|
||||||
background: rgba(107, 114, 128, 0.1);
|
background: rgba(149, 151, 156, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="light"] .btn.danger {
|
[data-theme="light"] .btn.danger {
|
||||||
background: rgba(220, 38, 38, 0.12);
|
background: rgba(218, 32, 32, 0.486);
|
||||||
color: #991b1b;
|
color: #881f1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="light"] .btn.danger:hover {
|
[data-theme="light"] .btn.danger:hover {
|
||||||
background: rgba(220, 38, 38, 0.2);
|
background: rgba(189, 15, 15, 0.644);
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="light"] input,
|
[data-theme="light"] input,
|
||||||
@ -686,7 +686,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="light"] .drawer {
|
[data-theme="light"] .drawer {
|
||||||
background: #ffffff;
|
background: #d1b29b;
|
||||||
border-left: 1px solid rgba(107, 114, 128, 0.2);
|
border-left: 1px solid rgba(107, 114, 128, 0.2);
|
||||||
box-shadow: -4px 0 15px rgba(0, 0, 0, 0.08);
|
box-shadow: -4px 0 15px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
@ -708,3 +708,50 @@ body {
|
|||||||
border: 1px solid rgba(107, 114, 128, 0.3);
|
border: 1px solid rgba(107, 114, 128, 0.3);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[data-theme="light"] .toast.success {
|
||||||
|
background: rgba(5, 150, 105, 0.1);
|
||||||
|
border-color: rgba(5, 150, 105, 0.5);
|
||||||
|
color: #047857;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="light"] .recipe-list-item:hover {
|
||||||
|
background: rgba(229, 231, 235, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scrollbar Styling */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(148, 163, 184, 0.5);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(148, 163, 184, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Light mode scrollbar */
|
||||||
|
[data-theme="light"] ::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(107, 114, 128, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(107, 114, 128, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Firefox scrollbar */
|
||||||
|
html {
|
||||||
|
scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
|
||||||
|
scrollbar-width: thin;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="light"] html {
|
||||||
|
scrollbar-color: rgba(107, 114, 128, 0.4) transparent;
|
||||||
|
}
|
||||||
@ -162,7 +162,7 @@ function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="app-root">
|
<div className="app-root">
|
||||||
<ThemeToggle theme={theme} onToggleTheme={() => setTheme((t) => (t === "dark" ? "light" : "dark"))} />
|
<ThemeToggle theme={theme} onToggleTheme={() => setTheme((t) => (t === "dark" ? "light" : "dark"))} hidden={drawerOpen} />
|
||||||
<TopBar onAddClick={() => setDrawerOpen(true)} />
|
<TopBar onAddClick={() => setDrawerOpen(true)} />
|
||||||
|
|
||||||
<main className="layout">
|
<main className="layout">
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
function ThemeToggle({ theme, onToggleTheme }) {
|
function ThemeToggle({ theme, onToggleTheme, hidden = false }) {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
className="theme-toggle"
|
className="theme-toggle"
|
||||||
title={theme === "dark" ? "הפעל מצב בהיר" : "הפעל מצב חשוך"}
|
title={theme === "dark" ? "הפעל מצב בהיר" : "הפעל מצב חשוך"}
|
||||||
onClick={onToggleTheme}
|
onClick={onToggleTheme}
|
||||||
aria-label="Toggle theme"
|
aria-label="Toggle theme"
|
||||||
|
style={{ display: hidden ? "none" : "flex" }}
|
||||||
>
|
>
|
||||||
{theme === "dark" ? "🌤" : "🌙"}
|
{theme === "dark" ? "🌤" : "🌙"}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user