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

              
                <div class="container">
    <div class="header">
        <h1>Default Style:</h1>
    </div>
    <div class="row">
        <span class="pin">D</span>
        <span class="pin lg bottom">D</span>
        <span class="pin sm left">D</span>
        <span class="pin xs right">D</span>
        <span class="pin lg top">D</span>
    </div>
</div>

<div class="container">
    <div class="header">
        <h1>Style #1:</h1>
    </div>
    <div class="row">
        <span class="pin one">1</span>
        <span class="pin one lg bottom left">1</span>
        <span class="pin one sm bottom-right">1</span>
        <span class="pin one xs top-left">1</span>
        <span class="pin one lg top-right">1</span>
    </div>
</div>
<div class="container">
    <div class="header">
        <h1>Style #2:</h1>
    </div>
    <div class="row">
        <span class="pin two">2</span>
        <span class="pin two xs top-left">2</span>
        <span class="pin two lg top-right">2</span>
        <span class="pin two lg bottom-left">2</span>
        <span class="pin two sm bottom-right">2</span>
    </div>
</div>
              
            
!

CSS

              
                @import "compass/css3";

/* #VARIABLES
================================================== */
    @import url(https://fonts.googleapis.com/css?family=Roboto:600);

    $bg    :    rgba(224, 224, 224, 1.0)    !default;   // #e0e0e0
    $gray  :    rgba(97 , 97 , 97 , 1.0)    !default;   // #616161
    $orange:    rgba(255, 183, 77 , 1.0)    !default;   // #ffb74d
    $red   :    rgba(221, 25 , 29 , 1.0)    !default;   // #dd191d
    $teal  :    rgba(77 , 182, 172, 1.0)    !default;   // #4db6ac
    $white :    rgba(255, 255, 255, 1.0)    !default;   // #ffffff

    // Default Colors
    $pin-default-bg   :         $orange     !default;
    $pin-default-color:         $white      !default;

    // Style #1
    $pin-one-bg   :             $red        !default;
    $pin-one-color:             $white      !default;
    // Style #2
    $pin-two-bg   :             $teal       !default;
    $pin-two-color:             $white      !default;

    // Default Size
    $pin-default-scale:         45px        !default;
    $pin-default-size :         30px        !default;

    // Large Pins
    $pin-lg-scale:              90px        !default;
    $pin-lg-size :              60px        !default;
    // Small Pins
    $pin-sm-scale:              45px        !default;
    $pin-sm-size :              30px        !default;
    // Extra-Small Pins
    $pin-xs-scale:              30px        !default;
    $pin-xs-size :              15px        !default;

    // Pin Arrow Angles
    $pin-default-angle     :    0deg        !default;
    $pin-bottom-right-angle:    0deg        !default;
    $pin-bottom-angle      :    45deg       !default;
    $pin-bottom-left-angle :    90deg       !default;
    $pin-left-angle        :    135deg      !default;
    $pin-top-left-angle    :    180deg      !default;
    $pin-top-angle         :    225deg      !default;
    $pin-top-right-angle   :    270deg      !default;
    $pin-right-angle       :    315deg      !default;

/* #GLOBAL STYLES
================================================== */
    body {
        background-color: $bg;
        font-family: Roboto, sans-serif;
        font-weight: 600;
    }
    .container {
        display: block;
        margin: 0 auto;
        max-width: 50%;
        padding: 0 15px;
        width: 100%;
        &:before,
        &:after {
            content: " ";
            display: table;
        }
        &:after {
            clear: both;
        }
    }
    .header {
        display: block;
        margin-left: auto;
        margin-right: auto;
        //text-align: center;
        > h1 {
            background-color: rgba($red, 0.35);
            border-bottom: 4px solid rgba($red, 0.35);
            color: rgba($white, 0.75);
            display: inline-block;
            font-family: Roboto, sans-serif;
            font-size: 20px;
            font-weight: 600;
            letter-spacing: 0.03em;
            line-height: 1.65;
            margin: ($pin-default-size / 2) auto 0;
            padding: 4px 15px 0;
            text-transform: uppercase;
        }
    }
    .row {
        display: block;
        float: left;
        margin-left: -15px;
        margin-right: -15px;
        padding: 20px 0;
        > span {
            float: left;
            margin: 0 60px;
            &:first-child {
              margin-left: 120px;
            }
        }
    }

/* #MIXINS
================================================== */
    @mixin pin-variant($pin-bg, $pin-color) {
        color: $pin-color;
        float: left;
        font-family: Roboto, sans-serif;
        font-weight: 600;
        position: relative;
        text-align: center;
        z-index: 0;
        &:before {
            @include border-radius(50% 50% 0 50%);
            background-color: $pin-bg;
            bottom: 0;
            content: "";
            display: block;
            left: 0;
            position: absolute;
            right: 0;
            top: 0;
            z-index: -1;
        }
    }

    @mixin pin-size($pin-scale, $pin-size) {
        font-size: $pin-size;
        height: $pin-scale;
        line-height: $pin-scale;
        width: $pin-scale;
    }

    @mixin pin-angle($pin-angle) {
        &:before {
            @include transform(rotateZ($pin-angle));
        }
    }

/* #Base Styles
================================================== */
    .pin {
        @include pin-variant($pin-default-bg, $pin-default-color);
        @include pin-size($pin-default-scale, $pin-default-size);
        @include pin-angle($pin-default-angle);
        /* The Different Styles */
        &.one {
            &:before {
                background-color: $pin-one-bg;
            }
        }
        &.two {
            &:before {
                background-color: $pin-two-bg;
            }
        }

        /* Different Sizes */
        &.lg {
            @include pin-size($pin-lg-scale, $pin-lg-size);
        }
        &.sm {
            @include pin-size($pin-sm-scale, $pin-sm-size);
        }
        &.xs {
            @include pin-size($pin-xs-scale, $pin-xs-size);
        }
    }


/* #Rotating The Location Of The Arrow
================================================== */
    // Bottom
    .pin.bottom {
        @include pin-angle($pin-bottom-angle);
    }
    // Left
    .pin.left {
        @include pin-angle($pin-left-angle);
    }
    // Right
    .pin.right {
        @include pin-angle($pin-right-angle);
    }
    // Top
    .pin.top {
        @include pin-angle($pin-top-angle);
    }
    // Bottom-Left
    .pin.bottom-left {
        @include pin-angle($pin-bottom-left-angle);
    }
    // Bottom-Right
    .pin.bottom-right {
        @include pin-angle($pin-bottom-right-angle);
    }
    // Top-Left
    .pin.top-left {
        @include pin-angle($pin-top-left-angle);
    }
    // Top-Right
    .pin.top-right {
        @include pin-angle($pin-top-right-angle);
    }
              
            
!

JS

              
                
              
            
!
999px

Console