/* TODO: May break up into component local CSS. Pending future discussions by * React component group on how to best handle CSS. */ /** * CSS Variables specific to the responsive design mode */ .theme-light { --box-shadow: 0 4px 4px 0 rgba(155, 155, 155, 0.26); --viewport-dimension-color: var(--theme-splitter-color); --viewport-dimension-editing-color: var(--theme-body-color); } .theme-dark { --box-shadow: 0 4px 4px 0 rgba(105, 105, 105, 0.26); --viewport-dimension-color: var(--theme-body-color); --viewport-dimension-editing-color: var(--theme-selection-color); } * { box-sizing: border-box; } #root, html, body { margin: 0; height: 100%; } body { /* Only allow horizontal scrolling when more viewports are added */ overflow-y: hidden; } #app { height: 100%; /* Center the viewports container */ display: flex; justify-content: center; align-items: center; flex-direction: column; } /** * Common style for toolbar buttons */ .toolbar-button { border: none; display: block; margin: 1px 3px; padding: 0; width: 16px; height: 16px; opacity: 0.8; background-color: var(--theme-body-color); } .toolbar-button:hover { opacity: 1; } .toolbar-button:active { background-color: var(--theme-selection-background); opacity: 1; } /** * Global Toolbar */ #global-toolbar { background-color: var(--theme-toolbar-background); border: 1px solid var(--theme-splitter-color); border-radius: 2px; color: var(--theme-body-color-alt); box-shadow: var(--box-shadow); margin: 30px 0; padding: 4px 8px; display: inline-flex; -moz-user-select: none; } #global-toolbar > .title { border-right: 1px solid var(--theme-splitter-color); padding: 1px 6px 0 2px; } #global-toolbar .toolbar-button { margin: 0 0 0 4px; } #global-exit-button { mask: url("./images/close.svg"); } #viewports { /* Snap to the top of the app when there isn't enough vertical space anymore to center the viewports (so we don't loose the toolbar) */ position: sticky; top: 0; /* Make sure left-most viewport is visible when there's horizontal overflow. That is, when the horizontal space become smaller than the viewports and a scrollbar appears, then the first viewport will still be visible */ left: 0; /* Individual viewports are inline elements, make sure they stay on a single line */ white-space: nowrap; } /** * Viewport Container */ .viewport { display: inline-block; /* Align all viewports to the top */ vertical-align: top; } .resizable-viewport { border: 1px solid var(--theme-splitter-color); box-shadow: var(--box-shadow); position: relative; } /** * Viewport Toolbar */ .viewport-toolbar { background-color: var(--theme-toolbar-background); border-bottom: 1px solid var(--theme-splitter-color); color: var(--theme-body-color); display: flex; flex-direction: row; justify-content: flex-end; height: 18px; } .viewport-rotate-button { mask: url("./images/rotate-viewport.svg"); } /** * Viewport Browser */ .browser { display: block; border: 0; } .browser.resizing { pointer-events: none; } /** * Viewport Resize Handles */ .viewport-resize-handle { position: absolute; width: 16px; height: 16px; bottom: 0; right: 0; background-image: url("./images/grippers.svg"); background-position: bottom right; padding: 0 1px 1px 0; background-repeat: no-repeat; background-origin: content-box; cursor: se-resize; } .viewport-horizontal-resize-handle { position: absolute; width: 5px; height: calc(100% - 16px); right: -4px; top: 0; cursor: e-resize; } .viewport-vertical-resize-handle { position: absolute; width: calc(100% - 16px); height: 5px; left: 0; bottom: -4px; cursor: s-resize; } /** * Viewport Dimension Label */ .viewport-dimension { display: flex; justify-content: center; font: 10px sans-serif; margin-top: 10px; } .viewport-dimension-editable { border-bottom: 1px solid transparent; } .viewport-dimension-editable, .viewport-dimension-input { color: var(--viewport-dimension-color); transition: all 0.25s ease; } .viewport-dimension-editable.editing, .viewport-dimension-input.editing { color: var(--viewport-dimension-editing-color); } .viewport-dimension-editable.editing { border-bottom: 1px solid var(--theme-selection-background); } .viewport-dimension-editable.editing.invalid { border-bottom: 1px solid #d92215; } .viewport-dimension-input { background: transparent; border: none; text-align: center; } .viewport-dimension-separator { -moz-user-select: none; }