Skip to content

No background-color on <body> when display:flex. #4032

Closed
@decimoseptimo

Description

@decimoseptimo

In an fresh create-react-app, if:
body { background-color: #000000; display: flex; }

There is no background color applied, until page refresh.

Somehow, It doesn't happen while render() includes an image tag, e.g. <img src="/" />.

I'm seeing the issue in Chrome 64, but not reproducing in Edge nor Firefox latest.

Activity

Timer

Timer commented on Feb 16, 2018

@Timer
Contributor

I'm seeing the issue in Chrome 64, but not reproducing in Edge nor Firefox latest.

Sounds like you need to open an issue with Chrome then. Can you reproduce this without using CRA?

gaearon

gaearon commented on Feb 18, 2018

@gaearon
Contributor

CRA transforms display: flex to several fallbacks that may be necessary for target browsers. So putting just display: flex into a standalone HTML file is not comparing the same exact thing.

Somehow, It doesn't happen while render() includes an image tag, e.g. <img src="/" />

Then it's definitely a browser bug. It would be great if you could prepare a reduced test case for the browser vendors, but there's nothing we can do here.

locked and limited conversation to collaborators on Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Timer@gaearon@decimoseptimo

        Issue actions

          No background-color on <body> when display:flex. · Issue #4032 · facebook/create-react-app