Dough Git

clove/web

src/lib/styles/header.css

back to src/lib/styles

/* src/lib/styles/header.css
 * DASL-1.2 — (c) Clove Twilight
 */

/* Backdrop */

.backdrop {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: -1;
	height: 30rem;
	overflow: hidden;
	pointer-events: none;
}

.backdrop::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url('/background.avif') center / cover no-repeat;
	opacity: 0.5;
}

.backdrop::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(rgb(11 10 13 / 55%), rgb(11 10 13 / 80%) 55%, var(--bg)),
		radial-gradient(70% 60% at 20% 30%, rgb(235 69 158 / 12%), transparent 70%);
}

/* Top bar */

header {
	position: relative;
	/* The hamburger drawer lives in here, so the whole header has to stack above
	   page content (e.g. the z-index 10 tooltips and the homepage status badge) */
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 62rem;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;
}

header nav {
	display: flex;
	gap: 1.25rem;
	font-size: 0.9rem;
}

header nav a {
	display: inline-flex;
	gap: 0.4em;
	align-items: center;
	color: var(--muted);
	text-decoration: none;
}

header nav a:hover {
	color: var(--text);
}

.brand {
	display: inline-flex;
	gap: 0.6rem;
	align-items: center;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
}

.brand img {
	border-radius: 50%;
	outline: 1px solid var(--line);
}

.nav-icon,
.nav-icon svg {
	width: 1.2em;
	height: 1.2em;
	flex-shrink: 0;
}

/* Narrow screens: the nav goes icon-only (labels stay for screen readers and
   the hover title), then the domain name goes too, so the hamburger never
   gets pushed off the edge */

.nav-label,
.brand-name {
	white-space: nowrap;
}

@media (max-width: 52rem) {
	header nav {
		gap: 1.1rem;
		align-items: center;
	}

	header nav a {
		font-size: 1.05rem;
	}

	.nav-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}
}

@media (max-width: 30rem) {
	header {
		flex-wrap: nowrap;
		column-gap: 1rem;
		padding-inline: 1rem;
	}

	header nav {
		gap: 0.85rem;
	}

	.brand-name {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	header .now-playing {
		right: 1rem;
		max-width: calc(100% - 2rem);
	}
}

@media print {
	header {
		display: none;
	}
}