Skip to content

Commit

Permalink
refactoring mobile hover/active state
Browse files Browse the repository at this point in the history
  • Loading branch information
ropalko committed Jun 14, 2022
1 parent bb4f76d commit f7a7e4f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/theme.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/theme.min.css.map

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions src/scss/components/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,26 @@
.nav-link {
color: $body-color;
font-weight: bold;

@include media-breakpoint-up(lg) {
padding-left: 0.5rem;
padding-right: 0.5rem;
font-size: 16px;
}


&:hover {
color: $primary;
color: #fff;

@include media-breakpoint-up(lg) {
color: $primary;
}
}
&.active {
color: $primary;
color: #fff;

@include media-breakpoint-up(lg) {
color: $primary;
}
}

@include media-breakpoint-down(lg) {
Expand Down Expand Up @@ -182,6 +190,7 @@
}
}
}

@include media-breakpoint-down(lg) {
.offcanvas-body {
background-color: $primary;
Expand Down Expand Up @@ -211,7 +220,7 @@
font-size: 20px;
padding: .5rem 1rem;

&.active {
&:hover, &.active {
background-color: rgba($black, 0.4);
color: #fff;
}
Expand Down Expand Up @@ -317,6 +326,7 @@
border-radius: 8px;
transition:background-color .3s ease-in-out, color .3s ease-in-out;
padding: 8px 12px;

&:hover {
background-color: lighten($primary, 60%);
color: $body-color!important;
Expand Down

0 comments on commit f7a7e4f

Please sign in to comment.