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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

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.

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.

HTML

              
                .ticket
  .ticket-edge-top-left
  .ticket-edge-top-right
  .ticket-edge-bottom-left
  .ticket-edge-bottom-right
  .ticket-punches
  .ticket-punches-right
  .ticket-inner
    .ticket-headline
      C<svg class="logo" viewbox="0 0 120 120"><g><path class="inner-box" d="M97.147 48.319c-0.007-0.047-0.019-0.092-0.026-0.139c-0.016-0.09-0.032-0.18-0.056-0.268 c-0.014-0.053-0.033-0.104-0.05-0.154c-0.025-0.078-0.051-0.156-0.082-0.232c-0.021-0.053-0.047-0.105-0.071-0.156 c-0.033-0.072-0.068-0.143-0.108-0.211c-0.029-0.051-0.061-0.1-0.091-0.148c-0.043-0.066-0.087-0.131-0.135-0.193 c-0.035-0.047-0.072-0.094-0.109-0.139c-0.051-0.059-0.104-0.117-0.159-0.172c-0.042-0.043-0.083-0.086-0.127-0.125 c-0.059-0.053-0.119-0.104-0.181-0.152c-0.048-0.037-0.095-0.074-0.145-0.109c-0.019-0.012-0.035-0.027-0.053-0.039L61.817 23.5 c-1.072-0.715-2.468-0.715-3.54 0L24.34 46.081c-0.018 0.012-0.034 0.027-0.053 0.039c-0.05 0.035-0.097 0.072-0.144 0.1 c-0.062 0.049-0.123 0.1-0.181 0.152c-0.045 0.039-0.086 0.082-0.128 0.125c-0.056 0.055-0.108 0.113-0.158 0.2 c-0.038 0.045-0.075 0.092-0.11 0.139c-0.047 0.062-0.092 0.127-0.134 0.193c-0.032 0.049-0.062 0.098-0.092 0.1 c-0.039 0.068-0.074 0.139-0.108 0.211c-0.024 0.051-0.05 0.104-0.071 0.156c-0.031 0.076-0.057 0.154-0.082 0.2 c-0.017 0.051-0.035 0.102-0.05 0.154c-0.023 0.088-0.039 0.178-0.056 0.268c-0.008 0.047-0.02 0.092-0.025 0.1 c-0.019 0.137-0.029 0.275-0.029 0.416V71.36c0 0.1 0 0.3 0 0.418c0.006 0 0 0.1 0 0.1 c0.017 0.1 0 0.2 0.1 0.268c0.015 0.1 0 0.1 0.1 0.154c0.025 0.1 0.1 0.2 0.1 0.2 c0.021 0.1 0 0.1 0.1 0.154c0.034 0.1 0.1 0.1 0.1 0.213c0.029 0 0.1 0.1 0.1 0.1 c0.042 0.1 0.1 0.1 0.1 0.193c0.035 0 0.1 0.1 0.1 0.139c0.05 0.1 0.1 0.1 0.2 0.2 c0.042 0 0.1 0.1 0.1 0.125c0.058 0.1 0.1 0.1 0.2 0.152c0.047 0 0.1 0.1 0.1 0.1 c0.019 0 0 0 0.1 0.039L58.277 96.64c0.536 0.4 1.2 0.5 1.8 0.537c0.616 0 1.233-0.18 1.77-0.537 l33.938-22.625c0.018-0.012 0.034-0.027 0.053-0.039c0.05-0.035 0.097-0.072 0.145-0.109c0.062-0.049 0.122-0.1 0.181-0.152 c0.044-0.039 0.085-0.082 0.127-0.125c0.056-0.055 0.108-0.113 0.159-0.172c0.037-0.045 0.074-0.09 0.109-0.139 c0.048-0.062 0.092-0.127 0.135-0.193c0.03-0.049 0.062-0.098 0.091-0.146c0.04-0.07 0.075-0.141 0.108-0.213 c0.024-0.051 0.05-0.102 0.071-0.154c0.031-0.078 0.057-0.156 0.082-0.234c0.017-0.051 0.036-0.102 0.05-0.154 c0.023-0.088 0.04-0.178 0.056-0.268c0.008-0.045 0.02-0.092 0.026-0.137c0.018-0.139 0.028-0.277 0.028-0.418V48.735 C97.176 48.6 97.2 48.5 97.1 48.319z M63.238 32.073l25.001 16.666L77.072 56.21l-13.834-9.254V32.073z M56.856 32.1 v14.883L43.023 56.21l-11.168-7.471L56.856 32.073z M29.301 54.708l7.983 5.34l-7.983 5.34V54.708z M56.856 88.022L31.855 71.4 l11.168-7.469l13.833 9.252V88.022z M60.048 67.597l-11.286-7.549l11.286-7.549l11.285 7.549L60.048 67.597z M63.238 88.022V73.14 l13.834-9.252l11.167 7.469L63.238 88.022z M90.794 65.388l-7.982-5.34l7.982-5.34V65.388z"/></g></svg>DEPEN
      %span.pro PRO
    .ticket-star
      .fa.fa-star-o
    .ticket-admit
      %span.char A
      %span.char D
      %span.char M
      %span.char I
      %span.char T
      %span.char  
      %span.char O
      %span.char N
      %span.char E
    .ticket-numbers 5482144
    .ticket-numbers.second 5482144
              
            
!

CSS

              
                @import '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css';
@import 'https://fonts.googleapis.com/css?family=Oswald';
$ticket-height: 12.5rem;
$ticket-width: 30rem;
$black: #444;
$t: transparent;

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  background: #eee;
  color: $black;
}


.ticket {
  background: #fff;
  -webkit-box-shadow: inset 0 0 0 .25rem $black;
  left: calc(50% - #{$ticket-width / 2});
  height: $ticket-height;
  overflow: hidden;
  position: absolute;
  top: calc(50% - #{$ticket-height / 2});
  width: $ticket-width;
}

.ticket-inner {
  box-shadow: 0 0 0 .5rem $black;
  border-radius: .5rem;
  height: $ticket-height - 4rem;
  margin: 2rem 2.5rem;
  position: relative;
  width: $ticket-width - 5rem;
}

.ticket-headline {
  font-size: 2rem;
  font-weight: bold;
  padding: 1rem;
  padding-bottom: 0;
  text-align: center;
  svg {
    display: inline-block;
    height: 2rem;
    stroke: $black;
    transform: translateY(.25rem);
    width: 2rem;
  }
  .pro {
    background: linear-gradient(135deg, darken(#e5e696, 10%) 0%, darken(#d1d360, 20%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.ticket-star {
  background: linear-gradient(to right, $t 25%, black 50%, $t 75%);
  background-position: 0 50%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  height: 1rem;
  width: 100%;
  text-align: center;
  .fa-star-o {
    background: white;
    padding: 0 .25rem;
  }
}
.ticket-admit {
  font-family: 'Oswald';
  font-size: 2rem;
  text-align: center;
  .char {
    @for $i from 1 through 9 {
      &:nth-of-type(#{$i}) {
        text-shadow: #{(-$i / 2) + 2 + px} 2px 0 #ccc;
      }
    }
  }
}
.ticket-numbers {
  $height: 5rem;
  $width: 9rem;
  border-top: .25rem solid $black;
  color: lighten($black, 10%);
  font-size: 1.25rem;
  font-weight: bold;
  left: 0;
  letter-spacing: .25rem;
  height: $height;
  padding: 1.25rem;
  position: absolute;
  text-align: center;
  top: 2.5rem;
  transform: rotate(90deg) translate(-.75rem, 3rem);
  width: $width;
  &.second {
    transform: rotate(-90deg) translate(.75rem, 19rem);
  }
}

[class*="ticket-edge"] {
  background: #eee;
  border: .25rem solid $black;
  border-radius: 50%;
  height: 3rem;
  position: absolute;
  width: 3rem;
}
[class*="top"] {
  top: -1rem;
}
[class*="bottom"] {
  top: calc(#{$ticket-height - 1rem});
}
[class*=left] {
  left: -1rem;
}
[class*=right] {
  right: -1rem;
}
.ticket-punches,
.ticket-punches-right {
  background: #eee;
  border: .25rem solid $black;
  border-radius: 50%;
  height: 2rem;
  left: -1rem;
  position: absolute;
  top: 6rem;
  width: 2rem;
  &::before,
  &::after {
    @extend .ticket-punches;
    content: '';
    display: block;
    left: -.25rem;
    top: 0;
  }
  &::before {
    top: -2.25rem;
  }
  &::after {
    top: 1.75rem;
  }
}
.ticket-punches-right {
  left: 29rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console