Skip to content

Unnecessary RightNav translation at the breakpoint #5

@imkarthikb

Description

@imkarthikb

I'm new to web frontend and really like this responsive navbar implementation but I notice an unncessary translation of the RightNav component when we adjust the browser width at the breakpoint.

The way to reproduce this is - Close the RightNav (if open) and adjust the browser width around the breakpoint (ie., 768px). We notice that the RightNav translates even though it is closed.

So I understand that the translation is causing this but it is needed -

transform: ${({ open }) => open ? 'translateX(0)' : 'translateX(100%)'};

I tried to play around with visibility and opacity which does not seem to work, whereas display works but it overrides the transition we have. So I dont know the severity (chances of people actually encountering this one) but any way to avoid this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions