next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Transition in production

Open simon-baehler opened this issue 7 years ago • 4 comments

Bug report

Describe the bug

When I start Next in dev mode, css il correctly loaded, but when I start it in production (npm run build then npm run start) all css are correctly load expect, my css with transition (you can check it here http://138.197.182.208:3007/). A default css is load (user agent style sheet I think) then my css is load

.debugtransiton{
  background: red;
  color: white;
  transition: background 5s;
  :hover{
    background: #00aced;
    transition: background 5s;
  }
}

My div will be first transparent, then after 5sec red then blue if I hover on it. What I also did, is to remove the 1st transition, it resolve the problem of css "flashing" but I have lost the hover out

Expected behavior

Avoid the css flash, for the link in the to, the red div shoudl be red directly on load.

System information

  • OS: Windows
  • Browser: All
  • Version of Next.js: 8.0.1

Thank you for your help, and sorry for my bad english.

simon-baehler avatar May 01 '19 18:05 simon-baehler

Could you provide more information? It's hard to debug without any information. Reproduction repo would be super helpfull.

huv1k avatar May 07 '19 10:05 huv1k

This is indeed a bug in Chromium https://bugs.chromium.org/p/chromium/issues/detail?id=332189 and appears to be an issue starting from Next v8 (because all inline scripts were removed: https://nextjs.org/blog/next-8#removed-inline-javascript). To fix it you have to provide a

Owner


Other Repo Issues