Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                link(href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet")

.wrap
  .tabs
    input(type="radio" name="tabs" checked="checked").tab#tab--1
    input(type="radio" name="tabs").tab#tab--2
    input(type="radio" name="tabs").tab#tab--3
    input(type="radio" name="tabs").tab#tab--4
    label(for="tab--1").button#button--1
      i.fa.fa-home.fa-2x
    label(for="tab--2").button#button--2
      i.fa.fa-bars.fa-2x
    label(for="tab--3").button#button--3
      i.fa.fa-heart.fa-2x
    label(for="tab--4").button#button--4
      i.fa.fa-bell.fa-2x
    .display#display--1
      span.title Pure CSS3 Tabbed Content
      p   Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur dolor quo, dicta perspiciatis amet, quod delectus inventore, nobis officia explicabo quidem ipsum corporis voluptatibus repellat id earum eaque! Magnam iusto asperiores adipisci suscipit ad praesentium dicta, perspiciatis earum in mollitia repellendus ullam possimus et minima iure reprehenderit aliquid, odit eaque doloribus blanditiis molestiae dolorum. Error, dolores quasi, impedit tempora quia saepe eum ab illum nobis facilis sapiente, temporibus officiis fugit.
    .display#display--2 
      span.title No JavaScript Needed
      p   Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ex soluta dolorum porro maiores id ipsum eos excepturi perferendis similique nihil quasi tempora facilis, natus necessitatibus quam in sed enim repellat temporibus beatae assumenda velit veritatis. Adipisci ex vero corrupti est recusandae nihil minima autem odio dolor velit quam voluptatibus delectus, tempore quo odit placeat ipsa sit, veniam id ducimus exercitationem! Facere eius tempore voluptatem harum accusantium officiis quos officia, explicabo assumenda beatae mollitia molestias ad aut minima error ut, id omnis perferendis, nesciunt animi. Facere, recusandae, architecto, soluta et porro magnam repudiandae, aperiam harum accusamus saepe ad commodi explicabo labore!
    .display#display--3
      span.title Ugly markup though...
      p  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptas ipsam eveniet dolor iste blanditiis sunt, accusamus cupiditate ratione voluptates tenetur minus facilis saepe laudantium quod dicta, optio illum nulla dignissimos soluta velit. Tempora, inventore. Nesciunt, quasi, iste. Dolorum amet porro, repellendus cumque. Delectus ut, saepe nobis quas minus numquam, culpa dolor dolorum nisi ducimus quam harum impedit architecto quasi sunt pariatur cum dolorem aut, aliquam mollitia voluptates deleniti animi. Delectus dignissimos, libero pariatur aliquid, necessitatibus vel obcaecati natus labore rerum.
    .display#display--4
      span.title But it works!
      p  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tenetur aperiam, esse ex ipsa? Quibusdam itaque dolor modi laudantium quod deleniti est provident incidunt? Voluptas animi aut, non id, ipsam voluptates.
              
            
!

CSS

              
                @mixin Anims($time) {
  -webkit-transition: all $time;
  -moz-transition: all $time;
  -ms-transition: all $time;
  -o-transition: all $time;
  transition: all $time;
}
 
@mixin Transform($type) {
  -webkit-transform: $type;
  -moz-transform: $type;
  -ms-transform: $type;
  -o-transform: $type;
  transform: $type;
}

@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400|Dosis:200,300,400);

*, *:before, *:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html,body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #fafafa;
  -webkit-background-size: cover;
  background-size: cover;
}

$content-height: 500px; 

.wrap {
  margin: auto;
  padding: 0;
  display: block;
  position: absolute;  
  width: 100%;
  height: 100%;
  top: 0; right: 0; bottom: 0; left: 0;
  background: #fafafa;
  overflow: hidden;
  @include Anims(0.4s);
}

.tabs {
  margin: 0;
  padding: 0;  
  display: block;
  width: 100%;
  height: 100%;
  float: left;
  background: #111;
}

.tab-height {
  height: $content-height / 4;
  line-height: $content-height / 4;
}

.tab {display: none;}

.button {
  margin: 0;
  padding: 0;  
  display: block;
  position: relative;
  width: 160px;
  @extend .tab-height;
  text-align: center;
  color: #f0f0f0;
  cursor: pointer;
  @include Anims(0.4s);
}

.button:hover {
  background: #ccc;
  color: #111;
}

.button:active {
  color: #ff58a5;
}

.display {
  margin: 0;
  padding: 0;
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: calc(100% - 160px);
  height: 100%;
  background: #fafafa;
  overflow: hidden;
}

.title {
  margin: 30px 0;
  padding: 0;
  display: block;
  position: relative;
  width: 100%;
  height: 30px;
  font: {
    family: 'Open Sans';
    weight: 300;
    size: 1.5em;
  }
  line-height: 30px;
  text-align: center;
  color: #111;
  @include Anims(0.4s);
}

p {
  margin: 30px auto;
  padding: 0;
  display: block;
  position: relative;
  width: 90%;
  height: auto;
  font: {
    family: 'Open Sans';
    weight: 300;
    size: 1em;
  }
  line-height: 20px;
  text-align: center;
  color: #111  
}

#tab--1:checked ~ #button--1,
#tab--2:checked ~ #button--2,
#tab--3:checked ~ #button--3,
#tab--4:checked ~ #button--4 {
  background: #fafafa;
  color: #111;
}
#tab--1:checked ~ #display--1,
#tab--2:checked ~ #display--2,
#tab--3:checked ~ #display--3,
#tab--4:checked ~ #display--4 {
  display: block;
}




              
            
!

JS

              
                
              
            
!
999px

Console