chrome-devtools-frontend
Version:
Chrome DevTools UI
215 lines (179 loc) • 4.56 kB
CSS
/*
* Copyright 2015 The Chromium Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
:host {
width: 270px;
height: 350px;
user-select: none;
padding: var(--sys-size-8);
overflow: hidden;
}
.bezier-preset-selected > svg {
background-color: var(--sys-color-tonal-container);
}
.bezier-container {
--override-bezier-control-color: var(--sys-color-purple-bright);
display: flex;
margin-top: 38px;
flex-shrink: 0;
/* overflown bezier visualization must be on top of the source text */
z-index: 2;
background-image: radial-gradient(circle, var(--sys-color-surface-variant) var(--sys-size-1), var(--color-background-inverted-opacity-0) var(--sys-size-1));
background-size: 17px 17px;
background-position: -5px -10px;
}
.bezier-preset {
width: 50px;
height: 50px;
padding: 5px;
margin: auto;
background-color: var(--sys-color-surface1);
border-radius: 3px;
}
.bezier-preset line.bezier-control-line {
stroke: var(--sys-color-token-subtle);
stroke-width: 1;
stroke-linecap: round;
fill: none;
}
.bezier-preset circle.bezier-control-circle {
fill: var(--sys-color-token-subtle);
}
.bezier-preset path.bezier-path {
stroke: var(--sys-color-inverse-surface);
stroke-width: 2;
stroke-linecap: round;
fill: none;
}
.bezier-preset-selected path.bezier-path,
.bezier-preset-selected line.bezier-control-line {
stroke: var(--sys-color-on-tonal-container);
}
.bezier-preset-selected circle.bezier-control-circle {
fill: var(--sys-color-on-tonal-container);
}
.bezier-curve line.linear-line {
stroke: var(--sys-color-neutral-outline);
stroke-width: 2;
stroke-linecap: round;
fill: none;
}
.bezier-curve line.bezier-control-line {
stroke: var(--override-bezier-control-color);
stroke-width: 2;
stroke-linecap: round;
fill: none;
opacity: 60%;
}
.bezier-curve circle.bezier-control-circle {
fill: var(--override-bezier-control-color);
cursor: pointer;
}
.bezier-curve path.bezier-path {
stroke: var(--sys-color-inverse-surface);
stroke-width: 3;
stroke-linecap: round;
fill: none;
}
.bezier-curve path.bezier-path.linear-path {
cursor: pointer;
}
.bezier-preview-container {
position: relative;
background-color: var(--sys-color-cdt-base-container);
overflow: hidden;
border-radius: var(--sys-size-9);
width: 200%;
height: var(--sys-size-9);
z-index: 2;
flex-shrink: 0;
opacity: 0%;
}
.bezier-preview-animation {
background-color: var(--sys-color-purple-bright);
width: var(--sys-size-9);
height: var(--sys-size-9);
border-radius: var(--sys-size-9);
position: absolute;
}
.bezier-preview-onion {
margin-top: calc(-1 * var(--sys-size-9));
position: relative;
z-index: 1;
}
.bezier-preview-onion > .bezier-preview-animation {
opacity: 10%;
}
svg.bezier-preset-modify {
background-color: var(--sys-color-cdt-base-container);
border-radius: 35px;
display: inline-block;
visibility: hidden;
transition: transform 100ms cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer;
position: absolute;
}
svg.bezier-preset-modify:hover,
.bezier-preset:hover {
background-color: var(--sys-color-state-hover-on-subtle);
}
.bezier-preset-selected .bezier-preset:hover {
background-color: var(--sys-color-tonal-container);
}
.bezier-preset-modify path {
stroke-width: 2;
stroke: var(--sys-color-on-surface-subtle);
fill: none;
}
.bezier-presets {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.bezier-preset-selected .bezier-preset-modify {
opacity: 100%;
}
.bezier-preset-category {
width: 50px;
cursor: pointer;
transition: transform 100ms cubic-bezier(0.4, 0, 0.2, 1);
}
span.bezier-display-value {
width: 100%;
user-select: text;
display: block;
text-align: center;
line-height: var(--sys-size-9);
min-height: var(--sys-size-9);
cursor: text;
}
svg.bezier-curve {
margin-left: var(--sys-size-13);
margin-top: calc(-1 * var(--sys-size-5));
}
svg.bezier-curve.linear {
margin-top: 42px;
overflow: visible;
}
svg.bezier-preset-modify.bezier-preset-plus {
right: 0;
}
.bezier-header {
margin-top: var(--sys-size-8);
z-index: 1;
}
svg.bezier-preset-modify:active {
transform: scale(1.1);
background-color: var(--sys-color-state-ripple-neutral-on-subtle);
}
.bezier-preset-category:active {
transform: scale(1.05);
}
.bezier-header-active > svg.bezier-preset-modify {
visibility: visible;
}
.bezier-preset-modify:active path {
stroke: var(--sys-color-on-surface-subtle);
}