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 css class to article/block/component when on screen #1100

Closed
lc-thomasberger opened this issue Jun 15, 2016 · 3 comments
Closed

Add css class to article/block/component when on screen #1100

lc-thomasberger opened this issue Jun 15, 2016 · 3 comments
Assignees

Comments

@lc-thomasberger
Copy link
Member

lc-thomasberger commented Jun 15, 2016

As mentioned here

This will make it easy to add css based animations when a Element is scrolled into view.

"_onScreen": {
    "_isEnabled": true,
    "_classes": "bounceOutLeft",
    "_options": {
        "_percentFromTop": 25,
        ....
    }
}

new syntax:

{
        "_id": "b-05",
        "_parentId": "a-05",
        "_type": "block",
        "_classes": "animated",
        "title": "b-05",
        "displayTitle": "",
        "body": "",
        "_trackingId": 0,
        "_onScreen": {
            "_isEnabled": true,
            "_classes": "wobble",
            "_percentInviewVertical": 50
        }
}

Will need to decide if we should only add classes or also remove them ...

@andrewhosgood
Copy link
Contributor

Maybe have a look at http://imakewebthings.com/waypoints/

@lc-thomasberger
Copy link
Member Author

as for now add on-screen and off-screen classes
add to core and test if this causes serious performance issues

@moloko
Copy link
Contributor

moloko commented Aug 19, 2017

PR: #1320

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

No branches or pull requests

3 participants