<div class="to-do-list">
  <h2>To do list</h2>
  <hr>
  <ul>
    <li>
      <input id="checkbox1" type="checkbox" checked>
      <label for="checkbox1">Drink some coffee</label>
    </li>
    <li>
      <input id="checkbox2" type="checkbox" checked>
      <label for="checkbox2">Do some work</label>
    </li>
    <li>
      <input id="checkbox3" type="checkbox">
      <label for="checkbox3">Drink more coffee</label>
    </li>
    <li>
      <input id="checkbox4" type="checkbox">
      <label for="checkbox4">Grow a beard</label>
    </li>
    <li>
      <input id="checkbox5" type="checkbox">
      <label for="checkbox5">Rule the world!</label>
    </li>
  </ul>
</div>
@use postcss-preset-env {
  stage: 0;
}


/* ---------- GENERAL ---------- */

body {
	background-color: #e5e5e5;
	color: #272727;
  display: grid;
	font: 16px/40px "Open Sans", sans-serif;
	margin: 0;
  min-block-size: 100vh;
  place-items: center;
}

h2 {
  margin: 0;
}

hr {
	background: #5e5e5e;
	border: none;
	height: 1px;
	margin: 0;
	min-height: 1px;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---------- To-Do-List ---------- */

.to-do-list {
	background: linear-gradient(top, #aaa, #fff 2%);
	background-size: 100% 40px;
	border-radius: 5px;
	box-shadow: 0 1px   0 rgba(0,   0,   0,   0.200), 
	0 3px   0 rgba(255, 255, 255, 1.0), 
	0 4px   0 rgba(0,   0,   0,   0.15),
	0 6px   0 rgba(255, 255, 255, 1.0);
	font-size: 14px;
	padding: 40px 32px;
	width: 240px;
}

.to-do-list h2 {
	color: #5e5e5e;
	font-size: 28px;
	font-weight: bold;
}

.to-do-list input[type=checkbox] {
	cursor: pointer;
	position: relative;
	visibility: hidden;
}

.to-do-list input[type="checkbox"]:after {
	border: 1px solid #166B94;
	border-radius: 3px;
	color: #fff;
	content: "";
	display: block;
	height: 16px;
	line-height: 16px;
	position: absolute;
	text-align: center;
	visibility: visible;
	width: 16px;
}

.to-do-list input[type=checkbox]:checked:after {
	border: 1px solid #979797;
	color: #979797;
	content: "✓";
}

.to-do-list input[type=checkbox]:checked + label {
	color: #979797;
	font-weight: normal;
	text-decoration: line-through;
}

.to-do-list label {
	color: #166B94;
	font-weight: bold;
	margin-left: 12px;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.