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. 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

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

              
                .wrapper
  .container
    h1 Quick FlexBox Grid
    .row
      .col.col-1-1  
        .module.white
          h3 col-1-1  
          p Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia, distinctio voluptatum sed voluptatem earum, temporibus, sit consectetur consequatur necessitatibus, esse provident!
    .row
      -for i in (1..5)
        .col.col-1-5.md
          .module.blue
            h3 1/5 MAX 480
    .row
      -for i in (1..5)
        .col.col-1-5.xs
          .module.red
            h3 1/5 MIN:0       
    .row
      -for i in (1..4)
        .col.col-1-4.xs-1-2
          .module.black
            h3 1/4 MAX:480 make 1-2             
    .row
      -for i in(1..3)
        .col.col-1-3.md
          .module.blue
            h3 col-1-3.md: Max 767
            p Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sed deserunt, ullam dolores perferendis.
    .row
      .col.col-2-3.md
        .module.white
          h4 col-2-3.md Max 767
          p Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sed deserunt, ullam dolores perferendis odio ducimus laudantium placeat dicta eos impedit voluptates ab doloribus nobis porro sapiente. Expedita delectus enim, impedit?      
      .col.col-1-3.md
        .module.white.align-self-flex-center
          blockquote col-1-3.md Max 767 <br> With Vertical Rhythm amet, consectetur adipisicing elit. Sed deserunt, ullam dolores perferendis odio ducimus laudantium placeat dicta eos impedit voluptates ab doloribus nobis porro sapiente. Expedita delectus enim, impedit?
    .row
      -for i in (1..2)
        .col.col-1-2.xs
          .module.blue
            h3 
    .row
      -for i in (1..2)
        .col.col-1-3.sm
          .module.red
            h3        
    .row
      -for i in (1..2)
        .col.col-1-4.xs-1-2
          .module.black
            h3            
    .row
      -for i in(1..2)
        .col.col-1-5.sm
          .module.blue
    .row
        .col.col-1-6.sm
          .module.red              
    .row
      -for i in(1..6)
        .col.col-1-6.sm
          .module.black
    .row
        .col.col-1-3.sm
          .module.red
    .row
        .col.col-2-3.sm
          .module.blue
    .row
        .col.col-1-1.sm
          .module.white   
     
              
            
!

CSS

              
                @import "compass/css3";

@import "compass/typography";


*{
  @include box-sizing(border-box);
}


$gutters: 1em/2;


body {
  min-height: 100%;
  max-width: 100%;
  background: white;
  font-family: sans-serif;
  font-size: 16px;
  line-height: 20px;
  padding-bottom: $gutters*2;
}

.wrapper {
    padding-top: $gutters*3;
    width: 100%;
    max-width: 100%;
}


.container{
  min-height: 150px;
  padding-left: $gutters *2;
  padding-right: $gutters *2;
  padding-top: $gutters;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-bottom: $gutters*2;
}


.row{
  @include display-flex(flex);
  @include flex-direction(row);
  @include flex-wrap(wrap);
  margin-left: -$gutters;
  margin-right: -$gutters;
}

.col {

  @include display-flex(flex);
  min-height: 40px;
  padding-right: $gutters;
  padding-left: $gutters;
  margin-top: $gutters*2; 
  box-sizing: border-box;
  flex: 1 0 auto;

}



.module {
  width: 100%;
  padding: 15px;
  
  img{
    width: 100%;
  }
}



.col-1-1 {
  flex-basis: 100%;
  max-width: 100%;
}

.col-1-2{
  flex-basis: 50%;
  max-width: 50%;
}

.col-1-3{
  flex-basis: 33.33%;
  max-width: 33.33%;
}

.col-1-4{
  flex-basis: 25%;
  max-width: 25%;
}

.col-1-5{
  flex-basis: 20%;
  max-width: 20%;
}

.col-1-6{
  flex-basis: calc(100% / 6);
  max-width: calc(100% / 6);
}


.col-2-3 {
  flex-basis: 66.66%;
  max-width: 66.66%;
}


@media screen and (max-width: 750px) {  
  .col.md {
    flex-basis: 100%;
    max-width: 100%;
  }
}

@media screen and (max-width: 600px) {  
  .col.sm {
    flex-basis: 100%;
    max-width: 100%;
  }
  
  
  
}



@media screen and (max-width: 480px) {  
  .col-1-5.xs {
    flex-basis: 20%;
    max-width: 20%;
    font-size: 3vw !important;
  }
  .col-1-5.xs-1-2 {
    flex-basis: 50%;
    max-width: 50%;
    font-size: 3vw !important;
  }
    
    
  .col-1-2.xs {
    flex-basis: 50%;
    max-width: 50%;
    font-size: 3vw !important;
  }    
.col.col-1-4.xs-1-2  {
    flex-basis: 50%;
    max-width: 50%;
    min-width: 50%;
    font-size: 3vw !important;
  }  
    
    .xs-1-2 {
    flex-basis: 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
    }
}  




.as-flex-start {
  align-self: flex-start;
}
.as-flex-end {
  align-self: flex-end;
}

.as-flex-center {
  align-self: center;
}
.as-flex-base {
  align-self: baseline;
}



.white {
  background: #eee;
  color: #3d3d3d;
}


.blue {
  background: DodgerBlue;
  color: rgba(white,0.9);
}
.red {
  background: tomato;
  color: rgba(white,0.9);
}

.black {
  background: #3d3d3d;
  color: rgba(white,0.9);
}




@mixin font($font, $style: normal, $weight: normal) {
    font-family: $font;
    font-style:  $style;
    font-weight: $weight;
}


@include establish-baseline;
$base-font-size: 16px;
$base-line-height: 24px;

//fonts

$default-sans-font:'Helvetica', sans-serif;
$serif-font:'Roboto Slab', serif;
$default-font-color: rgba(black, 0.8);


h1 {
  font-weight: 700;
  @include adjust-font-size-to(42px);
  @include rhythm(0, 0, 0, 1, 42px);
  @include trailing-border(1px, 1, 42px, solid);
}


h3 {
  @include font($serif-font, normal, 700);
	@include adjust-font-size-to($base-font-size);
	@include rhythm(0, 0, 0, 0, $base-font-size);
}

h4 {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .125em;
	@include adjust-font-size-to($base-font-size);
	@include rhythm(0, 1, 0, 1, $base-font-size);
	@include trailing-border(1px, 1, $base-font-size, solid);
}

p {
  @include font($serif-font);
  @include adjust-font-size-to($base-font-size);
  @include rhythm(0, 0, 0, 1, $base-font-size);
}


blockquote {
  border-left: 5px solid rgba(black, 0.3);
  padding-left: 16px;
  @include font($serif-font);
  font-style: italic;
  @include adjust-font-size-to($base-font-size * 1.2);
  @include rhythm(0, 0, 0, 1, $base-font-size * 1.2);	
}




              
            
!

JS

              
                
              
            
!
999px

Console