Skip to content
Discussion options

You must be logged in to vote

Swup adds and removes a number of classes on the html element that are intended to act as hooks to "cascade" styles anywhere in your document!

For example, you might do something like this:

.logo {
  /* Default positioning styles! */
}

html.is-animating .logo {
  /* Styles to apply whenever a navigation is occurring */
}

html.is-leaving .logo {
  /* Styles applied when a page is being unloaded */
}

You may need to work with these hooks creatively to define the two states for your site (minimized + centered) and ensure the transition only happens under certain circumstances—but the right combination should be available!

Check out the "How it Works" page for more info: https://swup.js.org…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by daun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants