Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <h1 class="title">
  Topcoat Range Input
</h1>

<section>
  <h2> Reset</h2>
  <input type='range' class='range-input'>
</section>
  
<section>
  <h2>Topcoat Range Input</h2>
  <input type='range' class='topcoat-range-input'>  
</section>
  
<section>
  <h2>Topcoat Vertical Range Input</h2>
  <br>
  <br>
  <br>
  <input type='range' class='topcoat-range-input--vertical'>  
  <br>
  <br>
  <br>
</section>  
      <p>
    <h4>Current status: </h4>
        <ul>

    <li>vertical slider can be achieved with appearance: vertical-slider on Chrome. On Firefox this has not been implemented because a decision about how to do it properly has not been reached https://jwatt.org/blog/2013/03/20/input-type-range-coming-to-mozilla .</li>
    <li>this vertical slider has been implemented using a 90deg transformation. Tested to work on iPad w/ ios7, Chrome on Nexus 4, Firefox and Chrome latest.</li>
        </ul>
    </p>
              
            
!

CSS

              
                body {
  padding: 0 50px;
  background-color: #f4f4f4;
  font-family: source-sans-pro, sans-serif;
  font-size:16px;
}

.title {
  letter-spacing: -.065em;
}

/* Desperate to remove focus outline in firefox */
::-moz-focus-inner {
  outline:0;
}

:focus {
  outline:0;
}

.range-input,
.topcoat-range-input,
.topcoat-range-input--vertical {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-sizing: border-box;
  background-clip: padding-box;
  vertical-align: top;
  outline: none;
  -webkit-appearance: none;
}


/* 
  Declarations get duplicated because an invalid selector
  invalidates the entire declaration block
*/

.range-input::-webkit-slider-thumb,
.topcoat-range-input::-webkit-slider-thumb,
.topcoat-range-input--vertical::-webkit-slider-thumb {
  cursor: pointer;
  -webkit-appearance: none;
}

.range-input::-moz-range-thumb,
.topcoat-range-input::-moz-range-thumb,
.topcoat-range-input--vertical::-moz-range-thumb {
  cursor: pointer;
}

.topcoat-range-input,
.topcoat-range-input--vertical {
  border-radius: 6px;
  border: 1px solid #a5a8a8;
  background: #d3d7d7;
  height: 1rem;
  border-radius: 30px;
}

.topcoat-range-input::-moz-range-track,
.topcoat-range-input--vertical::-moz-range-track {
  border-radius: 6px;
  border: 1px solid #a5a8a8;
  background: #d3d7d7;
  height: 1rem;
  border-radius: 30px;
}

/* 
  Declarations get duplicated because an invalid selector
  invalidates the entire declaration block
*/

.topcoat-range-input::-webkit-slider-thumb,
.topcoat-range-input--vertical::-webkit-slider-thumb {
  height: 3rem;
  width: 2rem;
  border: 1px solid rgba(0,0,0,0.36);
  border-radius: 6px;
  /* Is base64 the way to go ? */
  /* I don't imagine simulating vertical stripes w/ gradients */ background:url("http://db.tt/q5LHtPKx") center center no-repeat #e5e9e8;
  background-size: 7px 18px;
  box-shadow: inset 0 1px white;
}

.topcoat-range-input::-moz-range-thumb,
.topcoat-range-input--vertical::-moz-range-thumb {
  height: 3rem;
  width: 2rem;
  border: 1px solid rgba(0,0,0,0.36);
  border-radius: 6px; background:url("http://db.tt/q5LHtPKx") center center no-repeat #e5e9e8;
  background-size: 7px 18px;
  box-shadow: inset 0 1px white;
}

.topcoat-range-input--vertical {
  -webkit-transform:rotate(90deg);
  -moz-transform:rotate(90deg);
  -ms-transform:rotate(90deg);  
  transform:rotate(90deg);  
}

/*
  Active state
*/

.topcoat-range-input:active::-webkit-slider-thumb,
.topcoat-range-input--vertical:active::-webkit-slider-thumb {
  border: 1px solid #0940fd;
  box-shadow: 0 0 0 2px #6fb5f1;
}

input[type=range]:active::-moz-range-thumb {
  border: 1px solid #0940fd;
  box-shadow: 0 0 0 2px #6fb5f1;
}

              
            
!

JS

              
                /*
  Adobe Web Platform Pens Copyright (c) Adobe Systems, Inc.
  Provided under the MIT License
*/
              
            
!
999px

Console