Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

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

              
                .wrapper
  h1 CSS RuneScape Chat Effects
  p wave, scroll, slide, flash1, flash2, flash3, glow1, glow2, glow3
  form
    select#select
      option(value="wave") wave:
      option(value="scroll") scroll:
      option(value="slide") slide:
      option(value="flash1") flash1:
      option(value="flash2") flash2:
      option(value="flash3") flash3:
      option(value="glow1") glow1:
      option(value="glow2") glow2:
      option(value="glow3") glow3:
    input.message(placeholder="message here")
    button(type="button") go
  hr
  .spanwrap
    span.wave.lettering try&nbsp;the&nbsp;form&nbsp;above&nbsp;for&nbsp;free&nbsp;nostalgia!

              
            
!

CSS

              
                $length: 50;

@keyframes wave {
  0% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(5px);
  }
  50%{
    transform: translateY(0);
  }
  75% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes scroll {
  0% {
    text-indent: 500px;
  }
  100% {
    text-indent: -20em;
  }
}

@keyframes slide {
  0%{
    top: -1.5em;
  }
  10%,
  90%{
    top: 0;
  }
  100% {
    top: 1.5em;
  }
}

@keyframes flash1 {
  0%{
    color: #FF0000;
  }
  50%{
    color: #ff0;
  }
}

@keyframes flash2 {
  0%{
    color: #0000FF;
  }
  50%{
    color: #00FFFF;
  }
}

@keyframes flash3 {
  0%{
    color: #00B000;
  }
  50%{
    color: #80FF80;
  }
}

@keyframes glow1 {
  0%{
    color: #FF0000;
  } 33%{
    color: #00B000;
  } 66% {
    color: #0000FF;
  } 100% {
    color: #FF0000;
  }
}

@keyframes glow2 {
  0%{
    color: #FF0000;
  } 33%{
    color: #800080;
  } 66% {
    color: #0000FF;
  } 100% {
    color: #FF0000;
  }
}

@keyframes glow3 {
  0%{
    color: #FFFFFF;
  } 25%{
    color: #00B000;
  } 50% {
    color: #FFFFFF;
  } 67.5%{
    color: #00FFFF;
  } 75% {
    color: #0000FF;
  } 100% {
    color: #FFFFFF;
  }
}

@mixin wave($length){
  @for $i from 1 through $length {
    .char#{$i}{
      display: inline-block;
      animation: wave .66s linear infinite unquote(-$i * 50 + ms);
        //the negative animation delay means the characters all start at the same time but at different parts of the animation!
    }
  } 
}

body {
  background:#369;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrapper{
  h1 {
    font-size: 1.2em;
    text-decoration: underline;
    margin-bottom: 10px;
  }
  width: 500px;
  height: 500px;
  margin: 20px auto;
  overflow: hidden;
  box-sizing: border-box;
  whitespace: nowrap;
  font-family: 'runescape_chat_bold_07regular';
  font-size: 18px;
  color: #FFFF00;
  text-shadow: 1px 1px black;
  .spanwrap{
    overflow:hidden;
    padding:0.5em 0;
  }
}


.wave {
  @include wave($length);
}

.scroll {
  display: inline-block;
  white-space: nowrap;
  animation: scroll 8s infinite linear;
}

.slide {
  animation: slide 3s linear;
  position:relative;
  top: -2em;
}

@for $i from 1 through 3 {
  .flash#{$i} {
  animation: flash#{$i} 0.45s steps(1, end) infinite;
  }
}

@for $i from 1 through 3 {
  .glow#{$i} {
  animation: glow#{$i} 3s linear infinite;
  }
}

              
            
!

JS

              
                //Wanted to mess around with some scss and remembered those old chat animations from RS. 
//NOTE: These are all just eyeballed from the the OSRS client. 

$(document).ready(function() {
  $(".lettering").lettering();

  $('button').click(function() {
    var message = $('.message').val();
    message = message.replace(/\s/g, '&nbsp;');
    $('span').html(message);
    if ($('#select').val() == 'wave') {
      $('span').removeClass();
      $('span').addClass('lettering wave');
      $(".lettering").lettering();
    } else if ($('#select').val() == 'scroll') {
      $('span').removeClass();
      $('span').addClass('scroll');
    } else if ($('#select').val() == 'slide') {
      $('span').removeClass();
      $('span').addClass('slide');
    }
    else if ($('#select').val() == 'flash1') {
      $('span').removeClass();
      $('span').addClass('flash1');
    }
    else if ($('#select').val() == 'flash2') {
      $('span').removeClass();
      $('span').addClass('flash2');
    }
    else if ($('#select').val() == 'flash3') {
      $('span').removeClass();
      $('span').addClass('flash3');
    }
    else if ($('#select').val() == 'glow1') {
      $('span').removeClass();
      $('span').addClass('glow1');
    }
    else if ($('#select').val() == 'glow2') {
      $('span').removeClass();
      $('span').addClass('glow2');
    }
    else if ($('#select').val() == 'glow3') {
      $('span').removeClass();
      $('span').addClass('glow3');
    }
  });
});
              
            
!
999px

Console