Skip to content

Commit

Permalink
Updates hover and active states for main navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
oisa committed Nov 28, 2024
1 parent 2e3c1a8 commit 5b97f5a
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 additions & 4 deletions src/components/main-nav/_main-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,19 @@
}

> li {
@include breakpoint($nsw-desktop-breakpoint) {
&.active {
box-shadow: inset 0 -4px 0 var(--nsw-brand-dark);
@include breakpoint($nsw-desktop-breakpoint) {
a:first-of-type {
position: relative;
}

&.active > a > span:first-of-type::after {
content: '';
position: absolute;
bottom: -4px;
left: 0;
width: calc(100%);
height: 2px;
background-color: var(--nsw-brand-accent);
}
}
}
Expand All @@ -99,7 +109,20 @@

&.active {
background-color: var(--nsw-white);
box-shadow: inset 0 -4px 0 var(--nsw-brand-dark);
}

span:first-of-type {
position: relative;
}

&.active > span:first-of-type::after {
content: '';
position: absolute;
bottom: -4px;
left: 0;
width: calc(100%);
height: 2px;
background-color: var(--nsw-brand-accent);
}

&.active .nsw-material-icons {
Expand Down Expand Up @@ -135,6 +158,20 @@

&:hover {
@include nsw-hover;

span {
position: relative;
}

span:first-of-type::after {
content: '';
position: absolute;
bottom: -4px;
left: 0;
width: calc(100%);
height: 2px;
background-color: var(--nsw-brand-dark);
}
}

.nsw-material-icons {
Expand Down

0 comments on commit 5b97f5a

Please sign in to comment.