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

add option to use inline styles for positioning #293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LucaRosaldi
Copy link

Solves issues #242 and #273.

In some cases, using inline styles for positioning parallax elements forces developers to override css properties with !important, which is inelegant at best and impossible at worst.

I added a useInlinePosition option (set to true, which is the current behavior, so it does not break anything) to stop using inline positioning for parallax elements.

I did not update the data attribute API because this is a behavior which is normally decided on website level, not element-by-element.

@nora-soderlund
Copy link

@wagerfield can this be approved?

See use case: https://stackoverflow.com/questions/74942946/how-to-disable-parallax-js-on-element-click/74943055#74943055

Currently, one must either override the inline styling through JS or use !important which is bad practice but forced in these scenarios (see Overriding 3rd party code & inline styles.)

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

Successfully merging this pull request may close these issues.

2 participants