Make width responsive through a CSS variable that's accessed in React

This commit is contained in:
Zac Ioannidis
2020-10-29 11:42:00 +00:00
parent 4fdfd12401
commit d1f4ade83d
2 changed files with 6 additions and 1 deletions

View File

@@ -263,7 +263,7 @@ class Dashboard extends React.Component {
const dateHeight = 80
const popupStyles = {
height: `fit-content`,
width: '60vw',
width: window.innerWidth > 768 ? '60vw' : `calc(100vw - var(--toolbar-width))`,
maxWidth: 600,
maxHeight: window.innerHeight > 768 ? `calc(100vh - ${app.timeline.dimensions.height}px - ${dateHeight}px)` : `100vh`,
top: 0,