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='wrap'>
	<input id='r' type='range'/>
              $bg: #3d3d4a;
$k: .1;
$track-w: 25em;
$track-h: .02*$track-w;
$thumb-d: $k*$track-w;

@mixin track() {
	border: none;
	width: $track-w; height: $track-h;
	border-radius: .5*$track-h;
	background: #343440

@mixin thumb() {
	border: none;
	width: $thumb-d; height: $thumb-d;
	border-radius: 50%;
	background: #e6323e

* { margin: 0 }

body { background: $bg }

.wrap {
	margin: 2em auto;
	width: $track-w;
	font: 2vmin trebuchet ms, arial, sans-serif;
	@media (max-width: 500px), 
				 (max-height: 500px) { font-size: 10px }
  @media (min-width: 1600px), 
				 (min-height: 1600px) { font-size: 32px }
	&:not(.full) {
		position: relative;
		output {
			position: absolute;
			top: 0;
			outline: solid 2px gold;
			width: $thumb-d; height: $thumb-d

[type='range'] {
	&, &::-webkit-slider-thumb { -webkit-appearance: none }

	display: block;
	padding: 0;
	width: $track-w; height: $thumb-d;
	background: transparent;
	font: inherit;

	&::-webkit-slider-runnable-track { @include track }
	&::-moz-range-track { @include track }
	&::-ms-track { @include track }

	&::-webkit-slider-thumb {
		margin-top: .5*($track-h - $thumb-d);
		@include thumb
	&::-moz-range-thumb { @include thumb }
	&::-ms-thumb {
		margin-top: 0;
		@include thumb
	&::-ms-tooltip { display: none }
	+ output {
		display: flex;
		align-items: center;
		justify-content: center;
		background: conic-gradient(#e64c65 calc(var(--val)*1%), #41a8ab 0%);
		color: #fff;
		&:after { content: '%' }
              const _R = document.getElementById('r'), 
			_W = _R.parentNode, 
			_O = document.createElement('output');

let val = null;

function update() {
	let newval = +_R.value;

	if(val !== newval)
		_W.style.setProperty('--val', _O.value = val = newval)


_O.setAttribute('for', _R.id);

if(getComputedStyle(_O).backgroundImage !== 'none')

addEventListener('input', update, false);
addEventListener('change', update, false);
Loading ..................