Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NProgress currently uses
transform: translate3d()
to move the bar around, which is only supported on IE10 (along with most modern browsers).This fix sniffs whether the browser supports
transform: translate3d()
, and falls back totransform: translate()
(IE9 and other non-3D-supporting browsers) ormargin
(IE7-8) if not.positionUsing
) which is populated the first time thatNProgress.set()
is called, which stores which positioning CSS rule to use.positionUsing
is populated usingNProgress.getPositioningCSS()
, which determines which positioning CSS rule to use (translate3d|translate|margin
).NProgress.set()
to callbarPositionCSS()
, which returns a hash of CSS to set on the bar. The positioning rule depends on whatpositionUsing
is set to.Sniffing code based heavily on Zynga/scroller IE8-9 support code:
pbakaus/scroller#4
Tested on:
This only adds support for the bar, not the spinner, and there's no animation present.