Skip to content

Show main nav dropdowns on hover #224

Answered by crftwrk
noyloza asked this question in Q&A
Discussion options

You must be logged in to vote

You must split mobile and lg view, because on touchscreens there is no :hover

Do this, snippet goes in your child to scss/_bscore_custom.scss:

// Dropdown in mobile offcanvas-menu always open
@include media-breakpoint-down(lg) {
  #bootscore-navbar .dropdown-menu:not(.navbar .dropdown-menu.dropdown-search) {
    display: block;
  }

  #bootscore-navbar .nav-item .dropdown-menu.invisible {
    visibility: visible;
  }
}

// Dropdown open on hover lg size
@include media-breakpoint-up(lg) {
  #bootscore-navbar .nav-item .dropdown-menu {
    margin-top: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    transition: .7s;
  }

  #bootscore-navbar .nav-item:hover .dropdown-menu {…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@noyloza
Comment options

@crftwrk
Comment options

@crftwrk
Comment options

@neutcomp
Comment options

@crftwrk
Comment options

Answer selected by crftwrk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants