Skip to content

Commit

Permalink
Improve navigation menu hover style with submenus
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetrakern committed Dec 17, 2024
1 parent af12e3d commit 96f7cf4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion css/application.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/complete.css

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions src/scss/_icon-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@
@include bp(desktop) {
border-radius: var(--layout-border-radius-small);
}

&.menu-item-has-children {
@include bp(desktop) {
border-radius: var(--layout-border-radius-small) var(--layout-border-radius-small) 0 0;
}
}
}

.sub-menu .menu-item :where(a, label, button):where(:not(._no-menu-item-style)) {
Expand Down
17 changes: 11 additions & 6 deletions src/scss/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,6 @@
@include bp(desktop) {
border-radius: var(--layout-border-radius-small);
}

&.menu-item-has-children {
@include bp(desktop) {
border-radius: var(--layout-border-radius-small) var(--layout-border-radius-small) 0 0;
}
}
}
}
}
Expand All @@ -220,6 +214,17 @@
height: fit-content;
transition: background-color .1s;

&.menu-item-has-children {
transition: background-color .1s, border-radius .1s;
transition-delay: 0s, .3s;

&:hover {
@include bp(desktop) {
border-radius: var(--layout-border-radius-small) var(--layout-border-radius-small) 0 0;
}
}
}

&:not(:hover) {
.sub-menu {
pointer-events: none;
Expand Down

0 comments on commit 96f7cf4

Please sign in to comment.