Skip to content
This repository was archived by the owner on Jul 28, 2018. It is now read-only.

Parent option for progress bar #538

Open
drewhamlett opened this issue May 18, 2015 · 2 comments
Open

Parent option for progress bar #538

drewhamlett opened this issue May 18, 2015 · 2 comments

Comments

@drewhamlett
Copy link

I could ditch nprogress if we had a parent option for Turbolinks.

https://github.com/rstacruz/nprogress#parent

Sometimes it's useful to be able to set a container where the progress bar will be placed at.

Thanks!

@javan
Copy link
Contributor

javan commented May 21, 2015

One reason the progress bar is on the html element is to prevent it from being replaced when changing pages. This allows it to smoothly finish its animation after the new content is inserted.

Can you explain your specific use case?

@chrise86
Copy link

chrise86 commented Jun 9, 2015

I had a need for this too, where I had a sidebar and main content area and wanted the progress bar to appear in the main content area only. I solved it using the following:

html.turbolinks-progress-bar::before {
  margin-left: 220px; // where 220px is sidebar width
}

This way you can also alter it responsively as needed.

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

No branches or pull requests

4 participants