Skip to content

Commit 0ae2cc9

Browse files
Merge PR #802 - smooth CSS transitions, accessible focus states, and backend import path fix
2 parents 7bc436c + bde1461 commit 0ae2cc9

3 files changed

Lines changed: 68 additions & 3 deletions

File tree

‎backend/app.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import sys
2626
import os
2727
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
28-
from sanitizer import sanitize_payload
29-
from reader_identity.routes import reader_identity_bp
28+
from backend.sanitizer import sanitize_payload
29+
from backend.reader_identity.routes import reader_identity_bp
3030

3131
# Load environment variables from config directory based on APP_ENV
3232
env = os.getenv('APP_ENV', 'development')

‎frontend/css/style.css‎

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,29 @@
8989
padding: 0;
9090
}
9191

92+
/* Smooth core animation and hover transitions for interactive elements */
93+
button,
94+
input,
95+
select,
96+
textarea,
97+
.search-input,
98+
.action-btn,
99+
.suggestion-btn,
100+
.send-btn,
101+
.btn-primary,
102+
.close-modal-btn,
103+
.close-genre-modal,
104+
.genre-card,
105+
.book-rec-item {
106+
transition:
107+
background-color 0.25s ease,
108+
color 0.25s ease,
109+
border-color 0.25s ease,
110+
box-shadow 0.25s ease,
111+
transform 0.25s ease,
112+
opacity 0.2s ease;
113+
}
114+
92115
html {
93116
scroll-behavior: smooth;
94117
transition: background-color 0.4s ease, color 0.4s ease;
@@ -201,10 +224,15 @@ header {
201224
color: var(--text-main);
202225
}
203226

227+
.search-input:hover,
204228
.search-input:focus {
205229
background: var(--book-bg);
230+
border-color: rgba(212, 175, 55, 0.35);
231+
}
232+
233+
.search-input:focus {
206234
width: 300px;
207-
box-shadow: var(--shadow-soft);
235+
box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.14);
208236
}
209237

210238
.search-icon {
@@ -306,6 +334,37 @@ main {
306334
overflow-x: hidden;
307335
}
308336

337+
/* Strong accessible focus states for keyboard navigation */
338+
button:focus-visible,
339+
.search-input:focus-visible,
340+
input:focus-visible,
341+
textarea:focus-visible,
342+
select:focus-visible,
343+
.action-btn:focus-visible,
344+
.suggestion-btn:focus-visible,
345+
.send-btn:focus-visible,
346+
.btn-primary:focus-visible,
347+
.close-modal-btn:focus-visible,
348+
.close-genre-modal:focus-visible,
349+
.genre-card:focus-visible,
350+
.book-rec-item:focus-visible {
351+
outline: 3px solid rgba(212, 175, 55, 0.35);
352+
outline-offset: 2px;
353+
}
354+
355+
select,
356+
.dropdown {
357+
transition: background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, color 0.28s ease;
358+
}
359+
360+
select:focus,
361+
.dropdown:focus,
362+
input:focus,
363+
textarea:focus {
364+
box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
365+
border-color: rgba(212, 175, 55, 0.35);
366+
}
367+
309368
/* --- Hero --- */
310369
.hero {
311370
text-align: center;

‎package-lock.json‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)