traffic-lights {
  background: #555;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 15px;
  width: min-content;
  margin: 15px 0;
}

traffic-lights-bulb {
  border-radius: 50%;
  height: 100px;
  width: 100px;
  background: black;

  /**
   * Someday we'll be able to replace all of these three declarations with e.g.
   * &[on] { background: attr(color) }
   * https://developer.mozilla.org/en-US/docs/Web/CSS/attr
   */
  &[on][color="red"] {
    background: red;
  }

  &[on][color="yellow"] {
    background: yellow;
  }

  &[on][color="green"] {
    background: green;
  }
}
