Login
4 branches 0 tags
Ben (Desktop/Arch) More efficient state handling 1a83b3d 1 month ago 96 Commits
rubhub / frontend / app / css / layout.css
html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Header sticks to the top naturally */
header {
	display: flex;
	/* left on one side, right on the other */
	align-items: center;
	flex-direction: row;
	gap: var(--space-m);
	justify-content: center;
	padding: var(--space-m) var(--space-l);
	background: var(--background-color-bright);
}

header .header-center {
	flex: 1;
}

/* The growy middle */
main {
	flex: 1;
	padding: var(--space-l);
}

main > section {
	margin: 0 auto var(--space-xl);
	width: 100%;
	max-width: var(--max-content-width);
}

.page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-m);
	flex-wrap: wrap;
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--space-m);
}

.card {
	border: 1px solid var(--background-color-muted);
	border-radius: var(--space-m);
	padding: var(--space-m) var(--space-l);
	background: var(--background-color-bright);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Footer stays at bottom because body is a column flexbox */
footer {
	padding: var(--space-m) var(--space-l);
	background: var(--background-color-bright);
}

/* Centered footer nav */
.footer-nav {
	display: flex;
	justify-content: end;
	gap: var(--space-l);
}

.header-left,
.header-right {
	display: flex;
	align-items: center;
	gap: var(--space-l);
}

.logo {
	font-size: 1.5rem;
	text-decoration: none;
	line-height: 1em;
	color: var(--secondary-color);
}

.header-left a#browse-link,
.footer-nav a {
	text-decoration: none;
	color: var(--text-color);
}

.header-left a#browse-link {
	margin-left: 1rem;
}