Skip to content

Rethink the intersection action #42

@eelcoj

Description

@eelcoj

With the whenVisible modifier you can write:

<section data-action="addClass#bg-red-500:whenVisible">
  I will be red once in view
</section>

Works the same for all other actions. It would be nice if the modifier was “boolean-aware”, e.g. remove the bg-red-500 class when not in visible, maybe using toggleClass#bg-red-500:whenVisible.

With above, I am leaning towards to remove the intersection altogether with the v1 version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions