Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

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.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


The animated radial-gradient is achieved by scaling a pseudo element that sits in front of the text. 
The dynamic text colour uses mix-blend-mode: difference. 

However, this seems to only work if the colours are black and white (I have tested other inverse colours without success)... any ideas how to allow for different colours (inverse or otherwise)?? Smash that fork button :D
<input type="checkbox" id="cb1" /><label for="cb1">Toggle me</label>


$color-dark: #000;
$color-light: #fff;
$bg-size-end: 4.2;
$dur: .3s;

html { box-sizing: border-box; height: 100%; font-size: 10px; } *, *::before, *::after { box-sizing: inherit; }

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #57bd84;

input[type=checkbox] {
  height: 0;
  width: 0;
  visibility: hidden;

  &:checked + label {
    &:after {
      transform: scale($bg-size-end);

label {
  outline: none;
  user-select: none;
  color: $color-dark;
  font-family: 'Lato', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 0.04rem;
  padding: 1.5rem 3rem;
  cursor: pointer;
  border-radius: .4rem;
  border: .3rem solid $color-dark;
  background: $color-light;
  position: relative;
  overflow: hidden;

  &::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%; 
    top: 0;
    left: 0;
    transform: scale(0);
    transition: transform $dur ease-in;
    mix-blend-mode: difference;
    //Gradient start values are somewhat arbitrary. But this seemed a good fit to avoid overly-blurry circle edge.
    background: radial-gradient(
      circle at center, 
      $color-light 24%, 
      $color-dark 25%, 
      $color-dark 100%);

  box-shadow: 0 3px 0 0 $color-dark;
  &:active {
    top: 3px;
    box-shadow: none;