nomcopter / react-mosaic

A React tiling window manager

Home Page:https://nomcopter.github.io/react-mosaic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with mosaic.less style causing Mosaic component to not render by default

dpromisel opened this issue · comments

Bug report

  • Package version(s): 4.1.1
  • Browser and OS versions: macOS 10.15 and Chrome 85

Steps to reproduce

  1. yarn create react-app my-app --template typescript
  2. yarn add react-mosaic-component
  3. Import 'react-mosaic-component/react-mosaic-component.css' in index.tsx
  4. Use example application:
    image

Actual behavior

By default, this is how the application renders:
image

Expected behavior

I was able to get Mosaic to render by removing position: relative in chrome dev tools.

image

It appears this can be resolved by removing this line:

position: relative;

Can you paste your App.css? Did you include the part making all the parents of #root take 100% of the available space?

Here is my app.css #app { height: 100%; width: 100%; margin: 0; }

I also updated the above comment to show me setting the id of the parent div.

That isn't enough, you also need to style its parents. Also in your screenshot nothing has an ID of app?

Try:

#app, #root, html, body { height: 100%; width: 100%; margin: 0; }

That did it, thanks for the help, sorry for the trouble.