ghostdevv/svelte-hamburgers

Hamburger animation jumping when on right side of page

bck01215 opened this issue · 5 comments

When hamburger is on the right side of the page, the animation pops back and forth
Peek 2022-10-08 10-53

This is probably an issue with your styling not with the hamburger itself, if you could share a small repl with the issue I can take a look for you

I found a workaround. I was attempting to adjust css in the Hamburger.

        <Hamburger --color={secTColor} --padding=8px --position=absolute --right=0px  bind:open={open}/>

Those are also the stylings of the containing div.

I used a global css setting to work around.

    :global(.hamburger){
        padding: 8px;
        position:absolute;
        right: 0px;
        color: var(--secondary-text-color) !important;
    }

the best way to style the hamburger is to place it in a div and style that div, it's not recommended to use :global like that

If you send a REPL I can help debug it