You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from React 16.8/react-scripts 4 to 18.2/5, Planet stopped to properly position the orbital system. "Satellites" are put in a vertical row, "Center content" is put as the last item.
Minimal reproduction scenario:
Initialize react app (ensure using latest cra 5.0.x; if installed before via npm install -g then remove)
npx create-react-app r18
cd r18
npm install --save [email protected]
Inspect package.json to ensure the app uses react 18.2.x and react-scripts 5.x
Edit default App.js, adding a simple planet with 2 satellites
Expected result: nice orbital system
Actual result: heavily mispositioned.
Seems that makeStyles-root-X are not defined in output code, resulting in missing z-index and position:absolute styles. This makes top and left styles inactive (on screenshot - grayed out with tooltip "top has no effect on this element since it’s not a positioned element. Try setting its position property to something other than static.")
The text was updated successfully, but these errors were encountered:
I got the same problem. I didn't find the right solution, but I found that "z-index" and "position: absolute" are successfully applied when <React.StrictMode> is disabled. The planets fall into place :)
I got the same problem. I didn't find the right solution, but I found that "z-index" and "position: absolute" are successfully applied when <React.StrictMode> is disabled. The planets fall into place :)
This works, but I feel like this shouldn't be the correct way to do this
After upgrading from React 16.8/react-scripts 4 to 18.2/5, Planet stopped to properly position the orbital system. "Satellites" are put in a vertical row, "Center content" is put as the last item.
Minimal reproduction scenario:
npm install -g
then remove)Inspect package.json to ensure the app uses react 18.2.x and react-scripts 5.x
Edit default App.js, adding a simple planet with 2 satellites
Expected result: nice orbital system
Actual result: heavily mispositioned.
Seems that
makeStyles-root-X
are not defined in output code, resulting in missingz-index
andposition:absolute
styles. This makestop
andleft
styles inactive (on screenshot - grayed out with tooltip "top has no effect on this element since it’s not a positioned element. Try setting its position property to something other than static.")The text was updated successfully, but these errors were encountered: