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.


                a.tag.tag-default> [href='#!'] lorem ipsum
a.tag.tag-blue> [href='#!'] lorem ipsum
a.tag.tag-green> [href='#!'] lorem ipsum
a.tag.tag-red> [href='#!'] lorem ipsum
a.tag.tag-default> [href='#!'] 
  span Lorem ipsum dolor sit amet, consectetur adipisicing elit. Necessitatibus deserunt eligendi neque soluta, fuga nulla quam omnis nobis earum quasi, in voluptatem odit cum inventore dolorum! Necessitatibus labore obcaecati saepe!
  span lorem ipsum dalor gamut


                @import "compass/css3";

$font-size: 12px;
$tag-height: $font-size + 10;
$border-width: 1px;
$border-radius: 3px;
$page-bg: mediumspringgreen;
$hole-size: floor($font-size *.4);

.tag {
  $corner-cut: sqrt(2 * pow($border-radius, 2)) - $border-radius;
  $corner-length: sqrt((pow($tag-height + (2 * $corner-cut), 2)) / 2) - .1;
  display: inline-block;
  border: $border-width solid;
  border-radius: $border-radius;

  height: $tag-height;
  max-width: 100%;
  padding: 0.1em 0.5em 0.2em ($tag-height / 2 + $corner-cut);
  margin-bottom: .25em;
  margin-left: $tag-height / 2;
  box-sizing: border-box;
  position: relative;
  font-size: $font-size;
  white-space: nowrap;
  text-decoration: none;
  vertical-align: baseline;
  span {
    display: inline-block;
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;

  // corner
  &:before {
    content: '';
    display: inline-block;
    border-radius: $border-radius;
    border-bottom-left-radius: $border-radius + 1;
    border-color: inherit;
    border-left:   $border-width * 1.25 solid;
    border-bottom: $border-width * 1.2 solid;
    background-color: inherit;
    height: $corner-length;
    width:  $corner-length;
    box-sizing: border-box;
    position: absolute;
    top: -1 * $border-width - $corner-cut;
    left: floor($corner-cut);
    z-index: 2;
    @include transform-origin(left, top);
    @include transform(rotate(45deg));
  // hole
  &:after {
    content: '';
    display: block;
    background-color: $page-bg;
    border-radius: 100%;
    border: 1px solid;
    height: $hole-size;
    width: $hole-size;
    position: absolute;
    left: -1 * ($hole-size / 2) + 3;
    top: ($tag-height / 2) - ($hole-size / 2) - $border-width;
    z-index: 3;

@mixin tag-variant($background, $color, $border-color: darken($background, 15%)) {
  background-color: $background;
  color: $color;
  &, &:before, &:after { border-color: $border-color; }
  // link hover
  &[href], .hover {
    &:hover, &:focus {
      background-color: darken($background, 10%);
      &, &:before, &:after { border-color: darken($border-color, 10%); }
.tag-default {
  @include tag-variant(#EEE, #666);
.tag-blue {
  @include tag-variant(#ACF, #118);
.tag-green {
  @include tag-variant(#BEB, #161, #4B4);
.tag-red {
  @include tag-variant(#EBB, #611);

body { font-family: "Avenir Next", 'Open Sans', sans-serif; padding: 2em; background: $page-bg;}