Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

"Guides" menu overflow on small screen #241

Open
j4kim opened this issue Feb 27, 2023 · 2 comments
Open

"Guides" menu overflow on small screen #241

j4kim opened this issue Feb 27, 2023 · 2 comments

Comments

@j4kim
Copy link

j4kim commented Feb 27, 2023

I've recoreded a little video that shows the issue better than words: https://drive.google.com/file/d/1m0EFTjuE3_6CMyX-lPLFbulGgXalqE-q/view?usp=share_link

@Ehsan-Home
Copy link
Contributor

Hi. I found the source code generating the subnavs:

index.tsx, line 221:

<div
           ref={subnavEl}
            onmouseenter={closeSubnav.clear}
            onmouseleave={closeSubnav}
            class="absolute left-50 bg-gray-200 dark:bg-solid-darkLighterBg shadow-2xl max-w-sm transition duration-750"
            style={{ left: `${screen.width > 768 ? subnavPosition() : 0}px` }}
          >
            <ul class="divide-x divide-transparent flex flex-col">
              <For each={subnav()}>
                {(link) => (
                  <li
                    class="px-5 hover:bg-solid-default hover:text-white transition duration-300"
                    style={
                      link.direction && {
                        direction: link.direction,
                        'text-align': link.direction === 'ltr' ? 'left' : 'right',
                      }
                    }
                  >
                    <NavLink
                      onClick={() => setSubnav([])}
                      class="px-6 py-5 w-full block"
                      href={link.path}
                    >
                      {link.title}
                      <Show when={link.description}>
                        <span class="block text-sm text-gray-400">{link.description}</span>
                      </Show>
                    </NavLink>
                  </li>
                )}
              </For>
            </ul>
          </div>

It looks like the div inside the code snippet is not scrolling or getting confused when page behind scrolls.

I also tried adding overflow-y:auto to the div but didn't work.

@edemaine
Copy link
Contributor

I believe this issue should be raised on the solid-site repo, https://github.com/solidjs/solid-site

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants