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


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


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.


                <h1>2016 Potential Presidential Candidates</h1>
<section class="candidates-container">
  <ul class="Republican Party">
    <li data-candidate="Chris Christie"></li>
    <li data-candidate="Marco Rubio"></li>
    <li data-candidate="Paul Ryan"></li>
    <li data-candidate="Rand Paul"></li>
  <ul class="Democratic Party">
    <li data-candidate="Hillary Clinton"></li>
    <li data-candidate="Joe Biden"></li>
    <li data-candidate="Deval Patrick"></li>
    <li data-candidate="Martin O'Malley"></li>


                * { margin: 0; padding: 0; box-sizing: border-box; vertical-align: middle; }

html, body { height: 100%; }
body {
  font: 100%/1.4 "Oranienbaum";
  text-align: center;
  background: whitesmoke;
  padding: 1.5rem;

h1 {
  display: inline-block;
  font-weight: normal;
  border-bottom: thin solid black; }

.candidates-container {
  display: flex;
  min-height: 10rem;

.Party {
  flex: 1;
  padding: .875rem;
  &:before {
    display: block;
    font-size: 1.2rem;
    margin-bottom: .5rem;
    content: attr(class);  

.Republican {
  text-align: right;
  border-right: thin solid lightgray;

  [data-candidate] {
    background-color: lighten(red, 20%);
    float: right;

.Democratic {
  text-align: left;  

  [data-candidate] {
    background-color: lighten(blue, 25%);
    float: left;

$size: 7rem;
[data-candidate] {
  border-radius: .25s;
  cursor: pointer;
  position: relative;
  width: $size;
  height: $size;
  margin: .125rem;
  list-style: none;
  background-size: cover;
  background-position-x: center;
  background-blend-mode: multiply;
  transition: background-color .5s;
  &:hover {
    background-color: white;
    transition: background-color .25s;

[data-candidate="Chris Christie"] { background-image: url(; }

[data-candidate="Paul Ryan"] { background-image: url(; }

[data-candidate="Marco Rubio"] { background-image: url(; }

[data-candidate="Paul Ryan"] { background-image: url(; background-position-y: -.5rem; }

[data-candidate="Rand Paul"] { background-image: url(; }

[data-candidate="Ted Cruz"] { background-image: url(; }

[data-candidate="Hillary Clinton"] { background-image: url(; }

[data-candidate="Joe Biden"] { background-image: url(; }

[data-candidate="Andrew Cuomo"] { background-image: url(; }

[data-candidate="Martin O'Malley"] { background-image: url(; background-size: 80%; }

[data-candidate="Deval Patrick"] { background-image: url(; background-position-y: -.5rem; }

@font-face {
  font-family: 'Oranienbaum';
  font-style: normal;
  font-weight: 400;
  src: local('Oranienbaum'), local('Oranienbaum-Regular'), url( format('woff');

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans'), local('OpenSans'), url( format('woff');