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

[Suspense] Use !important to hide Suspended nodes #15861

Merged
merged 1 commit into from
Jun 11, 2019

Commits on Jun 11, 2019

  1. [Suspense] Use !important to hide Suspended nodes

    Suspended nodes are hidden using an inline `display: none` style. We do
    this instead of removing the nodes from the DOM so that their state is
    preserved when they are shown again.
    
    Inline styles have the greatest specificity, but they are superseded by
    `!important`. To prevent an external style from overriding React's, this
    commit changes the hidden style to `display: none !important`.
    
    MaYBE AnDREw sHOulD JusT LEArn Css
    
    I attempted to write a unit test using `getComputedStyle` but JSDOM
    doesn't respect `!important`. I think our existing tests are sufficient
    but if we were to decide we need something more robust, I would set up
    an e2e test.
    acdlite committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    fcc3652 View commit details
    Browse the repository at this point in the history