Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar Slide-along keeping pusher content centered #6376

Open
sanjithkumar017 opened this issue May 6, 2018 · 3 comments
Open

Sidebar Slide-along keeping pusher content centered #6376

sanjithkumar017 opened this issue May 6, 2018 · 3 comments

Comments

@sanjithkumar017
Copy link

I am trying to create a sidebar with animation Slide Along.

When the sidebar is hidden, the pusher content is centered with respect to the width. But when the sidebar is visible, the width of the pusher remains the same and there is an additional width from the visible sidebar. Hence the pusher content, which is still centered looks skewed to the right.

Here is an example. Initial Codepen

This is what I tried. My Attempt.

I am trying to keep the pusher content centered at all times.

Thanks.

@y0hami
Copy link
Member

y0hami commented May 6, 2018

This is the expected behavior hence why it's a pusher. It pushes your content of the page.

@sanjithkumar017
Copy link
Author

The user will have to look at two different places in the browser or may be scroll horizontally depending upon the visibility of the sidebar.

invisible => pusher is in the center
visible => pusher is in the right

I just want to avoid this.

@y0hami
Copy link
Member

y0hami commented May 13, 2018

Maybe there should be another class which pushes the content but not off the canvas.

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

No branches or pull requests

2 participants