jnevius
Ran out of time and did not get very far...haha. I honestly always forget all the CSS grid attributes...lol.
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap");
*, *::before, *::after {
box-sizing: border-box;
}
:root {
font-family: "Space Grotesk";
width: 100%;
--color-brand: hsl(50, 20%, 50%, 1);
--color-brand-soft: hsl(50, 20%, 50%, .7);
}
header {
display: flex;
width: 100%;
padding: 12px;
justify-content: space-between;
align-items: center;
position: sticky;
top: 0;
background-color: white;
box-shadow: black 0px 1px 0px;
.logo {
text-decoration: none;
font-size: 1rem;
font-weight: bold;
color: black;
&:hover {
color: var(--color-brand);
}
}
nav {
height: auto;
display: flex;
padding: 12px;
ul {
display: flex;
height: auto;
align-items: center;
margin: 0;
list-style: none;
gap: 12px;
li {
a {
text-decoration: none;
background-color: white;
padding: 8px 16px;
color: black;
border-radius: 8px;
word-wrap: nowrap;
}
&:hover {
a {
background-color: var(--color-brand);
color: white;
}
}
}
}
}
}
main {
background-image: url("https://images.unsplash.com/photo-1599819055803-717bba43890f?q=80&w=1740&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
background-size: cover;
}
.hero {
display: flex;
flex-direction: column;
padding: 1.5em;
color: white;
border-bottom: 1px solid white;
.eyebrow {
margin-bottom: 0;
font-size: 1em;
}
h1 {
margin: 0;
font-size: 3em;
&+ p {
margin: 0;
}
}
.hero-actions {
display: flex;
gap: 12px;
margin-top: 36px;
a {
text-decoration: none;
color: white;
border: 1px solid white;
padding: 8px 16px;
&:hover {
background-color: var(--color-brand);
}
}
}
}
.menu {
color: white;
padding: 24px;
.menu-grid {
border: 1px solid white;
padding: 12px;
background-color: var(--color-brand-soft);
li {
list-style: none;
display: grid;
grid-template-columns: 2fr 2fr 1fr;
justify-content: space-between;
margin: 0;
.price {
text-align: end;
}
> * {
margin: 0;
}
}
}
}
Discussion 0
Sign in to join the discussion.