Stamp on the list

Using perspective, transform-style: preserve-3d, translateZ, linear-gradient for lines on the list. Also using responsive font-size and font-stack for font-family

by Konstantin Rouda

HTML

<section class="c-container" id="container">
  <p class="o-text">
    But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.

No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.

Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure.
  </p>
</section>

CSS

HTML {
  /*using system font-stack*/
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 115%; /*~18px*/
  font-size: calc(16px + (30 - 16) * (100vw - 300px) / (1300 - 300) );
  line-height: 1.5;
  box-sizing: border-box;
}

BODY {
  margin: 0;
  color: #3a3d40;
  background: rgb(250, 250, 250);
}

*, *::before, *::after {
  box-sizing: inherit;
  color: inherit;
}

/*Actual Style*/

BODY {
  overflow: hidden;
}

.c-container {
  position: relative;
  min-height: 90vh;
  width: 50vw;
  margin: 0 auto;
  padding: 0 .4rem;
  perspective: 780px;
  transform-style: preserve-3d;
  background: rgba(254, 254, 254, 1);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .1);  
  background-image: linear-gradient(rgb(250, 250, 250) .1rem, transparent .1rem);
  background-size: 100% 1.5rem;
  
}

.c-container::before {
  content: "Approved!";
  position: absolute;
  left: 50%; top: 50%; 
  padding: .2rem .3rem .3rem;
  transform: translate(-50%, -50%) translateZ(1750px) rotateZ(-50deg);
  opacity: 0;
  visibility: hidden;
  border: 10px solid;
  line-height: 1;
  font-size: 3rem;
  font-weight: bold;
  text-transform: uppercase;
  color: firebrick;
}

.c-container.approved::before {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) translateZ(0px) rotateZ(-50deg);
  transition: transform .2s 2s ease-out;
}




.o-text {
  font-size: 1rem;
}

JavaScript

;(function () {
  "use strict";
  
  const container = document.getElementById("container");

  const CONTAINER_ANIMATE_CLASS = "approved";
   
  window.addEventListener("load", onWindowLoad);
  
  function onWindowLoad (e) {
     container.classList.add(CONTAINER_ANIMATE_CLASS);
  };
  
  
})();