JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://raw.githubusercontent.com/treinaweb/treinaweb-front-playground/standalone/tw-playground.min.css">
<div id="root" ></div>

CSS

.box-container{
  box-sizing: content-box;
  border: 2px solid black;
  background-color: #0265ad;
}

JavaScript

window.twPlaygroundData = {
    html: {
        initial: `
<div class="box-container" style="--aspect-ratio: 16/9" >

</div>
        `,
        controllers: [

        ]
    },
    css: {
        initial: `

        `,
        controllers: [
            {
                selector: '.box-container',
                avoidHighlight: true,
                props: [
                    {
                        name: 'width',
                        value: '100',
                        valueSuffix: "px",
                        type: 'range',
                        properties: [
                        	{
                          	name: 'min',
                            value: '50'
                          },
                          {
                          	name: 'max',
                            value: '300'
                          },
                          {
                          	name: 'step',
                            value: '10'
                          }
                        ]
                    }
                ]
            },
            {
                selector: '.box-container::before',
                avoidHighlight: true,
                props: [
                {
                        name: 'content',
                        value: '""',
                        type: 'string'
                    },
                    {
                        name: 'height',
                        value: '0',
                        type: 'string'
                    },
                    {
                        name: 'float',
                        value: 'left',
                        type: 'string'
                    },
                    {
                        name: 'padding-bottom',
                        value: 'calc( 100% / (var(--aspect-ratio)) )',
                        type: 'string',
                    }
                ]
            },
            {
                selector: '.box-container::after',
             ...