| /* Copyright 2026 The Chromium Authors | |
| * Use of this source code is governed by a BSD-style license that can be | |
| * found in the LICENSE file. | |
| */ | |
| :root { | |
| --bg-hover: rgba(0, 0, 255, 0.15); | |
| --body-padding: 5px; | |
| --color-sep: #888; | |
| --splitter-size: 7px; | |
| --tree-toggle-width: 20px; | |
| --z-index-overlay: 1000; | |
| } | |
| body { | |
| align-items: center; | |
| box-sizing: border-box; | |
| display: flex; | |
| flex-direction: column; | |
| font-family: sans-serif; | |
| height: 100vh; | |
| margin: 0; | |
| padding: var(--body-padding); | |
| } | |
| button { | |
| background-color: #007bff; | |
| border-radius: 5px; | |
| border: none; | |
| color: white; | |
| cursor: pointer; | |
| font-size: 16px; | |
| &.action-button { | |
| padding: 5px 5px; | |
| width: 100px; | |
| } | |
| &:disabled { | |
| background-color: #6c757d; | |
| cursor: not-allowed; | |
| opacity: 0.65; | |
| } | |
| } | |
| label { | |
| align-items: center; | |
| display: inline-flex; | |
| flex-direction: row; | |
| gap: 5px; | |
| height: 1.4em; | |
| justify-content: flex-start; | |
| } | |
| label, | |
| select { | |
| cursor: pointer; | |
| } | |
| .hidden { | |
| display: none !important; | |
| } | |
| #div-controls { | |
| align-items: center; | |
| background-color: #f8f9fa; | |
| box-sizing: border-box; | |
| display: flex; | |
| flex-direction: row; | |
| flex-shrink: 0; | |
| gap: 15px; | |
| overflow-x: auto; | |
| padding: 10px; | |
| user-select: none; | |
| white-space: nowrap; | |
| width: 100%; | |
| & > * { | |
| flex-shrink: 0; | |
| } | |
| } | |
| label:has(#sel-zoom) { | |
| margin-left: 263px; | |
| } | |
| #sel-zoom { | |
| width: 110px; | |
| } | |
| #div-main { | |
| display: flex; | |
| flex-grow: 1; | |
| overflow: hidden; | |
| position: relative; | |
| width: 100%; | |
| } | |
| .main-layout { | |
| &[data-layout="left"] { | |
| flex-direction: row; | |
| } | |
| &[data-layout="right"] { | |
| flex-direction: row-reverse; | |
| } | |
| &[data-layout="top"] { | |
| flex-direction: column; | |
| } | |
| &[data-layout="bottom"] { | |
| flex-direction: column-reverse; | |
| } | |
| } | |
| #div-pane-screenshot { | |
| display: flex; | |
| flex-basis: 50%; | |
| flex-direction: column; | |
| flex-grow: 0; | |
| flex-shrink: 0; | |
| max-height: 100%; | |
| max-width: 100%; | |
| overflow: hidden; | |
| position: relative; | |
| } | |
| #div-screenshot { | |
| align-items: safe start; | |
| background-color: #fff; | |
| display: grid; | |
| flex-grow: 1; | |
| justify-items: safe center; | |
| min-height: 0; | |
| overflow: auto; | |
| #div-main[data-layout="top"] &, | |
| #div-main[data-layout="bottom"] & { | |
| align-items: safe center; | |
| } | |
| &[data-force-scroll="x"] { | |
| overflow-x: scroll; | |
| } | |
| &[data-force-scroll="y"] { | |
| overflow-y: scroll; | |
| } | |
| .screenshot-inner { | |
| --screenshot-width: 0px; | |
| --screenshot-height: 0px; | |
| cursor: crosshair; | |
| flex-shrink: 0; | |
| position: relative; | |
| } | |
| .canv-base { | |
| display: block; | |
| height: var(--screenshot-height); | |
| image-rendering: pixelated; | |
| transition: opacity 0.15s; | |
| width: var(--screenshot-width); | |
| } | |
| } | |
| #div-screenshot-info { | |
| background-color: #f8f9fa; | |
| box-sizing: border-box; | |
| contain: strict; | |
| display: flex; | |
| flex-shrink: 0; | |
| font-family: monospace; | |
| height: 40px; | |
| justify-content: center; | |
| padding: 10px; | |
| user-select: none; | |
| white-space: nowrap; | |
| .div-size-info { | |
| align-items: center; | |
| display: none; | |
| gap: 15px; | |
| justify-content: center; | |
| } | |
| &[data-show="size"] .div-size-info { | |
| display: flex; | |
| } | |
| .div-size-info { | |
| .sp-size-device { | |
| text-align: right; | |
| width: 40ch; | |
| } | |
| .sp-size-scaled { | |
| width: 40ch; | |
| } | |
| } | |
| &.too-narrow { | |
| .sp-size-device, | |
| .sp-separator { | |
| display: none; | |
| } | |
| .sp-size-scaled { | |
| width: auto; | |
| } | |
| } | |
| } | |
| #div-main-splitter { | |
| background-color: transparent; | |
| flex-basis: var(--splitter-size); | |
| flex-shrink: 0; | |
| position: relative; | |
| z-index: 10; | |
| &::before { | |
| background-color: var(--color-sep); | |
| content: ''; | |
| position: absolute; | |
| } | |
| #div-main[data-layout="left"] &, | |
| #div-main[data-layout="right"] & { | |
| cursor: col-resize; | |
| &::before { | |
| height: 100%; | |
| left: 3px; | |
| top: 0; | |
| width: 1px; | |
| } | |
| } | |
| #div-main[data-layout="top"] &, | |
| #div-main[data-layout="bottom"] & { | |
| cursor: row-resize; | |
| &::before { | |
| height: 1px; | |
| left: 0; | |
| top: 3px; | |
| width: 100%; | |
| } | |
| } | |
| } | |
| #div-pane-view-tree { | |
| display: flex; | |
| flex-basis: 0; | |
| flex-direction: column; | |
| flex-grow: 1; | |
| gap: 5px; | |
| overflow: hidden; | |
| } | |
| #div-view-tree { | |
| contain: content; | |
| flex-grow: 1; | |
| overflow-y: auto; | |
| padding: 10px; | |
| user-select: none; | |
| .view-row { | |
| align-items: center; | |
| background-clip: border-box; | |
| border-bottom: 1px solid #0001; | |
| border-left: 3px solid transparent; /* Descendant selection indicator. */ | |
| display: flex; | |
| font-family: monospace; | |
| height: 24px; | |
| white-space: nowrap; | |
| &.hovered-view { | |
| background-color: var(--bg-hover); | |
| } | |
| &.is-window { | |
| font-weight: bold; | |
| } | |
| &.expanded { | |
| .tree-toggle span { | |
| transform: rotate(90deg); | |
| } | |
| } | |
| .tree-toggle { | |
| align-items: center; | |
| box-sizing: border-box; | |
| color: #666; | |
| cursor: pointer; | |
| display: inline-flex; | |
| flex-shrink: 0; | |
| font-size: 10px; | |
| height: 100%; | |
| justify-content: center; | |
| user-select: none; | |
| width: var(--tree-toggle-width); | |
| &:hover { | |
| color: #000; | |
| } | |
| span { | |
| border-bottom: 4px solid transparent; | |
| border-left: 4px solid currentColor; | |
| border-top: 4px solid transparent; | |
| box-sizing: border-box; | |
| display: inline-block; | |
| height: 8px; | |
| pointer-events: none; | |
| transition: transform 0.15s; | |
| width: 4px; | |
| } | |
| } | |
| .view-label { | |
| padding-left: 4px; | |
| padding-right: 4px; | |
| pointer-events: none; | |
| &.no-id { | |
| color: #888; | |
| font-style: italic; | |
| } | |
| .leaf & { | |
| margin-left: var(--tree-toggle-width); | |
| } | |
| } | |
| } | |
| } | |
| #div-info-bar { | |
| background-color: #f8f9fa; | |
| border-top: solid 1px var(--color-sep); | |
| box-sizing: border-box; | |
| contain: strict; | |
| display: flex; | |
| flex-direction: column; | |
| flex-shrink: 0; | |
| font-family: monospace; | |
| height: 5em; | |
| justify-content: flex-start; | |
| padding: 10px; | |
| user-select: none; | |
| white-space: nowrap; | |
| width: 100%; | |
| .view-info .view-class, | |
| .hint-text { | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .view-info { | |
| display: flex; | |
| flex-direction: column; | |
| .view-class { | |
| font-weight: bold; | |
| } | |
| .view-dims { | |
| align-items: flex-start; | |
| color: #007bff; | |
| display: inline-flex; | |
| gap: 15px; | |
| flex-direction: row; | |
| justify-content: flex-start; | |
| .size-dp { | |
| font-weight: bold; | |
| } | |
| } | |
| } | |
| .hint-text { | |
| color: #666; | |
| font-style: italic; | |
| margin-bottom: -4px; | |
| margin-top: auto; | |
| } | |
| } | |
| #div-overlay { | |
| &:not(.hidden) { | |
| align-items: center; | |
| background-color: rgba(0, 0, 0, 0.5); | |
| color: white; | |
| display: flex; | |
| font-size: 2em; | |
| height: 100%; | |
| justify-content: center; | |
| left: 0; | |
| position: fixed; | |
| top: 0; | |
| width: 100%; | |
| z-index: var(--z-index-overlay); | |
| } | |
| .content { | |
| align-items: center; | |
| display: flex; | |
| inset: var(--body-padding); | |
| justify-content: center; | |
| position: absolute; | |
| } | |
| } |