JSFiddle - React, Tailwind, and code Playground

by Artem

HTML

<div id="div">asdasdas</div>
<button id="btn">Click</button>
<form action="">asda
  <input id="radio" type="radio">
</form>

CSS

:root {
  --my-color: red;
}

::selection {
  background-color: var(--my-color);
}

JavaScript

const btn = document.getElementById('btn');
const radio = document.getElementById('radio');

radio.addEventListener('click', () => {
	console.log(1);
  document.documentElement.style.setProperty('--my-color', 'blue');
});