Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

8.9 KB
Raw Blame
.timeline-scissors-cursor {
	cursor:
		url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg' shape-rendering='geometricPrecision'%3E%3Cg transform='rotate(90 10 10)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5 2.5C3.15905 2.5 1.66666 3.99238 1.66666 5.83333C1.66666 7.67428 3.15905 9.16667 5 9.16667C5.85421 9.16667 6.63337 8.84536 7.22322 8.317L9.74771 10L7.22322 11.683C6.63337 11.1546 5.85421 10.8333 5 10.8333C3.15905 10.8333 1.66666 12.3257 1.66666 14.1667C1.66666 16.0076 3.15905 17.5 5 17.5C6.84095 17.5 8.33333 16.0076 8.33333 14.1667C8.33333 13.7822 8.26824 13.4129 8.14846 13.0692L18.6556 6.06446C18.1451 5.29858 17.1103 5.09162 16.3444 5.60221L11.25 8.99846L8.14846 6.93075C8.26824 6.5871 8.33333 6.21782 8.33333 5.83333C8.33333 3.99238 6.84095 2.5 5 2.5ZM3.33333 5.83333C3.33333 4.91286 4.07952 4.16667 5 4.16667C5.92047 4.16667 6.66666 4.91286 6.66666 5.83333C6.66666 6.75381 5.92047 7.5 5 7.5C4.07952 7.5 3.33333 6.75381 3.33333 5.83333ZM3.33333 14.1667C3.33333 13.2462 4.07952 12.5 5 12.5C5.92047 12.5 6.66666 13.2462 6.66666 14.1667C6.66666 15.0871 5.92047 15.8333 5 15.8333C4.07952 15.8333 3.33333 15.0871 3.33333 14.1667Z' fill='%23ffffff' stroke='%23000000' stroke-width='0.6'/%3E%3Cpath d='M16.3444 14.3978L12.0012 11.5023L13.5035 10.5008L18.6556 13.9355C18.1451 14.7014 17.1103 14.9084 16.3444 14.3978Z' fill='%23ffffff' stroke='%23000000' stroke-width='0.6'/%3E%3C/g%3E%3C/svg%3E")
		12 12,
		crosshair;
}

.timeline-scissors-cursor * {
	cursor: inherit;
}

.timeline-fade-cursor {
	cursor:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='20' viewBox='0 0 26 20' shape-rendering='geometricPrecision'%3E%3Crect x='1' y='1' width='24' height='18' rx='1.5' fill='%23ffffff' stroke='%23222222' stroke-width='1'/%3E%3Cpath d='M4.5 14.5C4.5 10 5.2 7 8.2 5.2' fill='none' stroke='%23111111' stroke-width='1.35' stroke-linecap='round'/%3E%3Cpath d='M14.5 10h7.5M14.5 10H7' stroke='%23111111' stroke-width='1.55' stroke-linecap='round'/%3E%3Cpath d='M20.5 7.4l2.4 2.6-2.4 2.6M7.5 7.4L5.1 10l2.4 2.6' fill='none' stroke='%23111111' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
		13 10,
		ew-resize;
}

.timeline-fade-cursor * {
	cursor: inherit;
}

.cap-track-fill {
	--seg-color: var(--ed-text-3);
	--ed-seg-tint-selected: calc(var(--ed-seg-tint) + 10%);
	--ed-seg-line-hover: calc(var(--ed-seg-line) + 10%);
	border-radius: 8px;
	background-color: color-mix(
		in srgb,
		var(--seg-color) var(--ed-seg-tint),
		var(--ed-card)
	);
	box-shadow: inset 0 0 0 1px
		color-mix(in srgb, var(--seg-color) var(--ed-seg-line), transparent);
	transition:
		background-color 0.15s ease,
		box-shadow 0.15s ease;
}

.cap-track-fill::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 3px;
	background-color: var(--seg-color);
	pointer-events: none;
	z-index: 1;
}

.cap-track-fill:hover {
	box-shadow: inset 0 0 0 1px
		color-mix(in srgb, var(--seg-color) var(--ed-seg-line-hover), transparent);
}

.cap-track-fill[data-selected] {
	background-color: color-mix(
		in srgb,
		var(--seg-color) var(--ed-seg-tint-selected),
		var(--ed-card)
	);
	box-shadow: inset 0 0 0 1.5px var(--ed-accent);
}

.cap-track-fill[data-muted] {
	background-color: color-mix(
		in srgb,
		var(--seg-color) calc(var(--ed-seg-tint) / 2),
		var(--ed-card)
	);
}

.cap-track-fill[data-ghost] {
	opacity: 0.55;
}

.cap-seg-labels {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.cap-seg-label {
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	color: color-mix(
		in srgb,
		var(--seg-color) var(--ed-seg-label-mix),
		var(--ed-seg-label-base)
	);
}

.cap-seg-sublabel {
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: color-mix(in srgb, var(--seg-color) 45%, var(--ed-text-3));
}

.cap-track-fill[data-muted] .cap-seg-label,
.cap-track-fill[data-muted] .cap-seg-sublabel {
	color: var(--ed-text-3);
}

.cap-seg-handle {
	width: 3px;
	height: 16px;
	border-radius: 2px;
	background-color: color-mix(
		in srgb,
		var(--seg-color) 70%,
		var(--ed-seg-label-base)
	);
}

.cap-fade-shade {
	fill: color-mix(in srgb, var(--ed-seg-label-base) 22%, transparent);
}

.cap-fade-curve,
.cap-fade-corner {
	stroke: color-mix(in srgb, var(--seg-color) 70%, var(--ed-seg-label-base));
	fill: color-mix(in srgb, var(--seg-color) 70%, var(--ed-seg-label-base));
}

.cap-fade-curve {
	fill: none;
}

.cap-fade-corner-line {
	stroke: color-mix(in srgb, var(--ed-card) 65%, transparent);
}

.cap-track-tile {
	background-color: color-mix(in srgb, var(--seg-color) 16%, transparent);
	color: color-mix(in srgb, var(--seg-color) 62%, var(--ed-seg-label-base));
}

.cap-track-tray[data-expanded] {
	animation: cap-track-tray-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cap-track-tray[data-closed] {
	animation: cap-track-tray-out 120ms ease-in both;
}

/* `backwards` (not `both`) so the finished entrance releases `transform`
 * back to the tile's own `active:scale-95` press feedback. */
.cap-track-tray-tile {
	animation: cap-track-tray-tile-in 320ms cubic-bezier(0.34, 1.35, 0.64, 1)
		backwards;
	animation-delay: calc(60ms + var(--tray-index) * 24ms);
}

.cap-track-tray[data-closed] .cap-track-tray-tile {
	animation: none;
}

@keyframes cap-track-tray-in {
	from {
		opacity: 0;
		transform: translateX(-12px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes cap-track-tray-out {
	from {
		opacity: 1;
		transform: none;
	}
	to {
		opacity: 0;
		transform: translateX(-6px) scale(0.98);
	}
}

@keyframes cap-track-tray-tile-in {
	from {
		opacity: 0;
		transform: translateX(-10px) scale(0.85);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cap-track-tray[data-expanded],
	.cap-track-tray[data-closed],
	.cap-track-tray-tile {
		animation: none;
	}
}

.cap-empty-lane {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 12px;
	line-height: 1.2;
	color: var(--ed-text-3);
	text-align: center;
	transition: color 0.15s ease;
}

button.cap-empty-lane:hover:not(:disabled),
.cap-empty-lane[data-active] {
	color: var(--ed-text-2);
}

.cap-empty-lane-action {
	font-weight: 500;
	color: var(--ed-text-2);
}

button.cap-empty-lane-action:hover:not(:disabled) {
	color: var(--ed-text-1);
}

.cap-empty-lane-action:disabled {
	opacity: 0.6;
}

/* Empty-lane call to action: one filled chip for the one-click path and one
 * outlined chip for the manual one, matching the Zoom lane's grammar. */
.cap-lane-chip {
	display: flex;
	height: 26px;
	align-items: center;
	gap: 6px;
	padding: 0 11px;
	border-radius: 7px;
	background-color: var(--ed-thumb);
	/* The thumb surface is light in both themes, so its label is always ink. */
	color: #1c1c1e;
	font-size: 12px;
	font-weight: 500;
	transition:
		background-color 0.15s ease,
		box-shadow 0.15s ease,
		color 0.15s ease;
}

.cap-lane-chip:hover:not(:disabled) {
	background-color: color-mix(in srgb, var(--ed-thumb) 88%, var(--ed-accent));
}

.cap-lane-chip-ghost {
	background-color: transparent;
	color: var(--ed-text-1);
	box-shadow: inset 0 0 0 1px var(--ed-line-strong);
}

.cap-lane-chip-ghost:hover:not(:disabled) {
	background-color: var(--ed-ctl-hover);
	box-shadow: inset 0 0 0 1px var(--ed-line-strong);
}

/* The shot a click on empty 3D lane space would create. */
.cap-add-shot-ghost {
	position: absolute;
	top: 3px;
	bottom: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 8px;
	border-radius: 7px;
	border: 1.5px dashed color-mix(in srgb, var(--track-3d) 55%, transparent);
	background-color: color-mix(in srgb, var(--track-3d) 8%, transparent);
	color: color-mix(in srgb, var(--track-3d) 55%, var(--ed-seg-label-base));
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	pointer-events: none;
	z-index: 0;
}

/* Auto-scene shot counts, in the lane and in the shot panel. */
.cap-shot-pill {
	display: flex;
	width: 22px;
	height: 22px;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	background-color: var(--ed-ctl);
	color: var(--ed-text-2);
	font-size: 11px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	transition:
		background-color 0.12s ease,
		color 0.12s ease,
		box-shadow 0.12s ease;
}

.cap-shot-pill:hover:not(:disabled) {
	background-color: var(--ed-ctl-hover);
	color: var(--ed-text-1);
}

.cap-shot-pill[data-selected="true"] {
	background-color: var(--ed-accent);
	color: #ffffff;
}

.cap-shot-pill:disabled {
	opacity: 0.35;
}

/* The start and end pose of the selected shot, on the shot itself. The resize
 * handles sit on the edge above these, so a drag still grabs the edge. */
.cap-pose-dot {
	position: absolute;
	top: 50%;
	z-index: 20;
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1.5px var(--ed-accent);
	transition: background-color 0.12s ease;
}

.cap-pose-dot[data-active="true"] {
	background-color: var(--ed-accent);
}