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

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.

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

              
                <div id="iphone6">
  
  <div id="screen">
    <span>
    Quick guidestyle about 'Call to Actions' buttons
    </span>
    
    <div class="primary_light">
      I AM THE PRIMARY ACTION
    </div>
    
    <div class="secondary_light">
      I AM THE SECONDARY ACTION
    </div>
    
    <div class="primary_disabled">
      I AM DISABLED
    </div>
    
<!--    https://codepen.io/melnik909/pen/oewwBo?editors=1100 

<div class="toggle_hn">

      <label class="switch switch_type3" role="switch">
        <input type="checkbox" class="switch__toggle" checked>
        <span class="switch__label"></span>
      </label>

    </div>-->
    
  </div>
  
</div>
              
            
!

CSS

              
                body{
  font-family:"FB", Futura;
	letter-spacing: 0.025em;
  font-size:14px;
  font-weight:100;
  
  background: #333; /* For browsers that do not support gradients */
  background: -webkit-linear-gradient(30deg, #333, #ccc); /* For Safari 5.1 to 6.0 */
  background: -o-linear-gradient(30deg, #333, #ccc); /* For Opera 11.1 to 12.0 */
  background: -moz-linear-gradient(30deg, #333, #ccc); /* For Firefox 3.6 to 15 */
  background: linear-gradient(30deg, #333, #ccc); /* Standard syntax */
  /*background-color: #333;*/
}

#iphone6{
  margin: 15vh auto;
  width:434px;
  height:880px;
  background-image: url('http://i65.tinypic.com/2edxcex.png');
  z-index:1000;
}

#screen{
  position:relative;
  margin: 40px auto;
  top:105px;
  width:375px;
  height:667px;
  background-color: #fff;
  z-index:1;
}

span{
  tex-align:center;
  position:relative;
  top: 150px;
  width:315px;
  left:30px;
  padding-bottom:40px;
  border-bottom:2px solid #000;
  line-height:20px;
}

/* ////////////////// PRIMARY ACTION STYLE /////////////////// */
.primary_light {
  position:relative;
  top:52%;
  cursor:pointer;
  
  width: 92%;
	height:40px;
	line-height: 40px;
	transition: background-color 0.3s ease;
	color: #fff;
	font-size: 14px;
	background: #999;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-align: center;
	margin:0 auto;
}

.primary_light:hover {
	background: #333;
	text-decoration: none;
}
/* ////////////////// /PRIMARY ACTION STYLE /////////////////// */

/* ////////////////// SECONDARY ACTION STYLE /////////////////// */
.secondary_light {
  position:relative;
  top:54%;
  cursor:pointer;
  
  width: 92%;
	height:38px;
	transition: background-color 0.3s ease;
	border: 1px solid #999;
	line-height: 38px;
	color: #999;
	font-size: 14px;
	background: #fff;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-align: center;
	margin:0 auto;
}

.secondary_light:hover {
	background: #fff;
	border: 1px solid #333;
	color: #333;
	text-decoration: none;
}
/* ////////////////// /SECONDARY ACTION STYLE /////////////////// */

/* ////////////////// DISABLED STYLE /////////////////// */
.primary_disabled {
  position:relative;
  top:56%;
  width: 92%;
  
	height:40px;
	line-height: 40px;
	color: #fff;
	font-size: 14px;
	background: #ccc;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-align: center;
	margin:0 auto;
}
/* ////////////////// /DISABLED STYLE /////////////////// */



/* ////////////////// TOGGLE /////////////////// */

.toggle_hn{
  height:40px;
  width:80px;
  position:relative;
  top:58%;
  font-size: 1.6rem;
  color: #222;
  background-color: #dfdfdf;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}


.switch{

  --uiSwitchSize: var(--switchSize, 80px);
  --uiSwitchBgColor: var(--switchBgColor, #f1f1f1);
  --uiSwitchBgColorActive: var(--switchBgColorActive, #4ed164);
  --uiSwitchBorderColorActive: var(--switchBorderColorActive, #fff);
  --uiSwitchBorderColorFocus: var(--switchBgColorFocus, #43b556);
  --uiSwitchButtonBgColor: var(--switchButtonBgColor, #fff);  
  
  display: inline-block;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.switch__label{
  display: block;
  height:40px;
  width:80px;
}

.switch__toggle{
  width: 30px;
  height: 0;
  opacity: 0;
  
  position: absolute;
  top: 0;
  left: 0;
}

.switch__toggle:focus ~ .switch__label{
  box-shadow: 0 0 0 var(--uiSwitchThickFocus, 2px) var(--uiSwitchBorderColorFocus);
}

.switch__toggle:checked:focus ~ .switch__label{
  box-shadow: 0 0 0 var(--uiSwitchThickFocus, 4px) var(--uiSwitchBorderColorActive);
}

.switch__label:before, .switch__label:after{
  content: "";
  cursor: pointer;

  position: absolute;
  top: 0;
  left: 0;
}

.switch__label:before{
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background-color: var(--uiSwitchBgColor);
}

.switch__label:after{
  top: 50%;
  z-index: 3;
  transition: transform .4s cubic-bezier(0.44,-0.12, 0.07, 1.15);
}

.switch_type3{
  --uiSwitchIndent: var(--switchIndent, 8px);
  
  width: var(--uiSwitchSize);
  height: calc((var(--uiSwitchSize) / 2));
  background-color: var(--uiSwitchBgColorActive);
}

.switch_type3 .switch__toggle:checked ~ .switch__label:before{
  background-color: var(--uiSwitchBgColorActive);
}

.switch_type3 .switch__label:after{
  width: calc((var(--uiSwitchSize) / 2) - calc(var(--uiSwitchIndent) * 2));
  height: calc((var(--uiSwitchSize) / 2) - calc(var(--uiSwitchIndent) * 2));
  transform: translate3d(var(--uiSwitchIndent), -50%, 0);
  background-color: var(--uiSwitchButtonBgColor);
}

.switch_type3 .switch__toggle:checked ~ .switch__label:after{
  transform: translate3d(calc(var(--uiSwitchSize) - calc((var(--uiSwitchSize) / 2) - calc(var(--uiSwitchIndent) * 2)) - var(--uiSwitchIndent)), -50%, 0);
}

/* demo styles for switch */

.switch{
  --switchSize: 128px;
  margin-top: 40px;
}

.switch_type2{
  --switchBgColorActive: #e85c3f;
  --switchBgColorFocus: #d54b2e;
}

/*
* demo page
*/
/* ////////////////// /TOGGLE /////////////////// */

@font-face{
  font-family:"FB";src:url("http://skinv2.harveynichols.com/frontend/enterprise/hndefault/fonts/futura/Futura-Book.eot?#iefix");src:local("Futura Book") ,url("http://skinv2.harveynichols.com/frontend/enterprise/hndefault/fonts/futura/Futura-Book.eot?#iefix") format("eot"), url("http://skinv2.harveynichols.com/frontend/enterprise/hndefault/fonts/futura/Futura-Book.woff") format("woff"), url("http://skinv2.harveynichols.com/frontend/enterprise/hndefault/fonts/futura/Futura-Book.ttf") format("truetype"), url("http://skinv2.harveynichols.com/frontend/enterprise/hndefault/fonts/futura/Futura-Book.svg#Futura-Book") format("svg");
}
              
            
!

JS

              
                
              
            
!
999px

Console