<div class="wrapper" color-scheme="light">
  <ul>
    <li>Primary</li>
    <li>Surface1</li>
    <li>Surface2</li>
    <li>Surface3</li>
    <li>Surface4</li>
  </ul>
</div>
<div class="wrapper" color-scheme="dark">
  <ul>
    <li>Primary</li>
    <li>Surface1</li>
    <li>Surface2</li>
    <li>Surface3</li>
    <li>Surface4</li>
  </ul>
</div>
<div class="wrapper" color-scheme="dim">
  <ul>
    <li>Primary</li>
    <li>Surface1</li>
    <li>Surface2</li>
    <li>Surface3</li>
    <li>Surface4</li>
  </ul>
</div>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  min-height: 100vh;
  font-family: "Exo", Arial, sans-serif;
  background-color: #557;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.wrapper {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

:root {
  --primary-hue: 250;
  --primary-saturation: 100%;
  --primary-lightness: 90%;
}

[color-scheme="light"] {
  --primary: hsl(
    var(--primary-hue) var(--primary-saturation) var(--primary-lightness)
  );
  --on-primary: hsl(var(--primary-hue) var(--primary-saturation) 10%);

  --surface1: hsl(var(--primary-hue) 40% 90%);
  --surface2: hsl(var(--primary-hue) 30% 99%);
  --surface3: hsl(var(--primary-hue) 30% 92%);
  --surface4: hsl(var(--primary-hue) 30% 85%);

  --surface-shadow: var(--primary-hue) 40% 10%;
  --shadow-strength: 0.25;
}

[color-scheme="dark"] {
  --primary: hsl(
    var(--primary-hue) calc(var(--primary-saturation) / 2.5)
      calc(var(--primary-lightness) / 2.5)
  );
  --on-primary: hsl(var(--primary-hue) var(--primary-saturation) 90%);

  --surface1: hsl(var(--primary-hue) 40% 50%);
  --surface2: hsl(var(--primary-hue) 38% 46%);
  --surface3: hsl(var(--primary-hue) 36% 41%);
  --surface4: hsl(var(--primary-hue) 34% 30%);
  --surface-shadow: var(--primary-hue) 40% 20%;
  --shadow-strength: 0.25;
}

[color-scheme="dim"] {
  --primary: hsl(
    var(--primary-hue) calc(var(--primary-saturation) / 1.5)
      calc(var(--primary-lightness) / 3.5)
  );
  --on-primary: hsl(var(--primary-hue) 35% 90%);

  --surface1: hsl(var(--primary-hue) 40% 20%);
  --surface2: hsl(var(--primary-hue) 40% 25%);
  --surface3: hsl(var(--primary-hue) 30% 30%);
  --surface4: hsl(var(--primary-hue) 30% 35%);

  --surface-shadow: var(--primary-hue) 40% 10%;
  --shadow-strength: 0.25;
}

ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

li {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  aspect-ratio: 4 / 1;
  border-radius: 6px;
  box-shadow: 0 0 2px 3px hsl(var(--surface-shadow) / var(--surface-strength));
  color: var(--on-primary);
}

li:nth-child(1) {
  background-color: var(--primary);
}

li:nth-child(2) {
  background-color: var(--surface1);
}

li:nth-child(3) {
  background-color: var(--surface2);
}

li:nth-child(4) {
  background-color: var(--surface3);
}

li:nth-child(5) {
  background-color: var(--surface4);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.