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

Setting additional options #9

Open
michaelrafailyk opened this issue Jan 31, 2021 · 0 comments
Open

Setting additional options #9

michaelrafailyk opened this issue Jan 31, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@michaelrafailyk
Copy link
Owner

michaelrafailyk commented Jan 31, 2021

I am considering adding options:

  1. Associating positional keys with parent of element instead of element (optional). It will allow synchronizing animations of different elements located in the same parent. Implementation can be different and it's hard to decide what's better and more convenient. I put here 3 possible versions.
<div data-animation="opacity: {-50vh: 1, 0: 0}" data-options="animation-keys: parent"></div>
<div data-animation="opacity: {-50vh: 1, 0: 0}, options: {keys: parent}"></div>
<div data-animation="opacity: {-50vh(parent): 1, 0(parent): 0}"></div>
  1. Setting min-width of viewport at which data-sticky, data-animation and data-classes will work. Like a @media (min-width) {...} in CSS.
<div data-options="viewport-min-width: 1024px"></div>
  1. Make a classes of animations and describe it aside in JavaScript.
<div data-animation="anim1 anim2"></div>

Questions that i faced:

  1. Should i make one more data-options attribute or trying to add new features to existing attributes?
  2. Should data-options be applied to all data-sticky, data-animation and data-classes attributes? Like a keys: parent instead of animation-keys: parent.
@michaelrafailyk michaelrafailyk changed the title Feature of setting options Setting additional options Jan 31, 2021
@michaelrafailyk michaelrafailyk added the enhancement New feature or request label Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant