css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              

<form
  id="config-form" 
  class="" 
  action="" 
  method="" 
>





<!-- options wrapper -->
<div class="config-options">


<ul>


  <!-- Row 1 -->
  
  <!-- Gold -->
  <li class="opt-gold">
    <input 
      type="radio" 
      name="group-name"
      id="opt-01" 
      value="Gold" 
      checked="checked" 
    />
    <label
      for="opt-01" 
    >
      <div class="faux-checked"></div>
      <span>
        Gold
      </span> 
    </label>
  </li>

  <!-- Silver -->
  <li class="opt-silver">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-02" 
      value="Silver" 
    />
    <label
      for="opt-02" 
    >
      <div class="faux-checked"></div>
      <span>
        Silver
      </span>
    </label>
  </li>
  
  <!-- Graphite -->
  <li class="opt-graphite">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-03" 
      value="Graphite" 
    />
    <label
      for="opt-03" 
    >
      <div class="faux-checked"></div>
      <span>
        Graphite
      </span>
    </label>
  </li>
  
  <!-- Blue Steel -->
  <li class="opt-blue-steel">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-04" 
      value="Blue Steel" 
    />
    <label
      for="opt-04" 
    >
      <div class="faux-checked"></div>
      <span>
        Blue<br>
        Steel
      </span>
    </label>
  </li>
  
  <!-- Rose Gold -->
  <li class="opt-rose-gold">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-05" 
      value="Rose Gold" 
    />
    <label
      for="opt-05" 
    >
      <div class="faux-checked"></div>
      <span>
        Rose<br>
        Gold
      </span>
    </label>
  </li>



  <!-- Row 2 -->
  
  <!-- Crimson -->
  <li class="opt-crimson">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-06" 
      value="Crimson" 
    />
    <label
      for="opt-06" 
    >
      <div class="faux-checked"></div>
      <span>
        Crimson
      </span>
    </label>
  </li>
  
  <!-- Electric Blue -->
  <li class="opt-electric-blue">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-07" 
      value="Electric Blue"  
    />
    <label
      for="opt-07" 
    >
      <div class="faux-checked"></div>
      <span>
        Electric
        Blue
      </span>
    </label>
  </li>
  
  <!-- Mint Green -->
  <li class="opt-mint-green">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-08" 
      value="Mint Green" 
    />
    <label
      for="opt-08" 
    >
      <div class="faux-checked"></div>
      <span>
        Mint
        Green
      </span>
    </label>
  </li>
  
  <!-- Black -->
  <li class="opt-black">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-09" 
      value="Black" 
    />
    <label
      for="opt-09" 
    >
      <div class="faux-checked"></div>
      <span>
        Black
      </span>
    </label>
  </li>
  
  <!-- Rust -->
  <li class="opt-rust">
    <input 
      type="radio" 
      name="group-name" 
      id="opt-10" 
      value="Rust" 
    />
    <label
      for="opt-10" 
    >
      <div class="faux-checked"></div>
      <span>
        Rust
      </span>
    </label>
  </li>


</ul>


</div>


</form>


            
          
!
            
              

@import url('https://fonts.googleapis.com/css?family=Nunito');


/* Base Styles
-----------------------------*/
body {
  margin-top: 25vh;
  margin-bottom: 40px;
  font-family: 'Nunito', sans-serif;
}



/* Custom Radio Bttns Component
-----------------------------*/
.config-options {
	padding-bottom: 48px;
	margin-bottom: 48px;
}
.config-options ul,
.config-options ul li {
	list-style: none;
	margin: 0;
	padding: 0;

	font-size: 0px;
}
.config-options ul {
	max-width: 325px;
	margin: 14px auto 0 auto;
}
.config-options ul li,
.config-options ul li * {
  /* disable 'select' fucntionality for
  these elements - otherwise clunky on mobile */
  -webkit-touch-callout: none; 
  -webkit-user-select: none; 
  -khtml-user-select: none; 
  -moz-user-select: none; 
  -ms-user-select: none; 
  user-select: none; 
  
  /* remove the tap highlight color
  on mobile browsers, since the :active
  state have a style that provides the feedback*/
  -webkit-tap-highlight-color: transparent;
}
.config-options ul li {
	display: inline-block;
	vertical-align: top;

	margin-bottom: 12px;

	width: 65px;

	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.075em;
}
.config-options input {
	display: none;
	width: 0;
	height: 0;
}
.config-options label {
	display: inline-block;
	width: 100%;
  
  text-align: center;

	position: relative;
  
  cursor: pointer;
}
.config-options label:before {
  content: '';
	display: block;
	width: 44px;
	height: 44px;
	margin: 0 auto 8px auto;
	border-radius: 100%;
  
  /* inset shadow for lighting affect */
  -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.24);
  -moz-box-shadow: inset 0 0 3px rgba(0,0,0,0.24);
  box-shadow: inset 0 0 3px rgba(0,0,0,0.24);

	background: #e5e5e5;
}


/* Thumbnail Colors as BGs
-----------------------------*/

/* Gold */
.opt-gold label:before {
  background: linear-gradient(-180deg, #EDDECC 0%, #BE925D 100%);
}
/* Silver */
.opt-silver label:before {
  background: linear-gradient(-180deg, #F7F7F7 0%, #B7B2AD 100%);
}
/* Graphite */
.opt-graphite label:before {
  background: linear-gradient(-180deg, #807F7D 0%, #373634 100%);
}
/* Blue Steel */
.opt-blue-steel label:before {
  background: linear-gradient(-180deg, #3E668A 0%, #132538 100%);
}
/* Rose Gold */
.opt-rose-gold label:before {
  background: linear-gradient(-180deg, #E8B5A5 0%, #CC7E6C 100%);
}
/* Crimson */
.opt-crimson label:before {
  background: linear-gradient(-180deg, #BC3D3D 0%, #782222 100%);
}
/* Electric Blue */
.opt-electric-blue label:before {
  background: linear-gradient(-180deg, #AEEDF7 0%, #74B3C0 100%);
}
/* Mint Green */
.opt-mint-green label:before {
  background: linear-gradient(-180deg, #B0F9E5 0%, #7BC7AE 100%);
}
/* Black */
.opt-black label:before {
  background: linear-gradient(-180deg, #636363 0%, #090908 100%);
}
/* Rust */
.opt-rust label:before {
  background: linear-gradient(-180deg, #DB8963 0%, #A74E2C 100%);
}


.config-options label span {
	display: block;
}

/* faux check mark styles */
.config-options label .faux-checked {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 100%;

	overflow: visible;

	-webkit-transform: translateX(-50%) translateY(-50%) scale(1.0);
	-moz-transform: translateX(-50%) translateY(-50%) scale(1.0);
	-ms-transform: translateX(-50%) translateY(-50%) scale(1.0);
	-o-transform: translateX(-50%) translateY(-50%) scale(1.0);
	transform: translateX(-50%) translateY(-50%) scale(1.0);

	position: absolute;
	left: 50%;
	top: 22px;

	opacity: 0.0;

	background: transparent;
	background: url(#) no-repeat 0 0 transparent;
	background-size: 100% 100%;

	border-image-slice: 1;

	-webkit-transition: 
		width 0.2s ease-out 0.05s, 
		height 0.2s ease-out 0.05s, 
		opacity 0.2s ease-out 0.05s, 
		-webkit-transform 0.2s ease-out 0.05s;
	-moz-transition: 
		width 0.2s ease-out 0.05s, 
		height 0.2s ease-out 0.05s, 
		opacity 0.2s ease-out 0.05s, 
		-moz-transform 0.2s ease-out 0.05s;
	-ms-transition: 
		width 0.2s ease-out 0.05s, 
		height 0.2s ease-out 0.05s, 
		opacity 0.2s ease-out 0.05s, 
		-ms-transform 0.2s ease-out 0.05s;
	-o-transition: 
		width 0.2s ease-out 0.05s, 
		height 0.2s ease-out 0.05s, 
		opacity 0.2s ease-out 0.05s, 
		-o-transform 0.2s ease-out 0.05s;
    transition: 
    	width 0.2s ease-out 0.05s, 
    	height 0.2s ease-out 0.05s, 
    	opacity 0.2s ease-out 0.05s, 
    	transform 0.2s ease-out 0.05s;
}

.config-options label .faux-checked:before {
  
  /* content: url(option-checked.svg); */
  
  /* SVG file converted into a data URI */
  /* removes an external file call, and its still tiny */
  content: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIxLjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1Ni4xIDU2LjEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDU2LjEgNTYuMTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOnVybCgjU1ZHSURfMV8pO30KPC9zdHlsZT4KPGxpbmVhckdyYWRpZW50IGlkPSJTVkdJRF8xXyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIyOC4wNSIgeTE9IjUuMDAwMDAwZS0wMiIgeDI9IjI4LjA1IiB5Mj0iNTYuMDUiPgoJPHN0b3AgIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6I0ZGNjIyRCIvPgoJPHN0b3AgIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6IzhDMTg2NyIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNTYsMjhjMCwxNS41LTEyLjUsMjgtMjgsMjhzLTI4LTEyLjUtMjgtMjhzMTIuNS0yOCwyOC0yOFM1NiwxMi42LDU2LDI4eiBNMjgsMkMxMy43LDIsMiwxMy43LDIsMjgKCXMxMS42LDI2LDI2LDI2czI2LTExLjYsMjYtMjZTNDIuNCwyLDI4LDJ6Ii8+Cjwvc3ZnPgo=);

	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
}
.config-options label .faux-checked:after {
  
  /* content: url(option-checked-check.svg); */
  
  /* SVG file converted into a data URI */
  /* removes an external file call, and its still tiny */
  content: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIxLjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxOCAxOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTggMTg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDp1cmwoI092YWxfMV8pO30KCS5zdDF7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPGcgaWQ9IlN5bWJvbHMiPgoJCgkJPGxpbmVhckdyYWRpZW50IGlkPSJPdmFsXzFfIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9Ii0yNzguNzA3NCIgeTE9IjM4NC40MDY1IiB4Mj0iLTI3OS40MDA5IiB5Mj0iMzgzLjcwNzUiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMTggMCAwIC0xOCA1MDMyIDY5MjIpIj4KCQk8c3RvcCAgb2Zmc2V0PSIwIiBzdHlsZT0ic3RvcC1jb2xvcjojRjQ1QjMyIi8+CgkJPHN0b3AgIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6I0Q2NEI2NCIvPgoJPC9saW5lYXJHcmFkaWVudD4KCTxjaXJjbGUgaWQ9Ik92YWwiIGNsYXNzPSJzdDAiIGN4PSI5IiBjeT0iOSIgcj0iOSIvPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTEzLjYsNi41Yy0wLjQtMC40LTEtMC40LTEuNCwwbC00LjIsNC4yTDUuOCw4LjdjLTAuNC0wLjQtMS0wLjQtMS40LDBzLTAuNCwxLDAsMS40bDIuOCwyLjgKCQljMC40LDAuNCwxLDAuNCwxLjQsMGw0LjktNC45QzE0LDcuNiwxNCw2LjksMTMuNiw2LjV6Ii8+CjwvZz4KPC9zdmc+Cg==);

	display: block;
	width: 8px;
	height: 8px;

	-webkit-transform: translateX(-50%) translateY(-50%);
	-moz-transform: translateX(-50%) translateY(-50%);
	-ms-transform: translateX(-50%) translateY(-50%);
	-o-transform: translateX(-50%) translateY(-50%);
	transform: translateX(-50%) translateY(-50%);

	position: absolute;
	left: 7px;
	top: 7px;

	opacity: 0.0;

	-webkit-transition: 
		width 0.2s ease-out 0.15s, 
		height 0.2s ease-out 0.15s, 
		opacity 0.2s ease-out 0.15s;
	-moz-transition: 
		width 0.2s ease-out 0.15s, 
		height 0.2s ease-out 0.15s, 
		opacity 0.2s ease-out 0.15s;
	-ms-transition: 
		width 0.2s ease-out 0.15s, 
		height 0.2s ease-out 0.15s, 
		opacity 0.2s ease-out 0.15s;
	-o-transition: 
		width 0.2s ease-out 0.15s, 
		height 0.2s ease-out 0.15s, 
		opacity 0.2s ease-out 0.15s;
    transition: 
    	width 0.2s ease-out 0.15s, 
		height 0.2s ease-out 0.15s, 
		opacity 0.2s ease-out 0.15s;
}

.config-options label:active .faux-checked,
.config-options label:active ~ label .faux-checked {
	-webkit-transform: translateX(-50%) translateY(-50%) scale(1.45);
	-moz-transform: translateX(-50%) translateY(-50%) scale(1.45);
	-ms-transform: translateX(-50%) translateY(-50%) scale(1.45);
	-o-transform: translateX(-50%) translateY(-50%) scale(1.45);
	transform: translateX(-50%) translateY(-50%) scale(1.45);

	opacity: 1.0;
}
.config-options label:active .faux-checked:after,
.config-options label:active ~ label .faux-checked:after {
	width: 8px;
	height: 8px;
	opacity: 0.0;
}

.config-options input:checked ~ label .faux-checked {
	-webkit-transform: translateX(-50%) translateY(-50%) scale(1.2728);
	-moz-transform: translateX(-50%) translateY(-50%) scale(1.2728);
	-ms-transform: translateX(-50%) translateY(-50%) scale(1.2728);
	-o-transform: translateX(-50%) translateY(-50%) scale(1.2728);
	transform: translateX(-50%) translateY(-50%) scale(1.2728);

	opacity: 1.0;
}
.config-options input:checked ~ label .faux-checked:after {
	width: 14px;
	height: 14px;
	opacity: 1.0;
}
            
          
!
            
              

/* just need to add an event handler
so that mobile browsers respect the 
:active pseudo-class styles properly... 
Otherwise no JS needed for this demo,
and the radio bttns do work okay without */
document.addEventListener("touchstart", function() {},false);
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console