Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/BackToTop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const BackToTop = () => {
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 50 }}
transition={{ duration: 0.3 }}
className="fixed bottom-28 right-11 z-50 bg-black text-white px-4 py-3 rounded-full shadow-lg hover:scale-105 transition"
className="fixed bottom-28 right-11 z-50 rounded-full border border-cyan-200/70 bg-cyan-600 px-4 py-3 text-white shadow-lg shadow-cyan-900/30 transition hover:scale-105 hover:bg-cyan-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:border-cyan-300/30 dark:bg-cyan-500 dark:hover:bg-cyan-400 dark:focus-visible:ring-offset-[#0a0e27]"
aria-label="Back to Top"
>
Expand All @@ -48,4 +48,4 @@ const BackToTop = () => {
);
};

export default BackToTop;
export default BackToTop;
14 changes: 14 additions & 0 deletions tests/test_back_to_top_styles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from pathlib import Path


REPO_ROOT = Path(__file__).resolve().parents[1]


def test_back_to_top_button_uses_high_contrast_theme_safe_styles():
source = (REPO_ROOT / "src/components/BackToTop.jsx").read_text(encoding="utf-8")

assert "bg-cyan-600" in source
assert "hover:bg-cyan-500" in source
assert "dark:bg-cyan-500" in source
assert "dark:hover:bg-cyan-400" in source
assert "focus-visible:ring-cyan-300" in source