Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div class="canvas--wrapper">
<ul class="canvas">
  <li class="canvas--link"></li>
</ul>
</div>
              
            
!

CSS

              
                @function pixelize($matrix, $size: 5px, $outline: #292829, $pink: #FF52B8, $gDark: #399500, $gLight: #67BD00, $gbDark: #009568, $gbLight: #00E065, $white: white, $skin: #FF9E5F, $skinDark: #C96400, $orange: #FF7000, $gold: #FCDB00, $red: #D60010, $blue: #867EFF, $blueDark: #2E1BD7) {
  $l: length($matrix); // length of the entire
  $shadows: ''; // shadows list section
  $i: $l; // length of the line on a matrix

// read through the all the rows of the list
  @for $i from 1 through $l {
    $row: nth($matrix, $i); // this is a single row

    @for $j from 1 through length($row){
        $item: nth($row, $j); //itemize each element in that row

// if that item is an x, give it a drop shadow square w/background color (this is where we're building the shadows list)
        @if $item == x{
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $outline;
        } @else if $item == p {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $pink;
        } @else if $item == g {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $gLight;
        } @else if $item == G {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $gDark;
        } @else if $item == t {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $gbLight;
        } @else if $item == T {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $gbDark;
        } @else if $item == w {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $white;
        } @else if $item == s {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $skin;
        } @else if $item == S {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $skinDark;
        } @else if $item == o {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $orange;
        } @else if $item == e {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $gold;
        } @else if $item == r {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $red;
        } @else if $item == b {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $blue;
        } @else if $item == B {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + $blueDark;
        } @else {
          $shadows:  $shadows + ($j*$size) + ' ' + ($i*$size) + ' ' + transparent;
        }

// when you get to the end of the row, add a comma before the next block of drpo shadows
      @if not ($j == length($row) and $i == $l) {
        $shadows: $shadows + ',';
      }
    }
  }

// return the entire shadow list here
  @return unquote($shadows);
}

$icon-size-var: 5px;
// icon matrix we're reading through
$link:         (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
               (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
               (_ _ _ _ _ _ x x x x _ _ _ _ _ _)
               (_ _ _ _ _ x G G g G x x _ _ _ _)
               (_ _ _ _ x G G g g g g G x _ _ _)
               (_ x _ x x o G G g G o x G x x _)
               (x s x p x x o o o o x x G x s x)
               (x s x p p p x x x x p p x x s x)
               (x S s x p p p p p p p p x s S x)
               (x S x p x x x x x x x x p x S x)
               (_ x S x S w w S S w w S x S x _)
               (_ _ x S S w x s s x w S S x _ _)
               (_ _ x x S s x s s x s S x x _ _)
               (_ x t T x S x s s s S x T t x _)
               (x w x x x x w x S x x T T x S x)
               (x w w w w w w x x T t T x S S x)
               (x w B B B B w x t t t T x x s x)
               (x w B b b B w x t T T T x s s x)
               (x w B b b B w x e x e e T x s x)
               (x w B b b B w x e e T T x x x _)
               (_ x w B B w x T T T x x r x _ _)
               (_ _ x w w x x x x x r o x x _ _)
               (_ _ _ x x x x x x x x x x _ _ _)
               (_ _ _ _ _ x x x x x x _ _ _ _ _);

$link--l1:     (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
               (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
               (_ _ _ _ _ _ x x x x _ _ _ _ _ _)
               (_ _ _ _ _ x G G g G x x _ _ _ _)
               (_ _ _ _ x G G g g g g G x _ _ _)
               (_ x _ x x o G G g G o x G x x _)
               (x s x p x x o o o o x x G x s x)
               (x s x p p p x x x x p p x x s x)
               (x S s x p p p p p p p p x s S x)
               (x S x p x x x x x x x x p x S x)
               (_ x S x S w w S S w w S x S x _)
               (_ _ x S S w x s s x w S S x _ _)
               (_ _ x x S s x s s x s S x x _ _)
               (_ x t T x S s s s s S x T t x _)
               (x x x T T x x S S x x T T x S x)
               (x w x x x x w x x T t T x S S x)
               (x w w w w w w x t t T T x S x x)
               (x w B B B B w x t T T T x x s x)
               (x w B b b B w x e x e e x s x x)
               (x w B b b B w x e e T T x x x _)
               (x w B b b B w x T T x x r x _ _)
               (_ x w B B w x x x x r r x x _ _)
               (_ _ x w w x x x x x x x x _ _ _)
               (_ _ _ x x x x x x x x _ _ _ _ _);

$link--l2:     (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
               (_ _ _ _ _ _ x x x x _ _ _ _ _ _)
               (_ _ _ _ _ x G G g G x x _ _ _ _)
               (_ _ _ _ x G G g g g g G x _ _ _)
               (_ x _ x x o G G g G o x G x x _)
               (x s x p x x o o o o x x G x s x)
               (x s x p p p x x x x p p x x s x)
               (x S s x p p p p p p p p x s S x)
               (x S x p x x x x x x x x p x S x)
               (_ x S x S w w S S w w S x S x _)
               (_ _ x S S w x s s x w S S x _ _)
               (_ x x x S s x s s x s S x t x _)
               (x S S S x S s s s s S x T x x _)
               (x x S x T x x S S x x T x S S x)
               (x w x x x x w x x t T x x S S x)
               (x w w w w w w x t T x s s x S x)
               (x w B B B B w x t T x s s x x _)
               (x w B b b B w x e x e x x x _ _)
               (x w B b b B w x e e T T x x _ _)
               (x w B b b B w x T T x x r x _ _)
               (_ x w B B w x x x x x x x x _ _)
               (_ _ x w w x x x x x x x x x _ _)
               (_ _ _ x x x x x x x x x x _ _ _)
               (_ _ _ _ _ x x x x x x _ _ _ _ _);

$link--l3:     (_ _ _ _ _ _ x x x x _ _ _ _ _ _)
               (_ _ _ _ _ x G G g G x x _ _ _ _)
               (_ _ _ _ x G G g g g g G x _ _ _)
               (_ x _ x x o G G g G o x G x x _)
               (x s x p x x o o o o x x G x s x)
               (x s x p p p x x x x p p x x s x)
               (x S s x p p p p p p p p x s S x)
               (x S x p x x x x x x x x p x S x)
               (_ x S x S w w S S w w S x S x _)
               (_ _ x S S w x s s x w S S x _ _)
               (_ _ x x S s x s s x s S x x _ _)
               (_ x S x x S x s s s S x S S x _)
               (x w x x x x w x S x x S S S x _)
               (x w w w w w w x x T x x S S x _)
               (x w B B B B w x T x s s x S x _)
               (x w B b b B w x T x s s x x x _)
               (x w B b b B w x e x x x x x _ _)
               (x w B b b B w x e e T T x x _ _)
               (x x w B B w x T T T x x x _ _ _)
               (_ x x w w x x x x x x x x _ _ _)
               (_ _ x x x x x x x x x x x x _ _)
               (_ _ x x x x x x x x x x x x _ _)
               (_ _ _ x x x x x x x x x x _ _ _)
               (_ _ _ _ _ x x x x x x _ _ _ _ _);

$link--r1:     (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
               (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
               (_ _ _ _ _ _ x x x x _ _ _ _ _ _)
               (_ _ _ _ _ x G G g G x x _ _ _ _)
               (_ _ _ _ x G G g g g g G x _ _ _)
               (_ x _ x x o G G g G o x G x x _)
               (x s x p x x o o o o x x G x s x)
               (x s x p p p x x x x p p x x s x)
               (x S s x p p p p p p p p x s S x)
               (x S x p x x x x x x x x p x S x)
               (_ x S x S w w S S w w S x S x _)
               (_ _ x S S w x s s x w S S x _ _)
               (_ _ x x S s x s s x s S x x _ _)
               (_ x t T x S s s s s S x T t x _)
               (x x x T T x x S S x x T T x S x)
               (x w x x x x w x x T t T x S S x)
               (x w w w w w w x t t T T x S x x)
               (x w B B B B w x t T T T x x s x)
               (x w B b b B w x e x e e x s x x)
               (x w B b b B w x e e T T x x x _)
               (x w B b b B w x T T x x r x _ _)
               (_ x w B B w x x x x r r x x _ _)
               (_ _ x w w x x x x x x x x _ _ _)
               (_ _ _ x x x x x x x x _ _ _ _ _);

$link--r2:     (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
               (_ _ _ _ _ _ x x x x _ _ _ _ _ _)
               (_ _ _ _ _ x G G g G x x _ _ _ _)
               (_ _ _ _ x G G g g g g G x _ _ _)
               (_ x _ x x o G G g G o x G x x _)
               (x s x p x x o o o o x x G x s x)
               (x s x p p p x x x x p p x x s x)
               (x S s x p p p p p p p p x s S x)
               (x S x p x x x x x x x x p x S x)
               (_ x S x S w w S S w w S x S x _)
               (_ _ x S S w x s s x w S S x _ _)
               (_ x t x S s x s s x s S x t x _)
               (_ x x T x S s s s s S x S S S x)
               (x x S x T x x S S x x T x S x x)
               (x w x x x x w x x T t T x x s x)
               (x w w w w w w x t t T T T x x _)
               (x w B B B B w x t T T T e x _ _)
               (x w B b b B w x e T x x T x _ _)
               (x w B b b B w x e x T T x r x _)
               (x w B b b B w x T T T x r o x _)
               (_ x w B B w x x x x x r r x _ _)
               (_ _ x w w x x x x x x x x x _ _)
               (_ _ _ x x x x x x x x x x _ _ _)
               (_ _ _ _ _ x x x x x x _ _ _ _ _);

$link--r3:     (_ _ _ _ _ _ x x x x _ _ _ _ _ _)
               (_ _ _ _ _ x G G g G x x _ _ _ _)
               (_ _ _ _ x G G g g g g G x _ _ _)
               (_ x _ x x o G G g G o x G x x _)
               (x s x p x x o o o o x x G x s x)
               (x s x p p p x x x x p p x x s x)
               (x S s x p p p p p p p p x s S x)
               (x S x p x x x x x x x x p x S x)
               (_ x S x S w w S S w w S x S x _)
               (_ _ x S S w x s s x w S S x _ _)
               (_ _ x x S s x s s x s S x x _ _)
               (_ x S S x S x s s s S x x S x _)
               (x w x x x x w x S x x x S S x _)
               (x w w w w w w x x T t T x S x _)
               (x w B B B B w x t t T T T x _ _)
               (x w B b b B w x t T T e e x _ _)
               (x w B b b B w x e x e T T x _ _)
               (x w B b b B w x e x T x x x x _)
               (_ x w B B w x T T T x r r o x _)
               (_ _ x w w x x x x x r x x x x _)
               (_ _ x x x x x x x x x x x x _ _)
               (_ _ x x x x x x x x x x x x _ _)
               (_ _ _ x x x x x x x x x x _ _ _)
               (_ _ _ _ _ x x x x x x _ _ _ _ _);

// list we're styling
.canvas--wrapper {
  height: 100vh;
  width: 100vw;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas {
  width: 500px;
  height: 500px;
  //background-image: url('https://i.imgur.com/aRausAZ.png');
  background-size: 100%;
  background-color: #78b890;
  border: 6px solid black;
  box-shadow:
    0 0 0 4px hsl(0, 0%, 100%),
    0 0 0 8px hsl(0, 0%, 0%);
  li {
    display: inline-block;
    position: relative;
  }

  &--link {
    margin: 190px 0 0 215px;
    &:after {
      content: '';
      position: absolute;
      top: -$icon-size-var;
      left: -$icon-size-var;
      width: $icon-size-var;
      height: $icon-size-var;
      box-shadow: pixelize($link);
      animation: runningMan 0.5s step-end infinite;
    }
  }
}

@keyframes runningMan {
  0% {
    box-shadow: pixelize($link);
  }
  8.33% {
    box-shadow: pixelize($link--l1);
  }
  16.67% {
    box-shadow: pixelize($link--l2);
  }
  25% {
    box-shadow: pixelize($link--l3);
  }
  33.33% {
    box-shadow: pixelize($link--l2);
  }
  41.67% {
    box-shadow: pixelize($link--l1);
  }
  50% {
    box-shadow: pixelize($link);
  }
  58.33% {
    box-shadow: pixelize($link--r1);
  }
  66.67% {
    box-shadow: pixelize($link--r2);
  }
  75% {
    box-shadow: pixelize($link--r3);
  }
  83.33% {
    box-shadow: pixelize($link--r2);
  }
  91.67% {
    box-shadow: pixelize($link--r1);
  }
  100% {
    box-shadow: pixelize($link);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console