Pen Settings

HTML

CSS

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

JavaScript

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <!-- vue and vue-flipper JS -->
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-flipper"></script>

<!-- vue-flipper CSS -->
<link rel="stylesheet" href="https://unpkg.com/vue-flipper/dist/vue-flipper.css" />

<div id="app">
  <flipper
    class="Card"
    width="270px"
    height="300px"
    :flipped="isFlipped"
    @click="isFlipped = !isFlipped"
  >
    <div class="Card__face" slot="front">
      <span class="Card__value Card__value--top">10</span>
      <span class="Card__center">♣</span>
      <span class="Card__value Card__value--bottom">10</span>
    </div>

    <figure class="Card__pattern" slot="back"></figure>
  </flipper>
</div>
            
          
!

CSS

            
              .Card
  &__face
  &__pattern
    width 100%
    height @width
    border-radius 20px
    box-shadow 0 3px 15px rgba(#000, .45)
    cursor pointer

  &__pattern
    background-image url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNjAiIGhlaWdodD0iMzAiPgo8ZGVmcz4KPHJlY3QgaWQ9InIiIHdpZHRoPSIzMCIgaGVpZ2h0PSIxNSIgZmlsbD0iI2JiMDg1ZiIgc3Ryb2tlLXdpZHRoPSIyLjUiIHN0cm9rZT0iIzdhMDU0ZCI+PC9yZWN0Pgo8ZyBpZD0icCI+Cjx1c2UgeGxpbms6aHJlZj0iI3IiPjwvdXNlPgo8dXNlIHk9IjE1IiB4bGluazpocmVmPSIjciI+PC91c2U+Cjx1c2UgeT0iMzAiIHhsaW5rOmhyZWY9IiNyIj48L3VzZT4KPHVzZSB5PSI0NSIgeGxpbms6aHJlZj0iI3IiPjwvdXNlPgo8L2c+CjwvZGVmcz4KPHVzZSB4bGluazpocmVmPSIjcCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtMjUpIHNrZXdZKDQwKSI+PC91c2U+Cjx1c2UgeGxpbms6aHJlZj0iI3AiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMwIDApIHNrZXdZKC00MCkiPjwvdXNlPgo8L3N2Zz4=')

  &__face
    position: relative

  &__value
    position absolute
    font-size 18pt

    &--top
      top: 10px
      left: @top

    &--bottom
      right: 10px
      bottom: @right

  &__center
    position absolute
    top 50%
    left 50%
    display block
    font-size 32pt
    transform translateX(-50%) translateY(-50%)

// =========================== //
// Centralize <body>'s content //
// =========================== //
html
body
  height 100%

body
  display flex
  align-items center
  justify-content center

            
          
!

JS

            
              Vue.component('Flipper', VueFlipper);

new Vue({
  el: '#app',
  data: {
    isFlipped: true
  }
});

            
          
!
999px

Console