Git Product home page Git Product logo

Comments (11)

drcmda avatar drcmda commented on May 3, 2024

@taylorlapeyre could you try with @4.2.1-beta.0 ? It should be fixed now. It attempts to render out the middlewares result instead of relying on a promise, thereby the fragment ends up in the same render-tree, which hopefully doesn't break context.

from react-spring.

taylorlapeyre avatar taylorlapeyre commented on May 3, 2024

@drcmda Yes, I'll give it a shot!

from react-spring.

taylorlapeyre avatar taylorlapeyre commented on May 3, 2024

@drcmda it's working beautifully now!

from react-spring.

jeroenvisser101 avatar jeroenvisser101 commented on May 3, 2024

@drcmda Will test with router and styled-components w/ ThemeProvider, will update

from react-spring.

jeroenvisser101 avatar jeroenvisser101 commented on May 3, 2024

Totally works now!

from react-spring.

jeroenvisser101 avatar jeroenvisser101 commented on May 3, 2024

Update: tried this a little more and it seems that when the portal is created, the style of the page is (very briefly) removed. When you have custom fonts you can observe fonts changing back to serif font.

EDIT: only happens on first invocation (video, happens at the 3 second mark in Chrome)

from react-spring.

drcmda avatar drcmda commented on May 3, 2024

Probably due to css inheritance. The dom node that the fragment is projected into is at the root.

from react-spring.

jeroenvisser101 avatar jeroenvisser101 commented on May 3, 2024

font-family is set on :root. Also, the Spring and animated.div should not (?) affect the rest of the page, right? There's 2 frames in that video where the whole page's font-family resets for some reason.

from react-spring.

drcmda avatar drcmda commented on May 3, 2024

Spring and animated.div are just regular components, must be something else. The portal renders off-screen in a div set to position:static;visibility:hidden;, but it isn't shown, we pick bounds and then the element renders like always, with auto being overwritten by the new bounds. I couldn't imagine any of it would have an impact on the font-family. Here's some info on how fout can come about: https://www.paulirish.com/2009/fighting-the-font-face-fout/

from react-spring.

drcmda avatar drcmda commented on May 3, 2024

closing this for now, should something else come up i can reopen

from react-spring.

jeroenvisser101 avatar jeroenvisser101 commented on May 3, 2024

@drcmda yep, issue was unrelated after all, spring works great now after ditching styled-components' injectGlobal for font injection

from react-spring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.