Visualize Your Ideas With Code
.root {
background-color: var(--surface-color);
width: 100%;
height: 100%;
opacity: 0;
transition: opacity var(--duration-normal);
display: flex;
align-items: stretch;
position: relative;
--scrollbar-background: var(--background-color);
&.show {
opacity: 1;
}
}
.sidebar {
width: 320px;
flex-shrink: 0;
flex-grow: 0;
}
.timelineWrapper {
overflow-x: scroll;
overflow-y: hidden;
flex-grow: 1;
position: relative;
background-color: var(--background-color);
width: 100%;
}
.timeline {
position: relative;
overflow: hidden;
height: 100%;
}
.timelineContent {
position: relative;
overflow: visible;
height: 100%;
}
.trackContainer {
width: 100%;
height: 100%;
background-color: var(--surface-color);
}
.timestamp {
user-select: none;
pointer-events: none;
position: absolute;
top: 32px;
bottom: 0;
border-left: 1px solid #0003;
border-right: 1px solid #0003;
width: 0;
display: flex;
justify-content: center;
&.odd {
opacity: 0.5;
&::after {
display: none;
}
}
&::after {
font-family: var(--font-family-mono);
font-size: var(--font-size-small);
line-height: 32px;
margin-top: -32px;
text-align: center;
display: block;
content: attr(data-frame);
color: rgba(255, 255, 255, 0.54);
}
}
.sceneTrack {
padding: 8px 0;
display: flex;
align-items: stretch;
--clip-color: var(--surface-color-light);
--clip-gap: 4px;
}
.clip {
position: relative;
&::before {
position: absolute;
top: 0;
left: var(--clip-gap);
right: var(--clip-gap);
bottom: 0;
display: block;
content: '';
border-radius: var(--radius);
background-color: var(--clip-color);
}
.container {
width: 100%;
padding: 8px 16px;
}
.name {
color: inherit;
cursor: pointer;
position: relative;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: min-content;
&:hover {
text-decoration: underline;
}
}
}
.transition {
position: absolute;
pointer-events: none;
top: 0;
bottom: 0;
left: -4px;
background: linear-gradient(
90deg,
rgba(36, 36, 36, 1) 0%,
rgba(36, 36, 36, 0) 100%
);
}
.slideTrack {
display: flex;
padding: 4px 0;
width: 100%;
--clip-color: var(--surface-color-hover);
--clip-gap: 2px;
.container {
padding: 4px 16px;
}
.clip {
&:first-child::before {
left: 8px;
}
&:last-child::before {
right: 8px;
}
&.continuation::before {
background: repeating-linear-gradient(
45deg,
transparent,
transparent 8px,
var(--surface-color-hover) 8px,
var(--surface-color-hover) 16px
);
}
}
}
.labelTrack {
position: relative;
height: 40px;
padding: 4px 0;
}
.labelClip {
position: absolute;
height: 32px;
padding: 4px;
cursor: pointer;
&::before {
content: attr(data-name);
display: block;
border-radius: 0 12px 12px 12px;
padding: 0 8px;
color: rgba(0, 0, 0, 0.87);
font-weight: bold;
background-color: var(--theme);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.54);
}
&:hover,
&:active {
&::before {
box-shadow: 0 0 0 2px white inset;
}
z-index: 1;
}
}
.labelClipStart {
box-sizing: content-box;
position: absolute;
height: 24px;
margin-top: 4px;
margin-left: 4px;
padding-right: 24px;
cursor: pointer;
border-radius: 12px 0 12px 12px;
background-color: var(--theme-overlay);
pointer-events: none;
}
.labelClipTarget {
.labelClip:hover + & {
display: block;
}
.labelClip:active + & {
display: none;
}
box-sizing: content-box;
position: absolute;
height: 16px;
margin-top: 4px;
margin-left: -16px;
padding-right: 16px;
cursor: pointer;
border-radius: 12px 0 12px 12px;
background-color: white;
pointer-events: none;
display: none;
z-index: 1;
}
.playhead {
position: absolute;
width: 2px;
top: 6px;
bottom: 0;
background-color: var(--theme);
pointer-events: none;
display: flex;
align-items: flex-start;
justify-content: center;
z-index: 1;
&::before {
display: block;
padding: 0 4px;
border-radius: var(--radius);
background-color: var(--theme);
font-family: var(--font-family-mono);
font-size: var(--font-size-small);
line-height: 20px;
font-weight: bold;
color: #000000;
content: attr(data-frame);
}
}
.playheadPreview {
position: absolute;
width: 2px;
top: 0;
bottom: 0;
background-color: white;
opacity: 0;
pointer-events: none;
.root:hover & {
opacity: 0.16;
}
}
.rangeTrack {
height: 32px;
cursor: pointer;
pointer-events: none;
&.active {
pointer-events: auto;
}
}
.range {
border-radius: var(--radius);
cursor: move;
position: absolute;
height: 32px;
background-color: var(--surface-color);
border: 2px solid var(--surface-color-light);
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
&.active {
pointer-events: auto;
border-color: rgba(255, 255, 255, 0.24);
}
.rangeTrack.active > & {
border-color: rgba(255, 255, 255, 0.24);
}
}
.handle {
cursor: pointer;
margin-top: 2px;
color: rgba(255, 255, 255, 0);
.range.active > & {
color: rgba(255, 255, 255, 0.24);
z-index: 1;
min-width: 24px;
}
.range > &:hover,
.range > &:active {
color: rgba(255, 255, 255, 0.6);
}
}
.handleSpacer {
flex-grow: 1;
flex-shrink: 1;
}
.audioTrack {
position: relative;
height: calc(96px + 32px * 2);
padding: 32px 0;
}
.audioClip {
position: absolute;
&.hoverable {
border-radius: var(--radius);
outline: 2px solid var(--surface-color-hover);
outline-offset: -2px;
&:hover {
z-index: 1;
outline-color: var(--surface-color-light);
background-color: #242424aa;
.audioCanvas {
filter: brightness(0.54);
}
.audioLabel {
background-color: var(--surface-color-light);
}
}
}
&.editable {
cursor: move;
z-index: 1;
.audioCanvas {
filter: brightness(0.32);
}
&:hover .audioCanvas {
filter: brightness(0.36);
}
}
}
.audioCanvas {
position: absolute;
top: 0;
bottom: 0;
filter: brightness(0.27);
}
.audioLabel {
position: absolute;
bottom: 100%;
cursor: default;
border-radius: 12px 12px 12px 0;
translate: 0 2px;
padding: 0 8px;
background-color: var(--surface-color-hover);
}