mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
434 lines
12 KiB
CSS
434 lines
12 KiB
CSS
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
html,
|
|
body {
|
|
height: 100vh;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#app-wrapper {
|
|
height: 100vh;
|
|
max-height: 100vh;
|
|
}
|
|
|
|
.webconsole-output {
|
|
direction: ltr;
|
|
overflow: auto;
|
|
overflow-anchor: none;
|
|
user-select: text;
|
|
position: relative;
|
|
}
|
|
|
|
.webconsole-app {
|
|
--object-inspector-hover-background: transparent;
|
|
--attachment-margin-block-end: 3px;
|
|
--primary-toolbar-height: 29px;
|
|
display: grid;
|
|
/*
|
|
* Here's the design we want in in-line mode
|
|
* +----------------------------------------------+
|
|
* | Filter bar primary ↔ |
|
|
* +----------------------------↔ |
|
|
* | [Filter bar secondary] ↔ |
|
|
* +----------------------------↔ |
|
|
* | ↔ |
|
|
* + +----------------------+ ↔ |
|
|
* | | | ↔ |
|
|
* | | Output | ↔ [sidebar] |
|
|
* | | | ↔ |
|
|
* | +----------------------+ ↔ |
|
|
* | | [NotificationBox] | ↔ |
|
|
* | +----------------------+ ↔ |
|
|
* | | | ↔ |
|
|
* | | JSTerm | ↔ |
|
|
* | | | ↔ |
|
|
* | +----------------------+ ↔ |
|
|
* | ↔ |
|
|
* +----------------------------↔ |
|
|
* | [Reverse search input] ↔ |
|
|
* +----------------------------------------------+
|
|
*
|
|
* - ↔ are width resizers
|
|
* - Elements inside brackets may not be visible, so we set
|
|
* rows/columns to "auto" to make them collapse when the element
|
|
* they contain is hidden.
|
|
*/
|
|
grid-template-rows: var(--primary-toolbar-height) auto 1fr auto;
|
|
grid-template-columns: minmax(200px, 1fr) minmax(0, auto);
|
|
max-height: 100vh !important;
|
|
height: 100vh !important;
|
|
width: 100vw;
|
|
overflow: hidden;
|
|
color: var(--console-output-color);
|
|
-moz-user-focus: normal;
|
|
}
|
|
|
|
.webconsole-filteringbar-wrapper {
|
|
grid-column: 1 / 2;
|
|
grid-row: 1 / 3;
|
|
grid-template-rows: subgrid;
|
|
}
|
|
|
|
.webconsole-filterbar-primary {
|
|
grid-row: 1 / 2;
|
|
}
|
|
|
|
/* Only put the filter buttons toolbar on its own row in narrow filterbar layout */
|
|
.narrow .devtools-toolbar.webconsole-filterbar-secondary {
|
|
grid-row: 2 / 3;
|
|
}
|
|
|
|
.flexible-output-input {
|
|
display: flex;
|
|
flex-direction: column;
|
|
grid-column: 1 / 2;
|
|
grid-row: 3 / 4;
|
|
/* Don't take more height than the grid allows to */
|
|
max-height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.flexible-output-input .webconsole-output {
|
|
flex-shrink: 100000;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.flexible-output-input > .webconsole-output:not(:empty) {
|
|
min-height: 19px;
|
|
}
|
|
|
|
/* webconsole.css | chrome://devtools/skin/webconsole.css */
|
|
.webconsole-filteringbar-wrapper .devtools-toolbar {
|
|
padding-inline-end: 0;
|
|
}
|
|
|
|
.devtools-button.webconsole-console-settings-menu-button {
|
|
height: 100%;
|
|
margin: 0;
|
|
}
|
|
|
|
.webconsole-console-settings-menu-button::before {
|
|
background-image: url("chrome://devtools/skin/images/settings.svg");
|
|
}
|
|
|
|
.webconsole-app .jsterm-input-container {
|
|
min-height: 28px;
|
|
padding-block-start: 2px;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
flex-grow: 1;
|
|
/* We display the open editor button at the end of the input */
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
/* This allows us to not define a column for the CodeMirror container */
|
|
grid-auto-flow: column;
|
|
}
|
|
|
|
.webconsole-app:not(.jsterm-editor) .jsterm-input-container {
|
|
direction: ltr;
|
|
}
|
|
|
|
.webconsole-app .webconsole-output:empty ~ .jsterm-input-container {
|
|
border-top: none;
|
|
}
|
|
|
|
.webconsole-input-openEditorButton {
|
|
grid-column: -1 / -2;
|
|
height: 24px;
|
|
margin: 0;
|
|
}
|
|
|
|
:root:dir(rtl) .webconsole-input-openEditorButton {
|
|
transform: scaleX(-1);
|
|
}
|
|
|
|
.webconsole-input-openEditorButton::before {
|
|
background-image: url("chrome://devtools/skin/images/webconsole/editor.svg");
|
|
}
|
|
|
|
.reverse-search {
|
|
grid-column: 1 / 2;
|
|
grid-row: -1 / -2;
|
|
border-top: 1px solid var(--theme-splitter-color);
|
|
border-inline-end: 1px solid var(--theme-splitter-color);
|
|
}
|
|
|
|
.sidebar {
|
|
display: grid;
|
|
grid-row: 1 / -1;
|
|
grid-column: -1 / -2;
|
|
grid-template-rows: subgrid;
|
|
border-inline-start: 1px solid var(--theme-splitter-color);
|
|
background-color: var(--theme-sidebar-background);
|
|
width: 200px;
|
|
min-width: 150px;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.sidebar-resizer {
|
|
grid-row: 1 / -1;
|
|
grid-column: -1 / -2;
|
|
}
|
|
|
|
.webconsole-sidebar-toolbar {
|
|
grid-row: 1 / 2;
|
|
min-height: 100%;
|
|
display: flex;
|
|
justify-content: end;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.sidebar-contents {
|
|
grid-row: 2 / -1;
|
|
overflow: auto;
|
|
}
|
|
|
|
.webconsole-sidebar-toolbar .sidebar-close-button {
|
|
margin: 0;
|
|
}
|
|
|
|
.sidebar-close-button::before {
|
|
background-image: url("chrome://devtools/skin/images/close.svg");
|
|
}
|
|
|
|
.sidebar-contents .object-inspector {
|
|
min-width: 100%;
|
|
}
|
|
|
|
/** EDITOR MODE */
|
|
.webconsole-app.jsterm-editor {
|
|
display: grid;
|
|
/*
|
|
* Here's the design we want in editor mode
|
|
* +-----------------------------------------------------------------------+
|
|
* | [Notification Box (self XSS warning)] |
|
|
* +--------------------------+--------------------------+-----------------+
|
|
* | Editor Toolbar ↔ Filter bar primary ↔ |
|
|
* +--------------------------↔--------------------------↔ |
|
|
* | ↔ [Filter bar secondary] ↔ |
|
|
* | ↔--------------------------↔ |
|
|
* | ↔ ↔ |
|
|
* | Editor ↔ output ↔ [sidebar] |
|
|
* | ↔ ↔ |
|
|
* | ↔ ↔ |
|
|
* | ↔ ↔ |
|
|
* | ↔ ↔ |
|
|
* +--------------------------↔ ↔ |
|
|
* | [Reverse search input] ↔ ↔ |
|
|
* +-----------------------------------------------------+-----------------+
|
|
*
|
|
* - ↔ are width resizers
|
|
* - Elements inside brackets may not be visible, so we set
|
|
* rows/columns to "auto" to make them collapse when the element
|
|
* they contain is hidden.
|
|
*/
|
|
grid-template-rows:
|
|
auto
|
|
var(--primary-toolbar-height)
|
|
auto
|
|
1fr
|
|
auto;
|
|
grid-template-columns: minmax(150px, auto) minmax(200px, 1fr) minmax(0, auto);
|
|
}
|
|
|
|
.jsterm-editor .flexible-output-input {
|
|
/* This allow us to place the div children (jsterm, output, notification) on the grid */
|
|
display: contents;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-filteringbar-wrapper {
|
|
grid-row: 2 / 4;
|
|
grid-column: 2 / 3;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-filterbar-primary {
|
|
grid-row: 1 / 2;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar {
|
|
grid-column: 1 / 2;
|
|
grid-row: 2 / 3;
|
|
border-inline-end: 1px solid var(--theme-splitter-color);
|
|
display: grid;
|
|
align-items: center;
|
|
/*
|
|
* The following elements are going to be present in the toolbar:
|
|
* - The run button
|
|
* - The history nav
|
|
* - A separator
|
|
* - The close button
|
|
*
|
|
* +-------------------------------------------+
|
|
* | ▶︎ Run ˄ ˅ 🔍 | ✕ |
|
|
* +-------------------------------------------+
|
|
*
|
|
*/
|
|
grid-template-columns: auto 1fr auto auto auto auto auto;
|
|
height: unset;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-executeButton {
|
|
padding-inline: 4px 8px;
|
|
height: 20px;
|
|
margin-inline-start: 5px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-executeButton::before {
|
|
content: url("chrome://devtools/skin/images/webconsole/run.svg");
|
|
height: 16px;
|
|
width: 16px;
|
|
-moz-context-properties: fill;
|
|
fill: currentColor;
|
|
margin-inline-end: 2px;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-history-prevExpressionButton {
|
|
grid-column: -5 / -6;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-history-nextExpressionButton {
|
|
grid-column: -4 / -5;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-reverseSearchButton {
|
|
grid-column: -3 / -4;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-historyNavSeparator {
|
|
grid-column: -2 / -3;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-closeButton {
|
|
grid-column: -1 / -2;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-history-prevExpressionButton::before {
|
|
background-image: url("chrome://devtools/skin/images/arrowhead-up.svg");
|
|
background-size: 16px;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-history-nextExpressionButton::before {
|
|
background-image: url("chrome://devtools/skin/images/arrowhead-down.svg");
|
|
background-size: 16px;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-reverseSearchButton::before {
|
|
background-image: url("chrome://devtools/skin/images/webconsole/reverse-search.svg");
|
|
background-size: 14px;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-editor-toolbar .webconsole-editor-toolbar-closeButton::before {
|
|
background-image: url("chrome://devtools/skin/images/close.svg");
|
|
}
|
|
|
|
.jsterm-editor .webconsole-input-openEditorButton {
|
|
display: none;
|
|
}
|
|
|
|
.jsterm-editor .webconsole-output {
|
|
grid-column: 2 / 3;
|
|
grid-row: 4 / -1;
|
|
}
|
|
|
|
.jsterm-editor .jsterm-input-container {
|
|
grid-column: 1 / 2;
|
|
grid-row: 3 / 5;
|
|
width: 30vw;
|
|
/* Don't allow the input to be narrower than the grid-column it's in */
|
|
min-width: 100%;
|
|
border-top: none;
|
|
border-inline-end: 1px solid var(--theme-splitter-color);
|
|
padding: 0;
|
|
/* Needed as we might have the onboarding UI displayed */
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.jsterm-editor #webconsole-notificationbox {
|
|
grid-column: -1 / 1;
|
|
grid-row: 1 / 2;
|
|
}
|
|
|
|
.jsterm-editor .jsterm-input-container > .CodeMirror {
|
|
flex: 1;
|
|
padding-inline-start: 0;
|
|
font-size: var(--theme-code-font-size);
|
|
line-height: var(--theme-code-line-height);
|
|
background-image: none;
|
|
}
|
|
|
|
.jsterm-editor .sidebar {
|
|
grid-row: 2 / -1;
|
|
}
|
|
|
|
.jsterm-editor .editor-resizer {
|
|
grid-column: 1 / 2;
|
|
/* We want the splitter to cover the whole column (minus self-xss message) */
|
|
grid-row: 2 / -1;
|
|
}
|
|
|
|
.jsterm-editor .sidebar-resizer {
|
|
grid-column: -1 / -2;
|
|
/* We want the splitter to cover the whole column (minus self-xss message) */
|
|
grid-row: 2 / -1;
|
|
}
|
|
|
|
.editor-onboarding {
|
|
display: none;
|
|
}
|
|
|
|
.jsterm-editor .editor-onboarding {
|
|
display: grid;
|
|
/**
|
|
* Here's the design we want:
|
|
* ┌──────┬────────────────────────┐
|
|
* │ Icon │ Onboarding text │
|
|
* ├──────┼────────────────────────┤
|
|
* │ │ Got it!│
|
|
* └──────┴────────────────────────┘
|
|
**/
|
|
grid-template-columns: 22px 1fr;
|
|
border-bottom: 1px solid var(--theme-splitter-color);
|
|
padding: 8px 16px;
|
|
background-color: var(--theme-selection-background-hover);
|
|
grid-gap: 0 14px;
|
|
font-family: system-ui, -apple-system, sans-serif;
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.editor-onboarding-fox {
|
|
width: 22px;
|
|
height: 22px;
|
|
align-self: center;
|
|
}
|
|
|
|
.jsterm-editor .editor-onboarding p {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.jsterm-editor .editor-onboarding .editor-onboarding-shortcut {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.editor-onboarding-dismiss-button {
|
|
grid-row: 2 / 3;
|
|
grid-column: 2 / 3;
|
|
justify-self: end;
|
|
padding: 2px;
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--theme-highlight-blue);
|
|
font-family: inherit;
|
|
cursor: pointer;
|
|
font-size: inherit;
|
|
}
|