Skip to content
This repository has been 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

Open
IWMTom opened this issue Jan 29, 2020 · 0 comments

Comments

@IWMTom
Copy link

IWMTom commented Jan 29, 2020

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?

@IWMTom IWMTom changed the title No way to target div element with skipInitialTransition No way to target container on first page load with skipInitialTransition set to true Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant