mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-03 02:21:05 +08:00
I've also moved the dark-mode-related style out to the host because this .theme-with-dark-background is more of the host's styling logic, and shouldn't be the logic of Adorner. screencast: https://imgur.com/a/SHXloTg Bug: chromium:1116310 Change-Id: I0647c7b6b97042f4c6a4257dc746b4be6f641c6f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2354102 Commit-Queue: Changhao Han <changhaohan@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org> Auto-Submit: Changhao Han <changhaohan@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org>
380 lines
7.8 KiB
CSS
380 lines
7.8 KiB
CSS
/*
|
|
* Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
.editing {
|
|
box-shadow: var(--drop-shadow);
|
|
background-color: white;
|
|
text-overflow: clip !important;
|
|
padding-left: 2px;
|
|
margin-left: -2px;
|
|
padding-right: 2px;
|
|
margin-right: -2px;
|
|
margin-bottom: -1px;
|
|
padding-bottom: 1px;
|
|
opacity: 100% !important;
|
|
}
|
|
|
|
.editing,
|
|
.editing * {
|
|
color: #222 !important;
|
|
text-decoration: none !important;
|
|
}
|
|
|
|
.editing br {
|
|
display: none;
|
|
}
|
|
|
|
.elements-disclosure {
|
|
width: 100%;
|
|
display: inline-block;
|
|
line-height: normal;
|
|
}
|
|
|
|
.elements-disclosure li {
|
|
/** Keep margin-left & padding-left in sync with ElementsTreeElements.updateDecorators **/
|
|
padding: 1px 0 0 14px;
|
|
margin-left: -2px;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
min-height: 15px;
|
|
line-height: 1.36;
|
|
}
|
|
|
|
.elements-disclosure li.parent {
|
|
/** Keep it in sync with ElementsTreeElements.updateDecorators **/
|
|
margin-left: -13px;
|
|
}
|
|
|
|
.elements-disclosure li .selected-hint::before {
|
|
font-style: italic;
|
|
content: " == $0";
|
|
opacity: 0%;
|
|
position: absolute;
|
|
white-space: pre;
|
|
}
|
|
|
|
.elements-disclosure .elements-tree-outline:not(.hide-selection-when-blurred) li.selected .selected-hint::before {
|
|
opacity: 60%;
|
|
}
|
|
|
|
.elements-disclosure li.parent::before {
|
|
box-sizing: border-box;
|
|
user-select: none;
|
|
-webkit-mask-image: url(Images/treeoutlineTriangles.svg);
|
|
-webkit-mask-size: 32px 24px;
|
|
content: '\A0\A0';
|
|
color: transparent;
|
|
text-shadow: none;
|
|
margin-right: -3px;
|
|
-webkit-mask-position: 0 0;
|
|
background-color: #727272;
|
|
}
|
|
|
|
.elements-disclosure li.parent.expanded::before {
|
|
-webkit-mask-position: -16px 0;
|
|
}
|
|
|
|
.elements-disclosure li.always-parent::before {
|
|
visibility: hidden;
|
|
}
|
|
|
|
.elements-disclosure li .selection {
|
|
display: none;
|
|
z-index: -1;
|
|
}
|
|
|
|
.elements-disclosure li.selected .selection {
|
|
display: block;
|
|
}
|
|
|
|
.elements-disclosure li.elements-drag-over .selection {
|
|
display: block;
|
|
margin-top: -2px;
|
|
border-top: 2px solid var(--selection-bg-color);
|
|
}
|
|
|
|
.elements-disclosure .elements-tree-outline:not(.hide-selection-when-blurred) .selection {
|
|
background-color: var(--item-selection-inactive-bg-color);
|
|
}
|
|
|
|
.elements-disclosure li.hovered:not(.selected) .selection {
|
|
display: block;
|
|
left: 3px;
|
|
right: 3px;
|
|
background-color: var(--item-hover-color);
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.elements-disclosure li .webkit-html-tag.close {
|
|
margin-left: -12px;
|
|
}
|
|
|
|
.elements-disclosure .elements-tree-outline.hide-selection-when-blurred .selected:focus[data-keyboard-focus="true"] .highlight > * {
|
|
background: var(--focus-bg-color);
|
|
border-radius: 2px;
|
|
box-shadow: 0 0 0 2px var(--focus-bg-color);
|
|
}
|
|
|
|
.elements-disclosure .elements-tree-outline:not(.hide-selection-when-blurred) li.selected:focus .selection {
|
|
background-color: var(--item-selection-bg-color);
|
|
}
|
|
|
|
.elements-disclosure ol {
|
|
list-style-type: none;
|
|
|
|
/** Keep it in sync with ElementsTreeElements.updateDecorators **/
|
|
padding-inline-start: 12px;
|
|
margin: 0;
|
|
}
|
|
|
|
.elements-disclosure ol.children {
|
|
display: none;
|
|
}
|
|
|
|
.elements-disclosure ol.children.expanded {
|
|
display: block;
|
|
}
|
|
|
|
.elements-disclosure > ol {
|
|
position: relative;
|
|
margin: 0;
|
|
cursor: default;
|
|
min-width: 100%;
|
|
min-height: 100%;
|
|
padding-left: 2px;
|
|
}
|
|
|
|
.elements-disclosure li.in-clipboard .highlight {
|
|
outline: 1px dotted darkgrey;
|
|
}
|
|
|
|
.elements-tree-outline ol.shadow-root-depth-4 {
|
|
background-color: rgb(0 0 0 / 4%);
|
|
}
|
|
|
|
.elements-tree-outline ol.shadow-root-depth-3 {
|
|
background-color: rgb(0 0 0 / 3%);
|
|
}
|
|
|
|
.elements-tree-outline ol.shadow-root-depth-2 {
|
|
background-color: rgb(0 0 0 / 2%);
|
|
}
|
|
|
|
.elements-tree-outline ol.shadow-root-depth-1 {
|
|
background-color: rgb(0 0 0 / 1%);
|
|
}
|
|
|
|
.elements-tree-outline ol.shadow-root-deep {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.elements-tree-editor {
|
|
box-shadow: var(--drop-shadow);
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.CodeMirror {
|
|
background-color: white;
|
|
height: 300px !important;
|
|
}
|
|
|
|
.CodeMirror-lines {
|
|
padding: 0;
|
|
}
|
|
|
|
.CodeMirror pre {
|
|
padding: 0;
|
|
}
|
|
|
|
button,
|
|
input,
|
|
select {
|
|
font-family: inherit;
|
|
font-size: inherit;
|
|
}
|
|
|
|
.elements-gutter-decoration {
|
|
position: absolute;
|
|
top: 3px;
|
|
left: 2px;
|
|
height: 9px;
|
|
width: 9px;
|
|
border-radius: 5px;
|
|
border: 1px solid orange;
|
|
background-color: orange;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.elements-gutter-decoration.elements-has-decorated-children {
|
|
opacity: 50%;
|
|
}
|
|
|
|
.add-attribute {
|
|
margin-left: 1px;
|
|
margin-right: 1px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.elements-tree-nowrap,
|
|
.elements-tree-nowrap .li {
|
|
white-space: pre !important;
|
|
}
|
|
|
|
.elements-disclosure .elements-tree-nowrap li {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
/* DOM update highlight */
|
|
@keyframes dom-update-highlight-animation {
|
|
from {
|
|
background-color: rgb(158 54 153);
|
|
color: white;
|
|
}
|
|
|
|
80% {
|
|
background-color: rgb(245 219 244);
|
|
color: inherit;
|
|
}
|
|
|
|
to {
|
|
background-color: inherit;
|
|
}
|
|
}
|
|
|
|
@keyframes dom-update-highlight-animation-dark {
|
|
from {
|
|
background-color: rgb(158 54 153);
|
|
color: white;
|
|
}
|
|
|
|
80% {
|
|
background-color: #333;
|
|
color: inherit;
|
|
}
|
|
|
|
to {
|
|
background-color: inherit;
|
|
}
|
|
}
|
|
|
|
.dom-update-highlight {
|
|
animation: dom-update-highlight-animation 1.4s 1 cubic-bezier(0, 0, 0.2, 1);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
:host-context(.-theme-with-dark-background) .dom-update-highlight {
|
|
animation: dom-update-highlight-animation-dark 1.4s 1 cubic-bezier(0, 0, 0.2, 1);
|
|
}
|
|
|
|
.elements-disclosure.single-node li {
|
|
padding-left: 2px;
|
|
}
|
|
|
|
.elements-tree-shortcut-title,
|
|
.elements-tree-shortcut-link {
|
|
color: rgb(87 87 87);
|
|
}
|
|
|
|
.elements-disclosure .gutter-container {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
cursor: pointer;
|
|
width: 15px;
|
|
height: 15px;
|
|
}
|
|
|
|
.elements-hide-gutter .gutter-container {
|
|
display: none;
|
|
}
|
|
|
|
.gutter-menu-icon {
|
|
display: block;
|
|
visibility: hidden;
|
|
transform: rotate(-90deg) scale(0.8);
|
|
background-color: white;
|
|
position: relative;
|
|
left: -7px;
|
|
top: -3px;
|
|
}
|
|
|
|
.elements-disclosure li.selected .gutter-container:not(.has-decorations) .gutter-menu-icon {
|
|
visibility: visible;
|
|
}
|
|
|
|
/** Guide line */
|
|
|
|
li.selected {
|
|
z-index: 0;
|
|
}
|
|
|
|
li.hovered:not(.always-parent) + ol.children,
|
|
.elements-tree-outline ol.shadow-root,
|
|
li.selected:not(.always-parent) + ol.children {
|
|
margin-left: 5px;
|
|
padding-inline-start: 6px;
|
|
border-width: 1px;
|
|
border-left-style: solid;
|
|
}
|
|
|
|
li.selected:not(.always-parent) + ol.children {
|
|
border-color: hsl(216deg 68% 80% / 100%) !important;
|
|
}
|
|
|
|
li.hovered:not(.always-parent) + ol.children:not(.shadow-root) {
|
|
border-color: hsl(0deg 0% 0% / 10%);
|
|
}
|
|
|
|
.elements-tree-outline ol.shadow-root {
|
|
border-color: hsl(0deg 0% 80% / 100%);
|
|
}
|
|
|
|
@media (forced-colors: active) {
|
|
.elements-disclosure li.parent::before {
|
|
forced-color-adjust: none;
|
|
background-color: ButtonText !important;
|
|
}
|
|
|
|
.elements-disclosure .elements-tree-outline:not(.hide-selection-when-blurred) li.selected .selected-hint::before {
|
|
opacity: unset;
|
|
}
|
|
|
|
.elements-disclosure .elements-tree-outline:not(.hide-selection-when-blurred) .selection,
|
|
.elements-disclosure li.hovered:not(.selected) .selection,
|
|
.elements-disclosure .elements-tree-outline:not(.hide-selection-when-blurred) li.selected:focus .selection {
|
|
forced-color-adjust: none;
|
|
background: canvas !important;
|
|
border: 1px solid Highlight !important;
|
|
}
|
|
|
|
.gutter-menu-icon {
|
|
forced-color-adjust: none;
|
|
}
|
|
}
|
|
|
|
/** Adorner */
|
|
.adorner-container {
|
|
display: inline-block;
|
|
}
|
|
|
|
.adorner-container.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.adorner-container devtools-adorner {
|
|
margin-left: 3px;
|
|
vertical-align: text-bottom;
|
|
}
|
|
|
|
:host-context(.-theme-with-dark-background) devtools-adorner {
|
|
--adorner-text-color: #ffffffde;
|
|
--adorner-background-color: #5db0d726;
|
|
--adorner-border: 1px solid #5db0d780;
|
|
--adorner-border-focus: 1px solid #5db0d7;
|
|
--adorner-text-color-active: #242424;
|
|
--adorner-background-color-active: #5db0d7;
|
|
}
|