mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 20:39:31 +08:00
- Console prompt is cleared when text is pinned - Pins persist across refresh - Newly created pin runs with side effects until text differs or new expression is committed (on blur) - Ctrl-Enter moves focus from Pin to Console prompt - Added command menu option to create new pin - Pressing Tab indents, moves focus iff pin is empty (same logic as Console prompt) - Pins producing errors show error message on red background - Pin text is trimmed upon blur/commit Bug: 849875 Change-Id: I641abb6b5e19a84c17b1a6cd3e50ca7b459f2015 Reviewed-on: https://chromium-review.googlesource.com/1141096 Commit-Queue: Erik Luo <luoe@chromium.org> Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org> Reviewed-by: Joel Einbinder <einbinder@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#586108} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 811a4303b8b973d61567d61372ec8e1d692037c0
87 lines
1.8 KiB
CSS
87 lines
1.8 KiB
CSS
/*
|
|
* Copyright 2018 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.
|
|
*/
|
|
|
|
.console-pins {
|
|
overflow-y: auto;
|
|
background: var(--toolbar-bg-color);
|
|
--error-background-color: hsl(0, 100%, 97%);
|
|
--error-border-color: hsl(0, 100%, 92%);
|
|
--error-text-color: red;
|
|
}
|
|
|
|
:host-context(.-theme-with-dark-background) .console-pins {
|
|
--error-background-color: hsl(0, 100%, 8%);
|
|
--error-border-color: rgb(92, 0, 0);
|
|
--error-text-color: hsl(0, 100%, 75%);
|
|
}
|
|
|
|
.console-pins:not(:empty) {
|
|
border-bottom: 1px solid var(--divider-color);
|
|
}
|
|
|
|
.console-pin {
|
|
position: relative;
|
|
user-select: text;
|
|
flex: none;
|
|
padding: 2px 0 6px 24px;
|
|
}
|
|
|
|
.console-pin:not(:last-child) {
|
|
border-bottom: 1px solid #e4e4e4;
|
|
}
|
|
|
|
.console-pin:not(:last-child).error-level:not(:focus-within) {
|
|
border-top: 1px solid var(--error-border-color);
|
|
border-bottom: 1px solid var(--error-border-color);
|
|
margin-top: -1px;
|
|
}
|
|
|
|
.console-pin.error-level:not(:focus-within) {
|
|
background-color: var(--error-background-color);
|
|
color: var(--error-text-color);
|
|
}
|
|
|
|
.console-pin-name {
|
|
margin-left: -4px;
|
|
margin-bottom: 1px;
|
|
height: auto;
|
|
}
|
|
|
|
.console-pin-name,
|
|
.console-pin-preview {
|
|
width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
min-height: 13px;
|
|
}
|
|
|
|
:host-context(.-theme-with-dark-background) .console-delete-pin {
|
|
filter: brightness(2);
|
|
}
|
|
|
|
.console-delete-pin {
|
|
position: absolute;
|
|
top: 8px;
|
|
left: 8px;
|
|
opacity: 0.7;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.console-delete-pin:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.console-pin-name:focus-within {
|
|
background: #fff;
|
|
box-shadow: var(--focus-ring-active-shadow) inset;
|
|
}
|
|
|
|
.console-pin:focus-within .console-pin-preview,
|
|
.console-pin-name:not(:focus-within):not(:hover) {
|
|
opacity: 0.6;
|
|
}
|