This is a solution to the Product preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout depending on their device's screen size
- See hover and focus states for interactive elements
- Solution URL: github
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- Sass - Css preprocessor
To see how you can add code snippets, see below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css" />
<title>Document</title>
</head>
<body>
<main class="grid">
<div class="grid--item-one">1</div>
<div class="grid--item-two">2</div>
<div class="grid--item-three">3</div>
</main>
</body>
</html>
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
.grid {
display: grid;
gap: 2rem;
grid-template-columns: repeat(3, 1fr);
&--item-two{
background-color:$primary-color;
grid-column: 1/3;
grid-row: 1/2;
}
}
- github - alseny-diallo
- Twitter - @alsenydiallo09