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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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.


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.


        Draggable overflow for long sentences without the space
        "Such is the nature of men, that howsoever they may acknowledge many others to be more witty, or more eloquent, or more learned; yet they will hardly believe there to be many so wise as themselves." - Thomas Hobbes



                @import "compass/css3";

$bg: thistle;
$text: #000;
$drag-bg: $bg;
$fade-start: rgba($bg,0.8);
$fade-end: $bg;
$fade-size: 2em;
$fade-border: 1px solid desaturate(darken($bg,20),50);

@import url(;
html {
	font-size: 10px;
body {
	background: $bg;
	margin: 0;
	font-family: Source Sans Pro, Open Sans, Helvetica, sans-serif;
	font-size: 1.6rem;
  color: $text;
* {
	box-sizing: border-box;

.content {
	margin: 0;
	padding: 5rem 2rem;

.draggable {
	max-width: 60rem;
	margin: 3rem auto;
	background-color: $drag-bg;
  position: relative;
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  &.big {
    font-size: 4rem;
  &.nodrag {
    cursor: default;
    user-select: none;
  .draggable-wrap {
    white-space: nowrap;
    position: relative;
    left: 0px;
  .draggable-inner {
    display: inline-block;
    padding: 1rem $fade-size;
  &:before, &:after {
    content: '';
  	display: block;
  	position: absolute;
    width: $fade-size;
    height: 100%;
    z-index: 10;
  &:before {
    @include background(linear-gradient(right, $fade-start, $fade-end));
    border-right: $fade-border;
  &:after {
    right: 0;
    top: 0;
    @include background(linear-gradient(left, $fade-start, $fade-end));
    border-left: $fade-border;
  &.left:before, &.right:after {
    display: none;


                $(document).ready(function() {

  $('.draggable').each(function() {
    var $this = $(this);
    $this.addClass('left right');
    if ($this.width() < $this.find('.draggable-inner').outerWidth()) {
    } else {

  $('.draggable').on('mousedown', '.draggable-wrap', function(e) {
    var $this = $(this);
    var x = e.pageX-parseInt($this.css('left'));
    $this.addClass('dragging').parents().on('mousemove', function(e) {
      var $drag = $('.dragging');
      var left = e.pageX-x;
      $drag.closest('.draggable').removeClass('left right');
      if (left > 0) {
        left = 0;
      if (left < -$drag.find('.draggable-inner').outerWidth()+$drag.width()) {
        left = -$drag.find('.draggable-inner').outerWidth()+$drag.width();
      $drag.css({left: left});
      $drag.on('mouseup', function() {
  $(document).on('mouseup', function() {