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

is it possible to change the background colour behind transitions? #192

Closed
gavJackson opened this issue Sep 13, 2022 · 2 comments
Closed

Comments

@gavJackson
Copy link

I spent a work hackathon day experimenting with adding it to our app and was largely successful although I couldn't work out how to change the colour behind the transitions.

I have background-color and background gradients styles on the html, body and my low level DOM nodes but whatever I try I still get a white background behind the transitions. This isn't too bad on light skins, but we also have a dark mode and it looks pretty jarring then, is there something simple I am missing? or is this something else that needs adding to the spec? I even tried adding a background colour to the psuedo page transition elements. This image shows what I mean:

Screenshot 2022-09-13 at 08 59 22

p.s. I am blown away by this API, its very cool! a couple of years ago i tried implementing my own screenshot capturing transition system...not easy! I totally appreciate this, especially the DOM flattening.

@jakearchibald
Copy link
Collaborator

Glad you had fun with the API!

For the background colour, did you try:

::page-transition {
  background: black;
}

@gavJackson
Copy link
Author

amazing thanks, that got it - much appreciated

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

2 participants