From 008471a95c097bf0d41b74aa8fc20c14b797847c Mon Sep 17 00:00:00 2001 From: Abdullah Zeeshan <4bdullah7eeshan@proton.me> Date: Mon, 24 Feb 2025 12:46:54 +0530 Subject: [PATCH] Add a subtle hover effect on all buttons - Removed isolated hover effects - Set up a generic hover effect on all buttons that darkens the buttons on hover - Set up a transition period of 5s - Set the text color of "Delete" button to white to improve contrast ratio - Removed outline of "Delete" button to improve visual flair --- styles.css | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/styles.css b/styles.css index 8aecb82..eaab066 100644 --- a/styles.css +++ b/styles.css @@ -47,9 +47,6 @@ h1 { cursor: pointer; } -#add:hover { - background: #0052a3; -} #todo-list { list-style: none; @@ -74,13 +71,13 @@ h1 { .delete-btn { margin-left: auto; background: #dc3545; + color: white; padding: 0.5rem 1rem; + border: none; border-radius: 4px; + cursor: pointer; } -.delete-btn:hover { - background: #c82333; -} /*dark mode*/ #mode{ padding: 0.5rem 1rem; @@ -90,4 +87,13 @@ h1 { border-radius: 4px; cursor: pointer; float: right; +} + +/* Adding a subtle hover effect on ALL buttons */ +button { + transition: 0.5s; +} + +button:hover { + filter: brightness(90%); } \ No newline at end of file