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


                <div class="voucher-container">
  <div class="flipper">
    <div class="front">
      <img src="" />
        <h3>Coaching Voucher</h3>
        <p>John Smith</p>
    <div class="back">
      <p>Why not buy a JC Squash coaching voucher for a friend or family member?</p>
      <p><a href="">Email JC</a> for individual lesson prices and include the recipients location and desired venue.</p>


                @mixin backface-visibility($backface-visibility) {
 -webkit-backface-visibility: $backface-visibility;
  -moz-backface-visibility: $backface-visibility;
  backface-visibility: $backface-visibility;

@mixin transform($transform) {
  -webkit-transform: $transform;
  -moz-transform: $transform;
  -ms-transform: $transform;
  -o-transform: $transform;
  transform: $transform;  

@mixin border-radius($border-radius) {
  -webkit-border-radius: $border-radius;
  -moz-border-radius: $border-radius;
  -ms-border-radius: $border-radius;
  -o-border-radius: $border-radius;
  border-radius: $border-radius;  

@mixin transition($transition) {
  -webkit-transition: $transition;
  -moz-transition: $transition;
  -ms-transition: $transition;
  -o-transition: $transition;
  transition: $transition;  

@mixin transform-style($transform-style) {
  -webkit-transform-style: $transform-style;
  -moz-transform-style: $transform-style;
  transform-style: $transform-style;  

@mixin perspective($perspective) {
 -webkit-perspective: $perspective;
  -moz-perspective: $perspective;
  perspective: $perspective;

@mixin box-shadow($box-shadow) {
 -webkit-box-shadow: $box-shadow; 
 -moz-box-shadow: $box-shadow; 
 -o-box-shadow: $box-shadow; 
 box-shadow: $box-shadow;   

@mixin user-select($user-select) {
  -webkit-user-select: $user-select;
  -moz-user-select: $user-select;
  user-select: $user-select;  

.voucher-container {
  @include user-select(none);
  color: #fff;
  font-family: 'League Gothic';
  font-weight: 400;
  font-size: 14px;

.voucher-container {
  display: inline-block;
  @include transform-style(preserve-3d);
  @include perspective(600px);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  .front {
    background-size: 60%;
    letter-spacing: 1px;
    & > div {
      margin-top: 10px;
      float: right;
      width: 70%;
    img {
      margin-top: 2px;
      float: left;
      width: 65px;
      margin-left: 5px;
    h3 {
      line-height: 1.2;
      margin: 0;
      font-weight: 400;
      font-size: 32px;
      text-transform: uppercase;
    p {
      font-size: 24px;
      position: absolute;
      bottom: 0;
      right: 20px;
  .back {
    font-family: Arial;
    @include transform(rotateY(180deg));
    p {
      font-size: 14px;
      line-height: 1.5;
      margin: 0 0 14px;
    p:last-child {
      color: #A8A8A8; 
      font-size: 14px;
    a {
      color: #ccc;
      @include transition(.2s ease-in-out);
      &:hover {
        color: #fff; 

  .flipper, .front, .back {
    @include perspective(600px);
    padding: 10px 15px;
    height: 120px;
    width: 270px;
  .front, .back {
    background: #070002 url( no-repeat 105% 10px;
    background-size: 60%;
    background-color: #070002;
    cursor: pointer;
    position: absolute;
    @include box-shadow(0 2px 10px rgba(0,0,0,0.3));
    @include border-radius(7px);
    @include transition(all 1s);
    @include backface-visibility(hidden);
  &.flipped .back {
    @include transform(rotateY(0deg));
  &.flipped .front {
    @include transform(rotateY(-180deg));


                $container = document.querySelector('.voucher-container')
$container.addEventListener 'click', (e) ->
  unless == 'A'