Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.


              <span class="npm">Node Packaged Modules</span>

NOTE! Firefox, IE9+ and Opera 12 only!

Also, not perfect: 2 "pixels" missing from P letter so there is still room for improvement here.

Chrome/Webkit lacks support for... uh, I guess ::first-letter styling.



              /* resets we need */
html,body { height: 100%; margin: 0; padding: 0; }

/* remove white space between inline-block elements */
body {
  background: #212121;
  font-size: 0;
  text-align: center;

/* restore font size in all root elements in body */
body > * {
  font-size: medium;

/* yay for vertical alignment tricks */
body:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;

.npm {
  border-bottom: 10px solid #CB3837;
  color: transparent;
  display: inline-block;
  font-size: 0.01px;
  height: 70px;
  line-height: 20px;
  margin: 0 90px 0 60px;
  position: relative;
  vertical-align: middle;
  white-space: nowrap;

.npm::first-letter {
  background: white;
  border: 10px solid #CB3837;
  margin: 0 -100px 0 -20px;
  padding: 0 0 50px 160px;

.npm::before {
  border-left: 10px solid #CB3837;
  border-right: 30px double #CB3837;
  content: '';
  margin: 0 -140px 0 -40px;
  padding: 0 0 40px 90px;
  position: relative;
  top: 10px;

.npm::after {
  background: #CB3837;
  background-clip: content-box;
  border-left: 10px solid #CB3837;
  border-right: 10px solid #CB3837;
  content: '';
  display: block;
  height: 30px;
  margin: -11px -20px 0 0;
  padding: 10px 10px 12px 20px;
  position: relative;
  width: 10px;


              // http://css-tricks.com/forums/discussion/24808/a-random-saturday-css-challenge

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................