/* 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 */ :root { --rdm-box-shadow: 0 4px 4px 0 rgba(155, 155, 155, 0.26); --submit-button-active-background-color: rgba(0,0,0,0.12); --submit-button-active-color: var(--theme-body-color); --viewport-active-color: #3b3b3b; } :root.theme-dark { --rdm-box-shadow: 0 4px 4px 0 rgba(105, 105, 105, 0.26); --submit-button-active-background-color: var(--theme-toolbar-hover-active); --submit-button-active-color: var(--theme-selection-color); --viewport-active-color: #fcfcfc; } * { box-sizing: border-box; } :root, input, button { font-size: 12px; } html, body, #root { height: 100%; overflow: hidden; } .theme-dark body, .theme-dark button, .theme-dark input { color: var(--theme-toolbar-color); } #app { display: flex; flex-direction: column; width: 100%; height: 100%; } /** * Common styles for shared components */ .devtools-separator { height: 100%; margin: 0 1px; } /** * Toolbar */ #toolbar { background-color: var(--theme-tab-toolbar-background); border-bottom: 1px solid var(--theme-splitter-color); display: grid; grid-template-columns: min-content auto min-content; width: 100%; min-height: 29px; -moz-user-select: none; } #toolbar.left-aligned { grid-template-columns: min-content min-content min-content auto; } #toolbar-center-controls, #toolbar-end-controls { display: flex; align-items: center; } #toolbar-center-controls { justify-self: center; margin: 1px; } #toolbar.left-aligned #toolbar-end-controls { justify-self: end; } #rotate-button::before { background-image: url("./images/rotate-viewport.svg"); } #touch-simulation-button::before { background-image: url("./images/touch-events.svg"); } #screenshot-button::before { background-image: url("./images/screenshot.svg"); } #settings-button::before { background-image: url("chrome://devtools/skin/images/settings.svg"); } #exit-button::before { background-image: url("chrome://devtools/skin/images/close.svg"); } #screenshot-button:disabled { filter: var(--theme-icon-checked-filter); opacity: 1 !important; } #device-selector { align-self: center; background-position: right 4px center; margin-inline-start: 4px; padding-left: 0; width: 8em; } #device-selector .title { width: 85%; } #device-pixel-ratio-menu { width: 6em; /* `max-width` is here to keep the UI compact if the device pixel ratio changes to a repeating decimal value. This can happen if you zoom the UI (Cmd + Plus / Minus on macOS for example). */ max-width: 8em; background-position: right 4px center; padding-left: 0; } #viewports-container { display: flex; overflow: auto; height: 100%; width: 100%; } .theme-light #viewports-container { background-color: #F5F5F6; } #viewports { /* Individual viewports are inline elements, make sure they stay on a single line */ white-space: nowrap; margin-top: 16px; } #viewports.left-aligned { margin-left: 16px; } /** * 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(--rdm-box-shadow); position: relative; } /** * Viewport Content */ .viewport-content.resizing { pointer-events: none; } /** * Viewport Browser */ .browser { display: block; border: 0; -moz-user-select: none; } .browser:-moz-focusring { outline: 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-resize-handle.hidden { display: none; } .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 Input */ .viewport-dimension { display: flex; align-items: center; margin: 1px; } .viewport-dimension-input { border: 1px solid var(--theme-splitter-color); outline: none; text-align: center; width: 3em; } .viewport-dimension-input:focus { border: 1px solid var(--theme-selection-background); transition: all 0.2s ease-in-out; } .viewport-dimension-input.invalid:focus { border: 1px solid #d92215; } .theme-dark .viewport-dimension-input { background-color: var(--theme-tab-toolbar-background); } .viewport-dimension-separator { -moz-user-select: none; padding: 0 0.3em; } /** * Device Modal */ @keyframes fade-in-and-up { 0% { opacity: 0; transform: translateY(5px); } 100% { opacity: 1; transform: translateY(0px); } } @keyframes fade-down-and-out { 0% { opacity: 1; transform: translateY(0px); } 100% { opacity: 0; transform: translateY(5px); visibility: hidden; } } .device-modal { background-color: var(--theme-toolbar-background); border: 1px solid var(--theme-splitter-color); border-radius: 2px; box-shadow: var(--rdm-box-shadow); position: absolute; margin: auto; top: 0; bottom: 0; left: 0; right: 0; width: 800px; max-width: 90%; height: 650px; z-index: 1; } /* Handles the opening/closing of the modal */ #device-modal-wrapper.opened .device-modal { animation: fade-in-and-up 0.3s ease forwards; } #device-modal-wrapper.closed .device-modal { animation: fade-down-and-out 0.3s ease forwards; } #device-modal-wrapper.opened .modal-overlay { background-color: var(--theme-splitter-color); position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 0; opacity: 0.5; } .device-modal-content { display: flex; flex-direction: column; flex-wrap: wrap; overflow: auto; height: 515px; margin: 20px 20px 0; } #device-close-button { position: absolute; top: 5px; right: 2px; } #device-close-button::before { background-image: url("chrome://devtools/skin/images/close.svg"); } .device-type { display: flex; flex-direction: column; padding: 10px; } .device-header { font-weight: bold; text-transform: capitalize; padding: 0 0 3px 23px; } .device-label { color: var(--theme-body-color); padding-bottom: 3px; display: flex; align-items: center; /* Largest size without horizontal scrollbars */ max-width: 181px; } .device-input-checkbox { margin-right: 5px; } .device-name { flex: 1; } .device-remove-button:empty::before { background-image: url("chrome://devtools/skin/images/close.svg"); } #device-submit-button { background-color: var(--theme-tab-toolbar-background); border-width: 1px 0 0 0; border-top-width: 1px; border-top-style: solid; border-top-color: var(--theme-splitter-color); color: var(--theme-body-color); width: 100%; height: 20px; position: absolute; bottom: 0; } #device-submit-button:hover { background-color: var(--theme-toolbar-hover); } #device-submit-button:hover:active { background-color: var(--submit-button-active-background-color); color: var(--submit-button-active-color); } /** * Device Adder */ #device-adder { display: flex; flex-direction: column; margin: 0 20px; } #device-adder-content { display: flex; } #device-adder-column-1 { flex: 1; margin-right: 10px; } #device-adder-column-2 { flex: 2; } #device-adder button { background-color: var(--theme-tab-toolbar-background); border: 1px solid var(--theme-splitter-color); border-radius: 2px; color: var(--theme-body-color); margin: 0 auto; } #device-adder label { display: flex; margin-bottom: 5px; align-items: center; } #device-adder label > input, #device-adder label > .viewport-dimension { flex: 1; margin: 0; } #device-adder label > .viewport-dimension { border-bottom: 1px solid transparent; color: var(--theme-body-color-inactive); display: flex; align-items: center; justify-content: center; transition: all 0.25s ease; } #device-adder label > .viewport-dimension.editing { border-bottom-color: var(--theme-selection-background); } #device-adder label > .viewport-dimension.editing.invalid { border-bottom-color: #d92215; } #device-adder input { background: transparent; border: 1px solid transparent; text-align: center; color: var(--theme-body-color-inactive); transition: all 0.25s ease; } #device-adder input:focus { color: var(--viewport-active-color); } #device-adder label > input:focus, #device-adder label > .viewport-dimension:focus { border-bottom: 1px solid var(--theme-selection-background); outline: none; } .device-adder-label { display: inline-block; margin-right: 5px; min-width: 35px; }