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
- yarn create react-app my-app --template typescript
- yarn add react-mosaic-component
- Import 'react-mosaic-component/react-mosaic-component.css' in index.tsx
- Use example application:
Actual behavior
By default, this is how the application renders:
Expected behavior
I was able to get Mosaic to render by removing position: relative
in chrome dev tools.
It appears this can be resolved by removing this line:
react-mosaic/styles/mosaic.less
Line 95 in a80ebd4
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.