gecko-dev/devtools/client/themes/toolbox.css

711 строки
16 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/. */
/*
* Debug Target Info layout
* +------------+--------------+------------------------+
* | connection | runtime info | target info icon + text |
* +------------+--------------+------------------------+
*/
.debug-target-info {
display: flex;
background: var(--theme-tab-toolbar-background);
border-bottom: 1px solid var(--theme-splitter-color);
padding: 4px 0;
font-size: 1.2em;
color: var(--theme-toolbar-color);
}
/*
* Debug Target labels with icon layout
* +------+------------------------+---------------+
* | icon | label text (bold) | optional text |
* | 20px | max-content | max-content |
* +------+------------------------+---------------+
*/
.debug-target-info .iconized-label {
display: grid;
grid-template-columns: 20px auto auto;
grid-column-gap: 8px;
align-items: center;
padding: 0 24px;
white-space: nowrap;
}
.debug-target-info .iconized-label:not(:last-child) {
border-inline-end: 1px solid var(--theme-splitter-color);
}
.debug-target-info .iconized-label img {
width: 20px;
height: 20px;
}
.debug-target-info img {
-moz-context-properties: fill;
fill: var(--theme-toolbar-color);
}
/* Toolbox tabbar */
.devtools-tabbar {
-moz-appearance: none;
/* For narrow devtool width, we define the each column width of tabbar.
Defined layout is as follow:
-------------------------------------------------
| Picker | tooltabs | commands | controls |
| auto | 26px ~ 1fr | auto | max-content|
-------------------------------------------------
*/
display: grid;
grid-template-columns: auto minmax(26px, 1fr) auto max-content;
background: var(--theme-tab-toolbar-background);
border-bottom: 1px solid var(--theme-splitter-color);
box-sizing: border-box;
min-height: 29px;
}
.dragging #toolbox-panel-iframe-webconsole {
pointer-events: none;
}
.toolbox-tabs-wrapper {
position: relative;
display: flex;
flex: 1;
}
/* These classes use to stretch the tool tabs wrapper width if toolbox does'n
have start buttons or end buttons element. */
.devtools-tabbar .toolbox-tabs-wrapper {
grid-column-start: 2;
grid-column-end: 3;
}
.devtools-tabbar-has-start .toolbox-tabs-wrapper {
grid-column-start: 1;
}
.devtools-tabbar-has-end .toolbox-tabs-wrapper {
grid-column-end: 4;
}
.toolbox-tabs {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
margin: 0;
flex: 1;
overflow: hidden;
}
/* Set flex attribute to Toolbox buttons and Picker container so,
they don't overlap with the tab bar */
#toolbox-buttons-start,
#toolbox-buttons-end,
#toolbox-controls {
display: flex;
align-items: stretch;
overflow: hidden;
}
/* Toolbox tabs */
.devtools-tab {
position: relative;
display: flex;
align-items: center;
flex-shrink: 0;
min-height: 24px;
margin: 0;
padding: 0;
border: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: var(--theme-toolbar-color);
background-color: transparent;
}
.devtools-tab-label {
font-size: 12px;
mask-image: linear-gradient(to left, transparent 0, black 6px);
/* Set the end padding on the label to make sure the label gets faded out properly */
padding-inline-end: 8px;
min-width: 1px;
}
.devtools-tab-label:-moz-locale-dir(rtl) {
mask-image: linear-gradient(to right, transparent 0, black 6px);
}
.devtools-tab .devtools-tab-badge {
color: var(--theme-highlight-blue);
font-size: 80%;
font-weight: 500;
margin-inline-start: 4px;
}
.devtools-tab-icon-only {
min-width: 26px;
}
.devtools-tab:hover,
.devtools-tab:focus {
background-color: var(--theme-toolbar-hover);
}
/* Remove system control border from devtools-tab. */
.devtools-tab::-moz-focus-inner {
border: 0;
}
.devtools-tab:hover:active {
background-color: var(--theme-toolbar-hover-active);
}
.devtools-tab.selected {
color: var(--theme-toolbar-selected-color);
}
.devtools-tab > img {
border: none;
margin: 0;
margin-inline-start: 8px;
margin-inline-end: 6px;
height: 16px;
width: 16px;
vertical-align: text-top;
flex-shrink: 0;
-moz-context-properties: fill;
fill: var(--theme-icon-color);
}
.devtools-tab.selected > img {
fill: var(--theme-toolbar-selected-color);
}
.devtools-tab.highlighted > img {
fill: var(--theme-toolbar-highlighted-color);
}
/* Toolbox controls */
#tools-chevron-menu-button::before {
background-image: url("chrome://devtools/skin/images/command-chevron.svg");
}
#tools-chevron-menu-button:-moz-locale-dir(rtl)::before {
transform: rotate(180deg);
}
/* On OSX the cursor turns into a window-resizing cursor at the edges of the
* window, so bring the end of the toolbox in. */
:root[platform="mac"] #toolbox-controls {
margin-inline-end: 2px;
}
#toolbox-buttons-start > .devtools-separator {
margin-inline: 0;
}
#toolbox-buttons-end > .devtools-separator {
margin-inline: 5px;
}
#toolbox-close::before {
background-image: url("chrome://devtools/skin/images/close.svg");
}
#toolbox-meatball-menu-button::before {
background-image: url("chrome://devtools/skin/images/more.svg");
}
#toolbox-meatball-menu-dock-bottom {
--menuitem-icon-image: url("chrome://devtools/skin/images/dock-bottom.svg");
}
#toolbox-meatball-menu-dock-left {
--menuitem-icon-image: url("chrome://devtools/skin/images/dock-side-left.svg");
}
#toolbox-meatball-menu-dock-right {
--menuitem-icon-image: url("chrome://devtools/skin/images/dock-side-right.svg");
}
#toolbox-meatball-menu-dock-window {
--menuitem-icon-image: url("chrome://devtools/skin/images/dock-undock.svg");
}
#toolbox-meatball-menu-dock-window:-moz-locale-dir(rtl) .label::before {
transform: scaleX(-1);
}
#toolbox-meatball-menu-splitconsole {
--menuitem-icon-image: url("chrome://devtools/skin/images/command-console.svg");
}
#toolbox-meatball-menu-noautohide {
--menuitem-icon-image: url("chrome://devtools/skin/images/command-noautohide.svg");
}
#toolbox-meatball-menu-settings {
--menuitem-icon-image: url("chrome://devtools/skin/images/settings.svg");
}
/* Command buttons */
.command-button,
#toolbox-controls > button,
.toolbox-tabs-wrapper .tools-chevron-menu {
/* !important is needed to override .devtools-button rules in common.css */
margin: 0 !important;
border-radius: 0 !important;
position: relative;
min-width: 26px;
}
#command-button-pick {
min-width: 32px;
}
#command-button-pick::before {
background-image: url("chrome://devtools/skin/images/command-pick.svg");
}
#command-button-pick.accessibility::before {
background-image: url("chrome://devtools/skin/images/command-pick-accessibility.svg");
}
/* Command button images */
#command-button-paintflashing::before {
background-image: url("chrome://devtools/skin/images/command-paintflashing.svg");
}
#command-button-screenshot::before {
background-image: url("chrome://devtools/skin/images/command-screenshot.svg");
}
#command-button-responsive::before {
background-image: url("chrome://devtools/skin/images/command-responsivemode.svg");
-moz-context-properties: fill, fill-opacity;
fill-opacity: 0;
}
#command-button-responsive.checked::before {
fill-opacity: 0.15;
}
.theme-dark #command-button-responsive.checked::before {
fill-opacity: 0.25;
}
#command-button-stop-replay::before,
#command-button-replay::before {
background-image: url("chrome://devtools/skin/images/command-replay.svg");
}
#command-button-fission-prefs::before {
content: "FIS";
font-weight: bold;
}
.fission-pref-icon::before {
content: "";
background-image: url("chrome://devtools/skin/images/help.svg");
-moz-context-properties: fill;
fill: var(--theme-body-color);
display: block;
background-size: 12px;
width: 12px;
height: 12px;
}
#command-button-replay,
#command-button-stop-replay {
background-color: transparent;
}
#command-button-replay:hover,
#command-button-stop-replay:hover {
background: var(--toolbarbutton-background);
}
#command-button-rulers::before {
background-image: url("chrome://devtools/skin/images/command-rulers.svg");
}
#command-button-measure::before {
background-image: url("chrome://devtools/skin/images/command-measure.svg");
}
#command-button-frames::before {
background-image: url("chrome://devtools/skin/images/command-frames.svg");
-moz-context-properties: fill, fill-opacity;
fill-opacity: 0;
}
#command-button-frames.checked::before {
fill-opacity: 0.15;
}
.theme-dark #command-button-frames.checked::before {
fill-opacity: 0.25;
}
/* Tooltip of frames menu */
#command-button-frames-panel > .tooltip-panel {
max-width: 500px;
overflow-y: auto;
}
#toolbox-frame-menu span {
overflow: hidden;
text-overflow: ellipsis;
}
/* Toolbox panels */
.toolbox-panel {
display: -moz-box;
-moz-box-flex: 1;
visibility: collapse;
}
.toolbox-panel[selected] {
visibility: visible;
}
/**
* When panels are collapsed or hidden, making sure that they are also
* inaccessible by keyboard. This is not the case by default because the are
* predominantly hidden using visibility: collapse; style or collapsed
* attribute.
*/
.toolbox-panel *,
#toolbox-panel-webconsole[collapsed] * {
-moz-user-focus: ignore;
}
/**
* Enrure that selected toolbox panel's contents are keyboard accessible as they
* are explicitly made not to be when hidden (default).
*/
.toolbox-panel[selected] * {
-moz-user-focus: normal;
}
/* Let the component gain focus when a click hits an empty area */
#toolbox-container {
-moz-user-focus: normal;
}
#toolbox-container:focus {
outline: 0;
}
/* Toolbox tabs reordering */
#toolbox-container.tabs-reordering > .theme-body {
pointer-events: none;
}
#toolbox-container.tabs-reordering
.devtools-tab:not(.selected):hover
.devtools-tab-line {
background: transparent;
opacity: 0;
transition: none;
}
#toolbox-container.tabs-reordering .devtools-tab.selected {
background-color: var(--theme-toolbar-hover);
z-index: 1;
}
/*. webreplay */
.webreplay-player {
-moz-appearance: none;
background: var(--theme-tab-toolbar-background);
border-bottom: 1px solid var(--theme-splitter-color);
box-sizing: border-box;
min-height: 29px;
--progressbar-transition: 200ms;
}
.theme-light .webreplay-player {
--commandbar-button-hover-background: #efefef;
--progress-recording-background: hsl(0, 100%, 97%);
--progress-playing-background: hsl(207, 100%, 97%);
--recording-marker-background: hsl(14.9, 100%, 67%);
--replaying-marker-background: var(--blue-40);
--replaying-marker-highlighted-background: var(--blue-60);
--replaying-marker-location-background: var(--blue-50);
--recording-marker-background-hover: hsl(14.9, 100%, 47%);
--replaying-marker-background-hover: var(--blue-60);
--progress-recording-line: #d0021b;
--progressbar-background: #fff;
--progressbar-line-color: var(--blue-40);
--proggressbar-border-color: var(--theme-splitter-color);
--tick-future-background: #bfc9d2;
--tick-background: var(--blue-50);
--tick-recording-background: #d0021b;
--replay-head-background: var(--purple-50);
}
.theme-dark .webreplay-player {
--commandbar-button-hover-background: #1a1a1a;
--progress-recording-background: #310707;
--progress-playing-background: #071a2b;
--progress-recording-line: #ff2038;
--recording-marker-background: #9b3131;
--recording-marker-background-hover: #a82323;
--replaying-marker-background: #266fb1;
--replaying-marker-highlighted-background: #3084d0;
--replaying-marker-location-background: #3084d0;
--replaying-marker-background-hover: #3a8edb;
--progressbar-background: #0c0c0d;
--proggressbar-border-color: var(--theme-splitter-color);
--progressbar-line-color: #0a4786;
--tick-future-background: #bfc9d2;
--tick-background: var(--blue-50);
--tick-recording-background: #e77884;
--replay-head-background: var(--theme-highlight-purple);
}
.webreplay-player .overlay-container {
display: flex;
}
.webreplay-player .progressBar {
position: relative;
width: 100%;
height: 20px;
background: var(--progressbar-background);
margin: 4px 10px 4px 0;
border: 1px solid var(--proggressbar-border-color);
overflow: hidden;
}
.webreplay-player .progress {
position: absolute;
width: 100%;
height: 100%;
background: var(--progress-playing-background);
transition-duration: var(--progressbar-transition);
}
.webreplay-player #overlay:not(.recording) .progress::after {
background: var(--replay-head-background);
width: 1px;
height: 100%;
right: -0.5px;
opacity: 0.4;
display: block;
content: "";
position: absolute;
}
.webreplay-player .recording .progress {
background: var(--progress-recording-background);
transition-duration: var(--progressbar-transition);
}
.webreplay-player .message {
position: absolute;
height: 100%;
width: 7px;
height: 7px;
border-radius: 4.5px;
top: calc(50% - 3.5px);
background: var(--replaying-marker-background);
}
.webreplay-player .animate .message {
transition-duration: 100ms;
}
.webreplay-player .message.overlayed {
border: 1px solid var(--progress-playing-background);
top: 5.5px;
}
.webreplay-player .message.overlayed.future {
border-color: var(--progressbar-background);
}
.webreplay-player .message.highlighted {
background-color: var(--replaying-marker-highlighted-background);
transform: scale(1.25);
transition-duration: 100ms;
}
.webreplay-player .message.uncached {
opacity: 0.5;
}
.webreplay-player .message.location {
background: var(--replaying-marker-location-background);
}
.webreplay-player .recording .message.highlighted {
background-color: var(--recording-marker-background-hover);
}
.webreplay-player .recording .message.overlayed {
border-color: var(--progress-recording-background);
}
.webreplay-player .recording .message {
background: var(--recording-marker-background);
}
.webreplay-player .recording .message:hover {
background: var(--recording-marker-background-hover);
}
.webreplay-player .message:hover {
background: var(--replaying-marker-background-hover);
cursor: pointer;
}
.webreplay-player .message:hover::before {
transform: scale(0.1);
}
.webreplay-player .commands {
display: flex;
margin: 0 4px;
}
.webreplay-player .command-button {
display: flex;
min-width: 20px;
}
.webreplay-player .command-button.primary {
min-width: 22px;
}
.webreplay-player .btn {
width: 14px;
height: 14px;
mask-size: 14px;
background: var(--theme-icon-color);
align-self: center;
margin: 0 auto;
}
.webreplay-player .primary .btn {
width: 18px;
height: 18px;
mask-size: 18px;
}
.webreplay-player .command-button.active:hover {
background: var(--commandbar-button-hover-background);
cursor: pointer;
}
.webreplay-player .command-button.active {
opacity: 1;
}
.webreplay-player div.command-button .rewind {
transform: scaleX(-1);
}
.webreplay-player div.command-button .previous {
transform: scaleX(-1);
margin-left: 8px;
}
.webreplay-player div.command-button .next {
margin-right: 8px;
}
.webreplay-player .progress-line {
width: 0%;
height: 1px;
background: var(--progressbar-line-color);
position: absolute;
left: 0;
top: 50%;
transition-duration: var(--progressbar-transition);
}
.webreplay-player .progress-line.end {
opacity: 0.3;
}
.webreplay-player .recording .progress-line {
background: var(--progress-recording-line);
opacity: 0.3;
}
.webreplay-player .tick {
position: absolute;
height: 100%;
}
.webreplay-player .tick::before,
.webreplay-player .tick::after {
height: 1.5px;
width: 1px;
right: 0;
position: absolute;
content: "";
display: block;
}
.webreplay-player .recording .tick::before,
.webreplay-player .recording .tick::after {
background: var(--tick-recording-background);
}
.webreplay-player .tick.future::before,
.webreplay-player .tick.future::after {
background: var(--tick-future-background);
}
.webreplay-player .tick::before,
.webreplay-player .tick::after {
background: var(--tick-background);
}
.webreplay-player .tick::after {
bottom: 0;
}
.webreplay-player .tick::before {
top: 0;
}
.webreplay-player #overlay:hover .tick {
opacity: 1;
}
.webreplay-player #overlay .tick {
opacity: 0.5;
}
.webreplay-player #overlay .tick:hover ~ .tick,
.webreplay-player #overlay .tick.highlight ~ .tick:not(.highlight) {
opacity: 0.5;
}
.webreplay-player .unscanned {
position: absolute;
height: 100%;
background: #000000;
opacity: 0.1;
}