scrimba
Note at 0:20
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Note at 0:20
AboutCommentsNotes
Note at 0:20
Expand for more info
index.css
run
preview
console
:root {
--wine-red: #C7375F;
--bright-red: #D42D2F;
--dark-green: #344D2F;
--light-green: #77A047;
--gold: #FAC57D;
--snow: #F0F4F7;
}

html, body {
margin: 0;
padding: 0;
}

body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
color: var(--snow);
background-color: var(--bright-red);
background-image: url("https://cdn.pixabay.com/photo/2016/11/29/13/37/christmas-1869902_960_720.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
font-family: 'Licorice', cursive;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
font-size: 1.5rem;
}

.checklist {
border: 4px dotted goldenrod;
position: relative;
background: whitesmoke;
color: var(--dark-green);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
min-width: 200px;
min-height: 200px;
max-width: 5ch;
padding: 1em 2em;
border-radius: 5px;
box-shadow: rgba(0, 0, 0, 0.8) 5px 4px 6px 3px, rgba(0, 0, 0, 0.6) 0px 2px 4px -1px;
}

.checklist-item {
margin: 0.5em;
width: 100%;
text-align: left;
font-weight: bold;
}

input[type=checkbox]:checked + label.strikethrough span{
text-decoration: line-through;
font-weight: normal;
}


[type="checkbox"] {
opacity: 0;
}

[type="checkbox"] + label {
position: relative;
padding-left: 35px;
cursor: pointer;
display: inline-block;
color: goldenrod;
line-height: 30px;
}
[type="checkbox"] + label::before {
content: "";
left: 0;
top: 0;
position: absolute;
width: 30px;
height: 25px;
outline: 3px dotted darkred;
}
[type="checkbox"]:checked + label::after {
content: "⭐";
left: 0;
top: 0;
position: absolute;
width: 30px;
height: 25px;
outline: 2px dotted green;
}



input[type=checkbox]:checked + label.strikethrough span::before {
content: "🎄";
}
input[type=checkbox]:checked + label.strikethrough span::after {
content: "🎄";
}



/* Task:
- Write the CSS to create custom checkboxes for our shopping list.

Stretch goals:
- Add a different random check for each item.
- Use JavaScript to match the custom check to the item listed, e.g. socks would have socks as the checkmark. */
Console
/index.html
LIVE