cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div class="video__video-actions">
    <ul class="video-actions__list">
        <li class="video-action--share" title="Share Video">
            <button class="button-imperfect">
                <div class="button-shape">
                    <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" class="button-imperfect-svg" viewBox="0 0 192 40" preserveAspectRatio="none">
                        <polygon vector-effect="non-scaling-stroke" points="0.255,0.35 28.736,0 65.846,0.35 92.601,0 124.533,0.35 161.047,0.7 191.85,0.35 191.391,15.139 192,29.97 191.85,39.898 165.251,39.898 129.645,39.784 96.172,39.784 52.338,40 14.239,39.808 0.255,39.898 0.5,27.147 0,11.91" />
                    </svg>
                </div>
                <span class="button-icon"></span><span class="button-text">Share</span>
            </button>
        </li>

        <li class="video-action--download" title="Download Video">
            <button class="button-imperfect" id="download-button">
                <div class="button-shape">
                    <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" class="button-imperfect-svg" viewBox="0 0 192 40" preserveAspectRatio="none">
                        <polygon vector-effect="non-scaling-stroke" points="0.255,0.35 28.736,0 65.846,0.35 92.601,0 124.533,0.35 161.047,0.7 191.85,0.35 191.391,15.139 192,29.97 191.85,39.898 165.251,39.898 129.645,39.784 96.172,39.784 52.338,40 14.239,39.808 0.255,39.898 0.5,27.147 0,11.91" />
                    </svg>
                </div>
                <span class="button-icon"></span><span class="button-text">Download</span>
            </button>
        </li>

        <li class="video-action--player-clips" title="Player Clips">
            <button class="button-imperfect">
                <div class="button-shape">
                    <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" class="button-imperfect-svg" viewBox="0 0 192 40" preserveAspectRatio="none">
                        <polygon vector-effect="non-scaling-stroke" points="0.255,0.35 28.736,0 65.846,0.35 92.601,0 124.533,0.35 161.047,0.7 191.85,0.35 191.391,15.139 192,29.97 191.85,39.898 165.251,39.898 129.645,39.784 96.172,39.784 52.338,40 14.239,39.808 0.255,39.898 0.5,27.147 0,11.91" />
                    </svg>
                </div>
                <span class="button-icon"></span><span class="button-text">Player Clips</span>
            </button>
        </li>

        <li class="video-action--video-only" title="Video Only Mode">
            <button class="button-imperfect">
                <div class="button-shape">
                    <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" class="button-imperfect-svg" viewBox="0 0 192 40" preserveAspectRatio="none">
                        <polygon vector-effect="non-scaling-stroke" points="0.255,0.35 28.736,0 65.846,0.35 92.601,0 124.533,0.35 161.047,0.7 191.85,0.35 191.391,15.139 192,29.97 191.85,39.898 165.251,39.898 129.645,39.784 96.172,39.784 52.338,40 14.239,39.808 0.255,39.898 0.5,27.147 0,11.91" fill="url(#video-only-button-gradient)" />
                        <defs>
                            <linearGradient id="video-only-button-gradient" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="100%" y2="0%" gradientTransform="rotate(75)">
                                <stop offset="0%" stop-color="#555555" />
                                <stop offset="100%" stop-color="#3C3C3C" />
                            </linearGradient>
                        </defs>
                    </svg>
                </div>
                <span class="button-icon"></span><span class="button-text">Video Only</span>
            </button>
        </li>
        <li class="video-action--report" title="Report">
            <button class="button-imperfect">
                <div class="button-shape">
                    <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" class="button-imperfect-svg" viewBox="0 0 40 40">
                        <polygon vector-effect="non-scaling-stroke" points="0.053,0.35 5.987,0 13.718,0.35 19.292,0 25.944,0.35 33.551,0.7 40,0.35 39.873,15.139 40,29.97 39.969,39.898 34.427,39.898 27.009,39.784 20.036,39.784 10.904,40 2.966,39.808 0.053,39.898 0.104,27.147 0,11.91" />
                    </svg>
                </div>
                <span class="button-icon"></span>
            </button>
        </li>
    </ul>

    <div class="video__report-options">
        <ul class="report-options__select">
            <li class="select__inappropriate">
                <a id="flag-inappropriate">Flag as Inappropriate</a>
            </li>
            <li class="select__spam">
                <a id="flag-spam">Report Spam</a>
            </li>
        </ul>
    </div>
</div>

<div class="refresh-button-container">
<button class="refresh-button button-imperfect">
    <div class="button-shape">
        <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" class="button-imperfect-svg" viewBox="0 0 192 40" preserveAspectRatio="none">
            <polygon vector-effect="non-scaling-stroke" points="0.255,0.35 28.736,0 65.846,0.35 92.601,0 124.533,0.35 161.047,0.7 191.85,0.35 191.391,15.139 192,29.97 191.85,39.898 165.251,39.898 129.645,39.784 96.172,39.784 52.338,40 14.239,39.808 0.255,39.898 0.5,27.147 0,11.91" />
        </svg>
    </div>
    <span class="button-icon"></span><span class="button-text">Refresh to change the edges</span>
</button>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i|Oswald:300,400,700|Open+Sans+Condensed:300,300i,700');

body, html {
    font-family: 'Open Sans', sans-serif;
    background: #e6e6e6;
    font-size: 62.5%;
}

.button-imperfect {
    position: relative;
    display: block;
    appearance: none;
    background: transparent;
    color: #FFF;
    border: 0;
    width: 100%;
    height: 40px;
    @include font-size(1.6);
    font-weight: bold;
    padding: 0;
    margin: 0 0 20px 0;
    cursor: pointer;

    .button-shape {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;

        .button-imperfect-svg {
            fill: #1e1e1e;
            width: 100%;
            height: 40px;
            overflow: visible;
            transition: fill 250ms ease-in-out;
        }
    }

    .button-text {
        position: relative;
        z-index: 2;
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0 12px;
    }
}

.video__video-actions {
    position: relative;
    box-sizing: border-box;
    padding: 12px;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;

    .video-actions__list {
        list-style: none;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-content: center;
        align-items: flex-start;

        li {
            flex: 1;
            max-width: 200px;
            height: 40px;
            margin-right: 6px;
            font-family: 'Open Sans Condensed', sans-serif;
            font-weight: 700;

            button, button:focus {
                outline: none;
            }

            .button-icon {
                position: relative;
                z-index: 2;
                display: inline-block;
                vertical-align: middle;
                width: 36px;
                height: 38px;
                background: url('http://www.seanmaisch.com/images/clients/BallerTV/video-actions-ss.png') no-repeat center center;
                background-size: 36px 358px;

                @include size(retina) {
                    background-image: url('http://www.seanmaisch.com/images/clients/BallerTV/video-actions-ss@2x.png');
                }
            }

            .button-text {
                display: inline-block;
                width: auto;
                padding: 0;
                vertical-align: middle;
                text-align: center;
                font-family: 'Open Sans Condensed', sans-serif;
                font-weight: 700;
                @include font-size(0);

                @include size(smedium) {
                    @include font-size-same-line-height(1.6);
                }

                @include size(desktop) {
                    @include font-size-same-line-height(1.8);
                }
            }

            &:last-of-type {
                margin-right: 0;
            }

            &.video-action--share {
                .button-imperfect-svg {
                    fill: $share-color;
                }

                .button-icon {
                    background-position: 0 0;
                }
            }

            &.video-action--download {
                .button-imperfect-svg {
                    fill: $download-color;
                }

                .button-icon {
                    background-position: 0 -46px;
                }
            }

            &.video-action--player-clips {
                .button-imperfect-svg {
                    fill: $player-clips-color;
                }

                .button-icon {
                    background-position: 0 -92px;
                }
            }

            &.video-action--video-only {

                .button-icon {
                    background-position: 0 -138px;
                }
            }

            &.video-action--report {
                flex: 0 0 auto;
                margin-left: auto;
                width: 40px;

                .button-imperfect-svg {
                    fill: transparent;
                    stroke: $report-color;
                    stroke-width: 2px;
                }

                .button-icon {
                    background-position: 0 -184px;
                }

                &.active {
                    .button-imperfect-svg {
                        fill: $report-color;
                    }

                    .button-icon {
                        background-position: 0 -230px;
                    }
                }
            }

            &.video-action--premium {
                .button-imperfect-svg {
                    fill: $baller-orange;
                }

                .button-icon {
                    background-position: 0 -276px;
                }
            }
        }
    }

    .video__report-options {
        display: none;
        position: absolute;
        bottom: -76px;
        right: 11px;
        z-index: 3;

        .report-options__select {
            list-style: none;

            li {
                display: block;
                text-align: center;
                margin-top: 2px;

                a {
                    display: block;
                    cursor: pointer;
                    width: 198px;
                    box-sizing: border-box;
                    padding: 11px 24px;
                    @include font-size-same-line-height(1.8);
                    font-family: 'Open Sans Condensed', sans-serif;
                    font-weight: 700;
                    background: $report-color;
                    color: #FFF;
                }
            }
        }
    }
}

.refresh-button-container {
    position: relative;
    box-sizing: border-box;
    padding: 12px;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.refresh-button {
    width: 100%;
    height: 40px;
  
    .button-icon {
        position: relative;
        z-index: 2;
        display: inline-block;
        vertical-align: middle;
        width: 36px;
        height: 38px;
        background: url('http://www.seanmaisch.com/images/clients/BallerTV/video-actions-ss.png') no-repeat;
        background-size: 36px 358px;
        background-position: 0 -322px;

        @include size(retina) {
            background-image: url('http://www.seanmaisch.com/images/clients/BallerTV/video-actions-ss@2x.png');
        }
    }

    .button-text {
        display: inline;
        width: auto;
        padding: 0;
        vertical-align: middle;
        text-align: center;
        font-family: 'Open Sans Condensed', sans-serif;
        font-weight: 700;
        @include font-size-same-line-height(1.6);

        @include size(desktop) {
            @include font-size-same-line-height(1.8);
        }
    }
}
            
          
!
            
              // Devising a random number, not rounding to a whole digit
function randomNumberValue(min, max) {
    return Math.random() * (max - min + 1) + min;
}

// Targetting each SVG via class
for (var buttons = document.getElementsByClassName('button-imperfect-svg'), s = 0; s < buttons.length; s++) {
    
    // Defining polygon via the first child of the SVG
    var polygon = buttons.item(s).children[0],
        points = polygon.getAttribute('points'),
        pointsArray;

    // Creating an array of the points in JS, splitting the array items via spaces (SVG syntax)
    pointsArray = null !== points ? points.split(' ') : [];

    var changeArray = [];

    pointsArray.forEach(function(pointGroup) {
        var newArray = pointGroup.split(',');
        newArray.forEach(function(num, i) {
            newArray[i] = randomNumberValue(-0, 0) + Number(num)
        }), changeArray.push(newArray)
    }), changeArray.forEach(function(point, i) {
        changeArray[i] = point.join()
    });

    var newString = changeArray.join(' ');

    polygon.setAttribute('points', newString)
}

$(document).on('click', function(event) {
    if (!$(event.target).closest('.video-action--report').length) {
        $('.video-action--report').removeClass('active');
        $('.video__report-options').fadeOut(250);
    }
});

$('.video-action--report button').click( function() {
    $('.video-action--report').toggleClass('active');
    $('.video__report-options').fadeToggle(250);
});

$('.refresh-button').click( function() {
    location.reload(true)
});
            
          
!
999px
Loading ..................

Console