JSFiddle - React, Tailwind, and code Playground

HTML

<div class="box"></div>

<div class="pseudo-element-box"></div>

CSS

* {
  box-sizing: border-box;
}

/* uncomment below selector to see the size change of the pseudo-element
 * when it gets box-sizing: border-box applied to it
*/

/*

*,
*::before,
*::after {
  box-sizing: border-box;
}

*/

.box {
  height: 100px;
  width: 100px;
  background: rebeccapurple;
  padding: 20px;
}

/* pseudo-element */
.pseudo-element-box::before {
  position: absolute;
  content: '';
  height: 100px;
  width: 100px;
  background: orange;
  padding: 20px;
}