JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- CSS -->
<link rel="stylesheet" href="/css/reset.css" />
<link rel="stylesheet" href="/css/main.css" />
<title>ColorQuest</title>
</head>
<body>
<main>
</main>
</body>
</html>
CSS
:root {
--light: hsl(36, 14%, 93%);
--dark: hsl(206, 19%, 22%);
--gold: hsl(46, 86%, 58%);
}
/*
===================================
Global styles
===================================
*/
body {
font-family: 'Lora', serif;
background-color: var(--dark);
color: var(--light);
padding: 0 8.75rem;
max-width: 107.5rem;
margin: 0 auto;
font-size: 1.25rem;
}
body *::selection {
background-color: hsla(46, 86%, 58%, 0.8);
color: var(--dark);
}
h1 {
padding-bottom: 1rem;
}
h2 {
font-family: 'Cinzel Decorative', serif;
font-size: 1.25rem;
}
button {
border: none;
background: none;
color: var(--light);
cursor: pointer;
}
a {
color: var(--light);
}
a:hover {
color: var(--gold);
transition: 0.3s;
}
button {
text-decoration: underline;
}
button:hover {
color: var(--gold);
transition: 0.3s;
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 140px;
background-color: var(--light);
color: var(--dark);
text-align: center;
padding: 5px 1rem;
position: absolute;
z-index: 1;
bottom: 160%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
/*
===================================
Main
===================================
*/
.instructions {
text-align: center;
margin-bottom: 2.5rem;
}
/*
-----------------------------------
Colors
-----------------------------------
*/
.colors-block {
width: 4rem;
height: 4rem;
border: solid 2px var(--light);
border-radius: 50%;
}
.colors-block:hover {
cursor: pointer;
}
/*
-----------------------------------
Top section
-----------------------------------
*/
.top-section {
padding: 0 2.7rem;
padding-bottom: 2.5rem;
border-bottom: solid 2px var(--light);
margin-bottom: 2.5rem;
margin-top: 5rem;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap:...