cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <h2>Update CSS Variables with <span class='hl'>JS</span></h2>

<div class="controls">
  <label for="raduis">Raduis:</label>
  <input id="border-radius" type="range" name="border-radius" min="10" max="500" value="10" data-sizing="px">

  <label for="blur">Blur:</label>
  <input id="blur" type="range" name="blur" min="0" max="25" value="5" data-sizing="px">

  <label for="base">Base Color</label>
  <input id="base" type="color" name="base" value="#BADA55">

<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/194840/dragonfly.jpg">
              @import url('https://fonts.googleapis.com/css?family=Raleway');

:root {
  --base: #BADA55;
  --spacing: 10px;
  --blur: 5px;

.hl {
  color: var(--base);

img {
  height: 50vw;
  // padding: var(--spacing);
  background: var(--base);
  filter: blur(var(--blur));
  border-radius: var(--border-radius);

a {
  color: var(--base);
  text-decoration: none;

      misc styles, nothing to do with CSS variables

    body {
      text-align: center;

    body {
      background: #123;
      color: white;
      font-family: 'Raleway', sans-serif;
      // font-weight: 100;
      font-size: 2.5rem;

    .controls {
      margin-bottom: 50px;

    input {
              const inputs = document.querySelectorAll('.controls input');

function handleUpdate() {
  const suffix = this.dataset.sizing || '';
  document.documentElement.style.setProperty(`--${this.name}`, this.value + suffix)

inputs.forEach(input => input.addEventListener('change', handleUpdate));
inputs.forEach(input => input.addEventListener('mousemove', handleUpdate));
Loading ..................