Pen Settings



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


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


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.


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.


                <h2 class="subtitle" >Pure CSS</h2>
<h1 class="title" >3-Position Switches</h1>
<form id="challenge1" class="survey" >
	<!-- 	<input type="radio" id="subchallenge1" name="subchallenge1" class="subchallenge" > -->

	<article id="midnight-series" class="series series1">
	<h2 class="subquestion-title">Midnight Series<h2>
		<article id="switch1" class="switch-toggle three-way">

			<input id="s1-op_one" name="subchallenge1" type="radio" class="op_one subchallenge" checked="">
			<label for="s1-op_one" onclick="">Option 1</label>

			<input id="s1-op_two" name="subchallenge1" type="radio" class="op_two subchallenge" checked="checked">
			<label for="s1-op_two" onclick="">Option 2</label>

			<input id="s1-op_three" name="subchallenge1" type="radio" class="op_three subchallenge">
			<label for="s1-op_three" onclick="">Option 3</label>
			<div class="slider"></div>

		<article id="switch2" class="switch-toggle three-way">	

			<input id="s2-op_one" name="subchallenge2" type="radio" class="op_one subchallenge" checked="">
			<label for="s2-op_one" onclick="">Option 1</label>

			<input id="s2-op_two" name="subchallenge2" type="radio" class="op_two subchallenge" checked="checked">
			<label for="s2-op_two" onclick="">Option 2</label>

			<input id="s2-op_three" name="subchallenge2" type="radio" class="op_three subchallenge">
			<label for="s2-op_three" onclick="">Option 3</label>
			<div class="slider"></div>

				<article id="switch3" class="switch-toggle three-way">	

			<input id="s3-op_one" name="subchallenge3" type="radio" class="op_one subchallenge" checked="">
			<label for="s3-op_one" onclick="">Option 1</label>

			<input id="s3-op_two" name="subchallenge3" type="radio" class="op_two subchallenge" checked="checked">
			<label for="s3-op_two" onclick="">Option 2</label>

			<input id="s3-op_three" name="subchallenge3" type="radio" class="op_three subchallenge">
			<label for="s3-op_three" onclick="">Option 3</label>
			<div class="slider"></div>
					<article id="switch4" class="switch-toggle three-way">	

			<input id="s4-op_one" name="subchallenge4" type="radio" class="op_one subchallenge" checked="">
			<label for="s4-op_one" onclick="">Option 1</label>

			<input id="s4-op_two" name="subchallenge4" type="radio" class="op_two subchallenge" checked="checked">
			<label for="s4-op_two" onclick="">Option 2</label>

			<input id="s4-op_three" name="subchallenge4" type="radio" class="op_three subchallenge">
			<label for="s4-op_three" onclick="">Option 3</label>
			<div class="slider"></div>
</article>	 <!-- END #midnight-series -->	
			<article id="frost-series" class="series series2">
	<h2 class="subquestion-title">Frost Series<h2>
		<article id="switch1" class="switch-toggle three-way">

			<input id="series2-s1-op_one" name="series2-subchallenge1" type="radio" class="op_one subchallenge" checked="">
			<label for="series2-s1-op_one" onclick="">Option 1</label>

			<input id="series2-s1-op_two" name="series2-subchallenge1" type="radio" class="op_two subchallenge" checked="checked">
			<label for="series2-s1-op_two" onclick="">Option 2</label>

			<input id="series2-s1-op_three" name="series2-subchallenge1" type="radio" class="op_three subchallenge">
			<label for="series2-s1-op_three" onclick="">Option 3</label>
			<div class="slider"></div>

		<article id="series2-switch2" class="switch-toggle three-way">	

			<input id="series2-s2-op_one" name="series2-subchallenge2" type="radio" class="op_one subchallenge" checked="">
			<label for="series2-s2-op_one" onclick="">Option 1</label>

			<input id="series2-s2-op_two" name="series2-subchallenge2" type="radio" class="op_two subchallenge" checked="checked">
			<label for="series2-s2-op_two" onclick="">Option 2</label>

			<input id="series2-s2-op_three" name="series2-subchallenge2" type="radio" class="op_three subchallenge">
			<label for="series2-s2-op_three" onclick="">Option 3</label>
			<div class="slider"></div>

				<article id="series2-switch3" class="switch-toggle three-way">	

			<input id="series2-s3-op_one" name="series2-subchallenge3" type="radio" class="op_one subchallenge" checked="">
			<label for="series2-s3-op_one" onclick="">Option 1</label>

			<input id="series2-s3-op_two" name="series2-subchallenge3" type="radio" class="op_two subchallenge" checked="checked">
			<label for="series2-s3-op_two" onclick="">Option 2</label>

			<input id="series2-s3-op_three" name="series2-subchallenge3" type="radio" class="op_three subchallenge">
			<label for="series2-s3-op_three" onclick="">Option 3</label>
			<div class="slider"></div>
					<article id="series2-switch4" class="switch-toggle three-way">	

			<input id="series2-s4-op_one" name="series2-subchallenge4" type="radio" class="op_one subchallenge" checked="">
			<label for="series2-s4-op_one" onclick="">Option 1</label>

			<input id="series2-s4-op_two" name="series2-subchallenge4" type="radio" class="op_two subchallenge" checked="checked">
			<label for="series2-s4-op_two" onclick="">Option 2</label>

			<input id="series2-s4-op_three" name="series2-subchallenge4" type="radio" class="op_three subchallenge">
			<label for="series2-s4-op_three" onclick="">Option 3</label>
			<div class="slider"></div>
</article>	 <!-- END #frost-series -->


                body {
	background-color: black;
	color: white;
	font-family: 'Kodchasan', sans-serif;
	margin: 0;

h2, h1 {
    font-variant: small-caps;
    letter-spacing: 0.1em;

.title, .subtitle {
	margin: 0.5em auto;
	text-align: center;
.survey {
	margin: auto;

.subquestion-title {
    color: rgba(255, 255, 255, 0.5);

.series {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 1rem;
    justify-content: center;
    text-align: center;
	   box-shadow: 0 0 20px -10px inset;
    border-radius: 30px;
article {
	margin: 1rem 0;

article .subquestion-title {
    margin-bottom: 0;
    margin-top: 1.5em;
    font-variant: small-caps;
    letter-spacing: 0.25em;
    font-weight: bold;

.switch-toggle {
    position: relative;
    display: flex;
/*     height: 2em; */
    justify-content: space-evenly;
    font-size: 24px;
    font-variant: small-caps;

.switch-toggle label {
	color: #ffffff36;
	background: transparent;
	display: flex;
	flex-basis: 33%;
	justify-content: center;
	align-content: center;
	height: 100%;
	padding: 0.25em;
/* 	z-index: 1; */
	transition: 0.3s all ease;
	cursor: pointer;
	 border-radius: 50%;
   box-shadow: -3px -3px 3px -3px inset black, -7px -5px 30px -10px inset black, 3px 3px 3px -3px inset white, 5px 5px 30px -10px inset white;
    height: 8em;
    width: 5em;
    max-width: 8em;
    min-width: 8em;
    display: flex;
    align-items: center;

.slider {
position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 33.33333333333333%;
    background: #ff0000;
    border-radius: 10px;
    box-shadow: -3px -3px 3px -3px inset black, -5px -5px 30px -10px inset black, 3px 3px 3px -3px inset white, 5px 5px 30px -10px inset white;
    -webkit-transition: .4s;
    transition: .4s;
    opacity: 0.5;
.slider {
    display: none;
#frost-series .slider {
    background-color: hsla(208, 91%, 92%, 1);
    box-shadow: 0 0 30px;

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;

.three-way .op_one:checked ~ .slider {
	left: 0;
	right: 0;

.three-way .op_two:checked ~ .slider {
	transform: translateX(-50%);
	left: 50%;
	right: auto;

.three-way .op_three:checked  ~ .slider {
	transform: translateX(-100%);
	left: 100%;
	right: 0;

input:checked + label {
	color: white;
	text-shadow: 0 0 5px #ffffff9c;
	background-color: #ff0000;
	    transition: .4s;
    opacity: 0.5;

#frost-series {
    background: blue;
    background: #d0e4f7;
    background: -moz-linear-gradient(45deg, #d0e4f7 0%, #73b1e7 24%, #0a77d5 50%, #539fe1 79%, #87bcea 100%);
    background: -webkit-linear-gradient(45deg, #d0e4f7 0%,#73b1e7 24%,#0a77d5 50%,#539fe1 79%,#87bcea 100%);
    background: linear-gradient(45deg, #d0e4f7 0%,#73b1e7 24%,#0a77d5 50%,#539fe1 79%,#87bcea 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d0e4f7', endColorstr='#87bcea',GradientType=1 );