| /* | |
| * 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. | |
| */ | |
| @scope to (devtools-widget > *) { | |
| .webmcp-view { | |
| height: 100%; | |
| width: 100%; | |
| } | |
| .call-log, | |
| .tool-list { | |
| height: 100%; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: auto; | |
| padding: 0; | |
| } | |
| .empty-view-scroller { | |
| flex: auto; | |
| } | |
| devtools-data-grid { | |
| flex: auto; | |
| } | |
| .data-grid { | |
| th { | |
| height: 26px; | |
| } | |
| td { | |
| vertical-align: middle; | |
| } | |
| tr.status-cancelled { | |
| color: var(--sys-color-on-surface-light); | |
| } | |
| tr.status-error { | |
| color: var(--sys-color-error); | |
| } | |
| tr.selected { | |
| background-color: var(--sys-color-tonal-container); | |
| } | |
| tbody tr.selected.status-error, | |
| tbody tr.selected.status-error.revealed { | |
| background-color: var(--sys-color-error-container); | |
| color: var(--sys-color-error); | |
| } | |
| tbody tr:hover .run-tool-action-button, | |
| tbody tr:focus-within .run-tool-action-button, | |
| &:focus-within tbody tr.selected .run-tool-action-button { | |
| display: flex; | |
| } | |
| } | |
| .section-title { | |
| display: flex; | |
| gap: var(--sys-size-2); | |
| background-color: var(--sys-color-surface1); | |
| padding: 0 var(--sys-size-3); | |
| line-height: var(--sys-size-10); | |
| overflow: hidden; | |
| align-items: center; | |
| flex: none; | |
| color: var(--sys-color-on-surface); | |
| border-bottom: var(--sys-size-1) solid var(--sys-color-divider); | |
| devtools-button { | |
| margin: calc(-1 * var(--sys-size-1)) 0; | |
| } | |
| } | |
| .status-cell { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--sys-size-3); | |
| } | |
| .name-cell { | |
| display: flex; | |
| gap: var(--sys-size-5); | |
| align-items: center; | |
| min-width: 0; | |
| } | |
| .name-cell > span { | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| min-width: 0; | |
| } | |
| .run-tool-action-button { | |
| display: none; | |
| width: var(--sys-size-8); | |
| height: var(--sys-size-8); | |
| padding: 0; | |
| border: none; | |
| background-color: transparent; | |
| cursor: pointer; | |
| align-items: center; | |
| justify-content: center; | |
| flex-shrink: 0; | |
| devtools-icon { | |
| width: var(--sys-size-7); | |
| height: var(--sys-size-7); | |
| color: var(--sys-color-primary); | |
| } | |
| } | |
| .tool-details { | |
| height: 100%; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .tool-details-grid { | |
| display: grid; | |
| grid-template-columns: min-content 1fr; | |
| gap: var(--sys-size-6); | |
| padding: calc(0.5*var(--sys-size-6)) var(--sys-size-8); | |
| align-items: flex-start; | |
| overflow-y: auto; | |
| .label { | |
| color: var(--sys-color-on-surface-subtle); | |
| white-space: nowrap; | |
| padding: var(--sys-size-3) 0; | |
| } | |
| .value { | |
| user-select: text; | |
| &.source-code { | |
| color: var(--sys-color-token-property-special); | |
| } | |
| padding: var(--sys-size-3) 0; | |
| color: var(--sys-color-on-surface); | |
| overflow-wrap: anywhere; | |
| &.stack-trace { | |
| display: flex; | |
| padding: 0; | |
| margin-top: calc(-1 * (var(--sys-size-1) + var(--sys-size-2))); | |
| margin-left: calc(-1 * var(--sys-size-3)); | |
| } | |
| &.schema { | |
| padding: 0; | |
| min-width: 0; | |
| overflow: hidden; | |
| > devtools-widget { | |
| display: block; | |
| max-width: 100%; | |
| } | |
| } | |
| &.tool-origin-container { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--sys-size-4); | |
| } | |
| .tool-origin-node { | |
| display: flex; | |
| align-items: center; | |
| cursor: default; | |
| } | |
| } | |
| .show-element { | |
| height: 1lh; | |
| } | |
| } | |
| devtools-list { | |
| flex: 1 1 auto; | |
| margin: 0; | |
| padding: var(--sys-size-4) 0; | |
| box-sizing: border-box; | |
| } | |
| .tool-item { | |
| display: flex; | |
| flex-direction: column; | |
| padding: var(--sys-size-5) var(--sys-size-4); | |
| gap: var(--sys-size-3); | |
| width: 100%; | |
| box-sizing: border-box; | |
| border-bottom: var(--sys-size-1) solid var(--sys-color-divider); | |
| &:hover { | |
| background-color: var(--sys-color-state-hover-on-subtle); | |
| } | |
| &.selected { | |
| background-color: var(--sys-color-tonal-container); | |
| } | |
| } | |
| .tool-name-container { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| gap: var(--sys-size-5); | |
| .tool-icons { | |
| display: flex; | |
| gap: var(--sys-size-2); | |
| align-items: center; | |
| } | |
| /* stylelint-disable-next-line selector-type-no-unknown */ | |
| icon-button { | |
| flex-shrink: 0; | |
| display: flex; | |
| align-items: center; | |
| cursor: pointer; | |
| } | |
| } | |
| .tool-name.source-code { | |
| color: var(--sys-color-token-property-special); | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| min-width: 0; | |
| flex: 1; | |
| } | |
| .tool-description { | |
| color: var(--sys-color-on-surface); | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| devtools-toolbar-input { | |
| flex-grow: 1; | |
| flex-shrink: 1; | |
| } | |
| .toolbar-text.status-error-text { | |
| color: var(--sys-color-error); | |
| } | |
| .toolbar-text.status-cancelled-text { | |
| color: var(--sys-color-on-surface-light); | |
| } | |
| .call-details-tabbed-pane { | |
| flex: auto; | |
| border-bottom: var(--sys-size-1) solid var(--sys-color-divider); | |
| } | |
| .call-payload-view { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| } | |
| .call-payload-content { | |
| padding: var(--sys-size-5); | |
| flex: auto; | |
| overflow: auto; | |
| } | |
| .payload-value.error-text { | |
| color: var(--sys-color-error); | |
| white-space: pre-wrap; | |
| } | |
| .sidebar-tool-details { | |
| flex: none; | |
| border-bottom: var(--sys-size-1) solid var(--sys-color-divider); | |
| } | |
| .call-to-action { | |
| background-color: var(--sys-color-neutral-container); | |
| padding: var(--sys-size-5); | |
| border-radius: 5px; | |
| margin: var(--sys-size-3); | |
| } | |
| .call-to-action-body { | |
| padding: var(--sys-size-4) 0; | |
| margin-left: 9.5px; | |
| border-left: var(--sys-size-2) solid var(--issue-color-yellow); | |
| padding-left: 18px; | |
| line-height: var(--sys-typescale-body3-line-height); | |
| } | |
| .call-to-action .explanation { | |
| font-weight: bold; | |
| } | |
| .inline-icon { | |
| vertical-align: middle; | |
| } | |
| .json-editor-widget { | |
| flex: auto; | |
| /* extend the JSON editor padding to match the details grid */ | |
| padding-left: calc(var(--sys-size-8) - 1em); | |
| min-height: 0; | |
| } | |
| .webmcp-run-tool-button { | |
| align-self: flex-end; | |
| margin: var(--sys-size-6) var(--sys-size-8); | |
| } | |
| } | |
| /* The schema tree is a child of a nested devtools-widget, which the @scope above excludes. */ | |
| .tool-details-grid .value.schema > devtools-widget > devtools-tree { | |
| display: block; | |
| max-width: 100%; | |
| } |