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

675 строки
14 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/. */
/* Animation-inspector specific theme variables */
:root {
--animation-even-background-color: rgba(0, 0, 0, 0.05);
--command-pick-image: url(chrome://devtools/skin/images/command-pick.svg);
--devtools-toolbar-height: 24px;
--fast-track-image: url("images/animation-fast-track.svg");
--fill-color-cssanimation: var(--theme-contrast-background);
--fill-color-csstransition: var(--theme-highlight-blue);
--fill-color-scriptanimation: var(--theme-graphs-green);
--graph-right-offset: 10px;
--keyframe-marker-shadow-color: #c4c4c4;
--pause-image: url(chrome://devtools/skin/images/pause.svg);
--progress-bar-color: #909090;
--resume-image: url(chrome://devtools/skin/images/play.svg);
--rewind-image: url(chrome://devtools/skin/images/rewind.svg);
--scrubber-color: #dd00a9;
--sidebar-width: 200px;
--stroke-color-cssanimation: var(--theme-highlight-lightorange);
--stroke-color-csstransition: var(--theme-highlight-bluegrey);
--stroke-color-scriptanimation: var(--theme-highlight-green);
--tick-line-style: 0.5px solid rgba(128, 136, 144, 0.5);
}
:root.theme-dark {
--animation-even-background-color: rgba(255, 255, 255, 0.05);
--keyframe-marker-shadow-color: #818181;
}
/* Root element of animation inspector */
#animation-container {
cursor: default;
display: flex;
flex-direction: column;
height: 100%;
outline: none;
}
#animation-container .uncontrolled {
overflow: hidden;
}
#animation-container:not(.animation-detail-visible) .controlled {
display: none;
}
#animation-container .animation-container-splitter {
overflow: hidden;
}
/* Animation Toolbar */
.animation-toolbar {
display: flex;
}
.pause-resume-button::before {
background-image: var(--pause-image);
}
.pause-resume-button.paused::before {
background-image: var(--resume-image);
}
select.playback-rate-selector.devtools-button {
background-image: url("chrome://devtools/skin/images/dropmarker.svg");
background-position: calc(100% - 4px) center;
background-repeat: no-repeat;
padding-right: 1em;
text-align: center;
}
select.playback-rate-selector.devtools-button:not(:empty):not(:disabled):not(.checked):hover {
background: none;
background-color: var(--toolbarbutton-background);
background-image: url("chrome://devtools/skin/images/dropmarker.svg");
background-position: calc(100% - 4px) center;
background-repeat: no-repeat;
border-color: var(--toolbarbutton-hover-border-color);
}
.rewind-button::before {
background-image: var(--rewind-image);
}
/* Animation List Container */
.animation-list-container {
height: 100%;
overflow-y: auto;
overflow-x: hidden;
position: relative;
width: 100%;
-moz-user-select: none;
}
.animation-list-container.active-scrubber {
cursor: col-resize;
}
/* Animation List Header */
.animation-list-header {
display: grid;
grid-template-columns: var(--sidebar-width) calc(100% - var(--sidebar-width) - var(--graph-right-offset)) var(--graph-right-offset);
line-height: var(--devtools-toolbar-height);
min-height: 100%;
padding: 0;
pointer-events: none;
position: sticky;
top: 0;
z-index: 2;
}
.animation-list-header .devtools-toolbar {
position: absolute;
width: 100%;
}
/* Animation Timeline Tick List */
.animation-timeline-tick-list {
grid-column: 2/3;
height: 100%;
position: relative;
}
.animation-timeline-tick-item {
height: 100%;
position: absolute;
}
.animation-timeline-tick-item::before {
border-left: var(--tick-line-style);
content: "";
height: 100%;
position: absolute;
}
/* Current Time Scrubber */
.current-time-scrubber-controller {
grid-column: 2 / 3;
height: 100%;
padding: 0;
position: absolute;
width: 100%;
}
.current-time-scrubber-controller::before {
content: "";
cursor: col-resize;
height: var(--devtools-toolbar-height);
pointer-events: auto;
position: absolute;
/* In order to click on edge of current-time-scrubber-controller element */
width: calc(100% + 1px);
}
.current-time-scrubber {
cursor: col-resize;
height: 100%;
margin-left: -6px;
pointer-events: auto;
position: absolute;
width: 12px;
z-index: 1;
}
.current-time-scrubber::before {
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid var(--scrubber-color);
content: "";
position: absolute;
top: 0;
width: 0;
}
.current-time-scrubber::after {
border-left: 1px solid var(--scrubber-color);
content: "";
height: 100%;
left: 5px;
position: absolute;
top: 0;
width: 0;
}
/* Animation List */
.animation-list {
list-style-type: none;
margin: 0;
padding: 0;
position: absolute;
top: var(--devtools-toolbar-height);
width: 100%;
}
/* Animation Item */
.animation-item {
display: flex;
height: 30px;
}
.animation-item:nth-child(2n+1) {
background-color: var(--animation-even-background-color);
}
.animation-item.cssanimation {
--computed-timing-graph-color: var(--fill-color-cssanimation);
--effect-timing-graph-color: var(--stroke-color-cssanimation);
}
.animation-item.csstransition {
--computed-timing-graph-color: var(--fill-color-csstransition);
--effect-timing-graph-color: var(--stroke-color-csstransition);
}
.animation-item.scriptanimation {
--computed-timing-graph-color: var(--fill-color-scriptanimation);
--effect-timing-graph-color: var(--stroke-color-scriptanimation);
}
.animation-item.selected {
background-color: var(--theme-selection-background-hover);
}
/* Animation Target */
.animation-target {
align-items: center;
display: flex;
height: 100%;
padding-left: 4px;
width: var(--sidebar-width);
}
/* Reps component */
.animation-target .objectBox {
display: flex;
max-width: 100%;
}
.animation-target .objectBox .attrName {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.animation-target .objectBox:hover .open-inspector {
background-color: var(--comment-node-color);
}
.animation-target.highlighting .objectBox .open-inspector {
background-color: var(--theme-highlight-blue);
}
/* Summary Graph */
.animation-summary-graph {
cursor: pointer;
height: 100%;
padding-top: 5px;
position: relative;
width: calc(100% - var(--sidebar-width) - var(--graph-right-offset));
}
.animation-summary-graph.compositor::after {
background-image: var(--fast-track-image);
background-repeat: no-repeat;
content: "";
display: block;
fill: var(--theme-content-color3);
height: 100%;
position: absolute;
right: 0;
top: 5px;
width: 15px;
-moz-context-properties: fill;
z-index: 1;
}
.animation-summary-graph-path {
height: 100%;
width: 100%;
}
.animation-computed-timing-path path {
fill: var(--computed-timing-graph-color);
vector-effect: non-scaling-stroke;
transform: scale(1, -1);
}
.animation-computed-timing-path path.infinity:nth-child(n+2) {
opacity: 0.3;
}
.animation-effect-timing-path path {
fill: none;
stroke: var(--effect-timing-graph-color);
stroke-dasharray: 2px 2px;
transform: scale(1, -1);
vector-effect: non-scaling-stroke;
}
.animation-effect-timing-path path.infinity:nth-child(n+2) {
opacity: 0.3;
}
.animation-negative-delay-path path,
.animation-negative-end-delay-path path {
fill: none;
stroke: var(--theme-graphs-grey);
stroke-dasharray: 2px 2px;
transform: scale(1, -1);
vector-effect: non-scaling-stroke;
}
.animation-delay-sign,
.animation-end-delay-sign {
background-color: var(--theme-graphs-grey);
height: 3px;
position: absolute;
top: calc(100% - 1.5px);
}
.animation-delay-sign::before,
.animation-end-delay-sign::before {
background-color: inherit;
border-radius: 50%;
content: "";
height: 6px;
position: absolute;
top: -1.5px;
width: 6px;
}
.animation-delay-sign.fill,
.animation-end-delay-sign.fill {
background-color: var(--effect-timing-graph-color);
}
.animation-delay-sign.negative::before {
left: unset;
right: -3px;
}
.animation-end-delay-sign::before {
right: -3px;
}
.animation-end-delay-sign.negative::before {
left: -3px;
right: unset;
}
.animation-name {
height: 100%;
left: 0;
pointer-events: none;
position: absolute;
top: 0;
width: calc(100% - 20px);
}
.animation-name text {
dominant-baseline: middle;
fill: var(--theme-focus-outline-color);
paint-order: stroke;
stroke: var(--theme-body-background);
stroke-linejoin: round;
stroke-opacity: .5;
stroke-width: 4;
text-anchor: end;
}
/* Animation Detail */
.animation-detail-container {
background-color: var(--theme-body-background);
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
width: 100%;
z-index: 1;
}
.animation-detail-header {
display: flex;
}
.animation-detail-title {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.animation-detail-close-button::before {
background-image: url(chrome://devtools/skin/images/close.svg);
}
/* Animated Property List Container */
.animated-property-list-container {
display: flex;
flex: 1;
flex-direction: column;
overflow-y: auto;
position: relative;
}
/* Animated Property List Header */
.animated-property-list-header {
display: grid;
grid-template-columns: var(--sidebar-width) calc(100% - var(--sidebar-width) - var(--graph-right-offset)) var(--graph-right-offset);
line-height: var(--devtools-toolbar-height);
min-height: 100%;
padding: 0;
pointer-events: none;
position: sticky;
top: 0;
z-index: 1;
}
.animated-property-list-header .devtools-toolbar {
position: absolute;
width: 100%;
}
/* Keyframes Progress Tick List */
.keyframes-progress-tick-list {
grid-column: 2 / 3;
height: 100%;
position: absolute;
width: 100%;
}
.keyframes-progress-tick-item {
position: absolute;
}
.keyframes-progress-tick-item.left {
border-left: var(--tick-line-style);
}
.keyframes-progress-tick-item.right {
border-right: var(--tick-line-style);
}
/* Keyframes Progress Bar */
.keyframes-progress-bar-area {
background: none;
grid-column: 2 / 3;
padding: 0;
height: 100%;
position: absolute;
width: 100%;
}
.keyframes-progress-bar {
height: 100%;
position: absolute;
z-index: 1;
}
.keyframes-progress-bar::before {
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid var(--progress-bar-color);
content: "";
left: -5px;
position: absolute;
top: 0;
width: 0;
}
.keyframes-progress-bar::after {
border-left: 1px solid var(--progress-bar-color);
content: "";
height: 100%;
position: absolute;
top: 0;
width: 0;
}
/* Animated Property List */
.animated-property-list-background {
border-left: var(--tick-line-style);
border-right: var(--tick-line-style);
bottom: 0;
left: var(--sidebar-width);
min-height: 100%;
position: sticky;
top: 0;
width: calc(100% - var(--sidebar-width) - var(--graph-right-offset));
}
.animated-property-list-background span {
border-left: var(--tick-line-style);
height: 100%;
left: 50%;
position: absolute;
}
.animated-property-list {
flex: 1;
list-style-type: none;
margin: 0;
padding: 0;
position: absolute;
top: var(--devtools-toolbar-height);
width: 100%;
}
/* Animated Property Item */
.animated-property-item {
display: flex;
height: 30px;
}
.animated-property-item:nth-child(2n+1) {
background-color: var(--animation-even-background-color);
}
.animated-property-item.unchanged {
opacity: 0.6;
}
/* Animated Property Name */
.animated-property-name {
align-items: center;
display: flex;
height: 100%;
justify-content: flex-end;
padding-right: 10px;
width: var(--sidebar-width);
}
.animated-property-name.compositor span {
padding-left: 15px;
position: relative;
}
.animated-property-list-container.cssanimation .animated-property-name.compositor {
--fast-track-color: var(--stroke-color-cssanimation);
}
.animated-property-list-container.csstransition .animated-property-name.compositor {
--fast-track-color: var(--stroke-color-csstransition);
}
.animated-property-list-container.scriptanimation .animated-property-name.compositor {
--fast-track-color: var(--stroke-color-scriptanimation);
}
.animated-property-name.compositor span::before {
background-image: var(--fast-track-image);
background-repeat: no-repeat;
background-size: contain;
content: "";
fill: var(--fast-track-color);
height: 100%;
position: absolute;
left: 0;
width: 15px;
-moz-context-properties: fill;
}
.animated-property-name.warning span {
text-decoration: underline dotted;
}
/* Keyframes Graph */
.keyframes-graph {
padding-top: 3px;
height: 100%;
position: relative;
width: calc(100% - var(--sidebar-width) - var(--graph-right-offset));
}
.keyframes-graph-path {
height: 100%;
width: 100%;
}
.keyframes-graph-path path {
fill: #00b0bd88;
stroke: #00b0bd;
vector-effect: non-scaling-stroke;
transform: scale(1, -1);
}
.keyframes-graph.opacity .keyframes-graph-path path {
fill: #df00a988;
stroke: #df00a9;
}
.keyframes-graph.transform .keyframes-graph-path path {
fill: #ea800088;
stroke: #ea8000;
}
.keyframes-graph-path .color-path path {
stroke: none;
}
.keyframes-graph .keyframes-graph-path .hint path {
fill: none;
stroke-linecap: round;
stroke-opacity: 0;
}
.keyframes-graph-path .hint path:hover {
stroke-opacity: 1;
}
.keyframes-graph-path .hint rect {
fill-opacity: 0.1;
}
.keyframes-graph-path .hint line {
stroke: #00b0bd;
stroke-opacity: 0;
vector-effect: non-scaling-stroke;
}
.keyframes-graph-path .hint:hover line {
stroke-opacity: 1;
}
/* Keyframe Marker List */
.keyframe-marker-list {
pointer-events: none;
position: absolute;
height: 100%;
list-style-type: none;
top: 0%;
width: 100%;
}
.keyframe-marker-item {
box-shadow: 0 0 0 1px var(--keyframe-marker-shadow-color);
border-radius: 100%;
pointer-events: auto;
position: absolute;
top: 50%;
height: 10px;
transform: translate(-5px, -3px);
width: 10px;
}
.animated-property-list-container.cssanimation .keyframe-marker-item {
background-color: var(--fill-color-cssanimation);
}
.animated-property-list-container.csstransition .keyframe-marker-item {
background-color: var(--fill-color-csstransition);
}
.animated-property-list-container.scriptanimation .keyframe-marker-item {
background-color: var(--fill-color-scriptanimation);
}
/* No Animation Panel */
.animation-error-message {
overflow: auto;
}
.animation-error-message > p {
white-space: pre;
}
.animation-element-picker::before {
background-image: var(--command-pick-image);
}