<div id='preview'>
  <p class='inner-content'>
    Text generated by Cat Ipsum.
    Hey! you there, with the hands find empty spot in cupboard and sleep all day. You are a captive audience
    while
    sitting on the toilet, pet me play with twist ties good morning sunshine but leave dead animals as gifts
    check
    cat door for ambush 10 times before coming in for what the heck just happened, something feels fishy. Check
    cat
    door for ambush 10 times before coming in fall asleep on the washing machine. Put claws in the eye of the
    beholder groom yourself 4 hours - checked, have your beauty sleep 18 hours - checked, be fabulous for the
    rest
    of the day - checked. Cat sit like bread purr wack the mini furry mouse. Make muffins. In the middle of the
    night i crawl onto your chest and purr gently to help you sleep. Poop in the plant pot gnaw the corn cob,
    catto
    munch salmono peer out window, chatter at birds, lure them to mouth do not try to mix old food with new one
    to
    fool me!.

    I'm going to lap some water out of my master's cup meow chew foot, so stare at ceiling please stop looking
    at
    your phone and pet me so licks paws. Meow find something else more interesting, yet kitty pounce, trip,
    faceplant you didn't see that no you didn't definitely didn't lick, lick, lick, and preen away the
    embarrassment. Lick the plastic bag eat from dog's food put toy mouse in food bowl run out of litter box at
    full
    speed kitty scratches couch bad kitty massacre a bird in the living room and then look like the cutest and
    most
    innocent animal on the planet howl on top of tall thing but waffles. Toy mouse squeak roll over eat my own
    ears
    and catty ipsum but if it fits i sits dream about hunting birds. Stuff and things mew. I shredded your
    linens
    for you. Mew give me some of your food give me some of your food give me some of your food meh, i don't want
    it
    step on your keyboard while you're gaming and then turn in a circle . Look at dog hiiiiiisssss i could pee
    on
    this if i had the energy. Lick arm hair ask to go outside and ask to come inside and ask to go outside and
    ask
    to come inside 𝕄𝔼𝕆𝕎 poop on grasses. Destroy couch cat snacks sit in a box for hours run off
    table
    persian cat jump eat fish so mew mew catch small lizards, bring them into house, then unable to find them on
    carpet sugar, my siamese, stalks me (in a good way), day and night . Russian blue. Stinky cat drool at four
    in
    the morning wake up owner meeeeeeooww scratch at legs and beg for food then cry and yowl until they wake up
    at
    two pm jump on window and sleep while observing the bootyful cat next door that u really like but who
    already
    has a boyfriend end up making babies with her and let her move in but lie on your belly and purr when you
    are
    asleep sit on human.

    Poop on couch. Have my breakfast spaghetti yarn dismember a mouse and then regurgitate parts of it on the
    family
    room floor yet cats go for world domination lick the other cats kitty pounce, trip, faceplant you didn't see
    that no you didn't definitely didn't lick, lick, lick, and preen away the embarrassment, meow meow pee in
    shoe
    and sweet beast. Claw at curtains stretch and yawn nibble on tuna ignore human bite human hand. My slave
    human
    didn't give me any food so i pooped on the floor jump on counter removed by human jump on counter again
    removed
    by human meow before jumping on counter this time to let the human know am coming back. Fight an alligator
    and
    win leave hair on owner's clothes or poop in litter box, scratch the walls cat walks in keyboard and play
    with
    twist ties the door is opening! how exciting oh, it's you, meh. Knock dish off table head butt cant eat out
    of
    my own dish grab pompom in mouth and put in water dish so i'm bored inside, let me out i'm lonely outside,
    let
    me in i can't make up my mind whether to go in or out, guess i'll just stand partway in and partway out,
    contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in
    greatest offense! but pee in human's bed until he cleans the litter box. Push your water glass on the floor.
    Run
    in circles bury the poop bury it deep, for grab pompom in mouth and put in water dish. Cat mojo chew
    master's
    slippers. Meowzer. Break lamps and curl up into a ball howl on top of tall thing take a big fluffing crap
    sit and stare bite the neighbor's bratty kid.

  </p>
</div>
<div id="form-container">
  <div id="form">
    <div id='size-inputs'>
      <h2>Sizes</h2>
      <div>
        <label for="scrollbar-width">Scrollbar Width (px)</label>
        <input id="scrollbar-width" name="scrollbar-width" type="number" min="0" step="10" value="20" />
      </div>
      <div>
        <label for="scrollbar-height">Scrollbar Height (px)</label>
        <input id="scrollbar-height" name="scrollbar-height" type="number" min="0" step="10" value="20" />
      </div>
      <div>
        <label for="scrollbar-border-radius">Border Radius (px)</label>
        <input id="scrollbar-border-radius" name="scrollbar-border-radius" type="number" min="0" step="2" value="8" />
      </div>
    </div>
  </div>
</div>
body {
  display: flex;
  flex-direction: row;
  margin: auto;
  padding: 24px;
  color: white;
  background-color: #000000;
  height: 100%;
}

#form-container {
  width: 50%;
  min-width: 30%;
  display: flex;
  align-items: center;
  justify-items: center;
}

#form {
  display: flex;
  justify-items: center;
  flex-direction: column;
}

#preview {
  margin: auto;
  width: 300px;
  height: 400px;
  resize: both;
  overflow: auto;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid white;
  color: black;
  background: rgba(255, 255, 255, 0.8);
}

#preview::-webkit-scrollbar {
  width: var(--scrollbar-width, 20px);
  height: var(--scrollbar-height, 20px);
}

#preview::-webkit-scrollbar-track {
  background: var(--scrollbar-track-color, #a1a1aa);
}

#preview::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: var(--scrollbar-border-radius, 8px);
}
const scrollbarDiv = document.getElementById("preview");
const heightInput = document.getElementById("scrollbar-height");
const widthInput = document.getElementById("scrollbar-width");
const borderRadiusInput = document.getElementById("scrollbar-border-radius");

const sizePropertyArray = [
  {
    el: heightInput,
    property: "--scrollbar-height"
  },
  {
    el: widthInput,
    property: "--scrollbar-width"
  },
  {
    el: borderRadiusInput,
    property: "--scrollbar-border-radius"
  }
];

const setSizeFieldOnChange = (el, property) => {
  el.onchange = () => {
    scrollbarDiv.style.setProperty(property, `${el.value}px`);
  };
};

sizePropertyArray.forEach(({ el, property }) =>
  setSizeFieldOnChange(el, property)
);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.