Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

2.9 KB
Raw Blame
.row {
	// Width of the revealed actions, given up by the label on hover only.
	--legend-actions-reserve: 78px;

	position: relative;
	display: flex;
	align-items: center;
	gap: var(--spacing-4);
	height: 28px;
	padding: 0 var(--spacing-3) 0 var(--spacing-4);
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 160ms linear;

	&:hover,
	&:focus-visible {
		background: var(--l3-background);
	}
}

.isFocused {
	background: var(--l3-background);
}

.marker {
	// Reads as a checkbox without being one: filled when shown, hollow when
	// hidden, deliberately not a check glyph.
	flex: 0 0 auto;
	box-sizing: border-box;
	position: relative;
	// Above the actions, so a narrow row's chip never covers the series colour.
	z-index: 4;
	width: 12px;
	height: 12px;
	padding: 0;
	appearance: none;
	border-width: 1.5px;
	border-style: solid;
	border-radius: var(--radius);
	cursor: pointer;
	transition:
		transform 200ms ease,
		box-shadow 200ms ease,
		background-color 160ms linear,
		opacity 160ms linear;

	&:hover {
		transform: scale(1.2);
		box-shadow: 0 0 0 2px
			color-mix(in srgb, var(--l1-foreground) 30%, transparent);
	}

	&:active {
		transform: scale(0.9);
	}

	&:disabled {
		cursor: default;
	}

	&:disabled:hover {
		transform: none;
		box-shadow: none;
	}
}

.label {
	flex: 1 1 auto;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--font-mono);
	font-size: var(--font-size-xs);
	letter-spacing: -0.01em;
	color: var(--l2-foreground);
	user-select: none;
}

.isHidden .marker {
	opacity: 0.45;
}

.isHidden .label {
	color: var(--l3-foreground);
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

/* Row actions */

.actions {
	position: absolute;
	top: var(--spacing-2);
	right: var(--spacing-3);
	z-index: 3;
	display: flex;
	align-items: center;
	gap: var(--spacing-2);
	padding-left: var(--spacing-5, 10px);
	// Sits on the row's hover background and masks the label's tail behind it.
	background: var(--l3-background);
	box-shadow: -8px 0 8px var(--l3-background);
	opacity: 0;
	transform: translateX(10px);
	pointer-events: none;
	transition:
		opacity 180ms cubic-bezier(0.08, 0.52, 0.52, 1),
		transform 180ms cubic-bezier(0.08, 0.52, 0.52, 1);

	--button-height: 20px;
	--button-variant-ghost-color: var(--l3-foreground);
	--button-variant-ghost-hover-color: var(--l1-foreground);
}

// :focus-visible, not :focus-within — the latter also matches the click that
// just toggled the series, leaving the actions stuck open.
.row:hover .actions,
.row:focus-visible .actions,
.row:has(:focus-visible) .actions {
	opacity: 1;
	transform: translateX(0);
	pointer-events: auto;
}

// The cap spares rows sized to their actions, not their label.
.row:hover .label,
.row:focus-visible .label,
.row:has(:focus-visible) .label {
	padding-right: min(var(--legend-actions-reserve), 50%);
}