Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hover Effect for Buttons to Improve UX #240

Closed
wants to merge 3 commits into from
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
8 changes: 7 additions & 1 deletion src/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@
padding: 14px;
width: 100%; /* Full width on small screens */
}

.btn-hover {
transition: transform 0.22s;
}
.btn-hover:hover {
transform: scale(1.1, 1.1);
filter: invert(0.1);
}
/* Responsive Design */
@media (min-width: 601px) {
.body-search {
Expand Down
14 changes: 7 additions & 7 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -46,18 +46,18 @@ <h1>
>Search Portal</a
>
</h1>
<button class="expand-menu">Menu</button>
<button class="expand-menu btn-hover">Menu</button>
<nav class="ancilliary-menu">
<ul>
<li>
<li class="btn-hover">
<a
class="donate icon-attach fa-heart"
href="https://www.classy.org/give/313412/#!/donation/checkout?c_src=website&c_src2=top-of-page-banner"
target="_blank"
>Donate</a
>
</li>
<li><button class="explore">Explore CC</button></li>
<li><button class="explore btn-hover">Explore CC</button></li>
</ul>
</nav>
</div>
Expand Down Expand Up @@ -156,7 +156,7 @@ <h3>Find content you can share, use, and remix.</h3>
name="query"
value=""
placeholder="Enter your search query" />
<button class="search-button">Search</button>
<button class="search-button btn-hover">Search</button>
</div>
<div
class="search-checkbox"
Expand Down Expand Up @@ -564,15 +564,15 @@ <h2>Subscribe to our Newsletter</h2>
type="submit"
value="subscribe"
id="mc-embedded-subscribe"
class="button small" />
class="button small btn-hover" />
</form>
</div>

<div class="donate">
<h2>Support Our Work</h2>
<p>Our work relies on you! Help us keep the Internet free and open.</p>
<a
class="donate icon-attach cc-heart-filled"
class="donate icon-attach cc-heart-filled btn-hover"
href="https://www.classy.org/give/313412/#!/donation/checkout?c_src=website&c_src2=top-of-page-banner"
target="_blank"
>Donate Now</a
Expand Down