Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

No way to target container on first page load with skipInitialTransition set to true #51

@IWMTom

Description

@IWMTom

When the skipInitialTransition prop is true, the div element created as a container does not have a class that can be used to target the element on first page load.

This is proving a problem in a project where I need to set html, body and #__next to height: 100%;

I also need to set it on to the container div so that I can use height: 100% in children, but without a way to target it specifically I cannot set the CSS appropriately.

With skipInitialTransition set to false this isn't an issue as the .page-transition-enter-done class exists at that point.

I propose a .page-transition-default class to be added to the container when the state passed to the buildClassName function does not match any of the specified cases, (i.e. the default case).

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions