JQuery 3 and Long sub menus with native scrollbar #149
Replies: 1 comment 1 reply
-
Hi, yep, that is indeed due to the custom code that adds a native scrollbar (i.e. it sets // First sub level carets
> li > ul::before,
> li > ul::after {
content: '';
position: absolute;
top: -($sm-clean__desktop-sub-caret-size * 2 + $sm-clean__border-width * 2);
left: $sm-clean__desktop-sub-caret-left;
width: 0;
height: 0;
overflow: hidden;
border-width: ($sm-clean__desktop-sub-caret-size + $sm-clean__border-width);
border-style: dashed dashed solid dashed;
border-color: transparent transparent $sm-clean__desktop-sub-border-color transparent;
}
> li > ul::after {
top: -($sm-clean__desktop-sub-caret-size * 2);
left: ($sm-clean__desktop-sub-caret-left + $sm-clean__border-width);
border-width: $sm-clean__desktop-sub-caret-size;
border-color: transparent transparent $sm-clean__desktop-sub-bg transparent;
} or if you don't compile the SASS code on your own and use just the compiled version "/includes/css/sm-clean/sm-clean.css" please find and comment out the following CSS code inside: .sm-clean > li > ul::before,
.sm-clean > li > ul::after {
content: '';
position: absolute;
top: -18px;
left: 30px;
width: 0;
height: 0;
overflow: hidden;
border-width: 9px;
border-style: dashed dashed solid dashed;
border-color: transparent transparent #bbbbbb transparent;
}
.sm-clean > li > ul::after {
top: -16px;
left: 31px;
border-width: 8px;
border-color: transparent transparent #fff transparent;
} Alternatively, if you absolutely need to keep the carets, they need to be added in a different way (e.g. as child elements of the parent |
Beta Was this translation helpful? Give feedback.
-
Hello,
if I use your code I lost the little arrow in the top of the submenu (see below).
Please have a look at our demo website:
https://neu.milan-spiele.de/
I think the code "$sub.css('overflow-y', 'auto');" is override something.
I appreciate any help.
Best Regards
Michael
Beta Was this translation helpful? Give feedback.
All reactions