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

              
                <!-- <section class="grid-container--medium">
  <h1>Jeet starter base</h1>
  <ul>
    <li><a href="http://jeet.gs/" target="_blank">Jeet.gs</a></li>
    <li><a href="https://github.com/mojotech/jeet/tree/master/scss/" target="_blank">Jeet on github</a></li>
  </ul>
</section> -->

<section class="grid-container--medium lol0 yolo0">
  
  <img class="samesame" src="https://media.giphy.com/media/lXiRD6COxDO7BOKTm/giphy.gif">
  
  <div class="spots"> <!-- Spots container, to handle floats -->
    
    <div class="spot">
      <img src="http://i1.kym-cdn.com/photos/images/newsfeed/000/591/928/94f.png" class="spot__image">
      <div class="spot__text">Ahhh..</div>
    </div>
    
    <div class="spot">
      <img src="http://i1.kym-cdn.com/photos/images/newsfeed/000/591/928/94f.png" class="spot__image">
      <div class="spot__text">This is more like it</div>
    </div>
    
    <div class="spot">
      <img src="http://i1.kym-cdn.com/photos/images/newsfeed/000/591/928/94f.png" class="spot__image">
      <div class="spot__text">So fresh and so clean</div>
    </div>
    
    <div class="spot">
      <img src="http://i1.kym-cdn.com/photos/images/newsfeed/000/591/928/94f.png" class="spot__image">
      <div class="spot__text">So fresh and so clean</div>
    </div>
    
    <div class="spot">
      <img src="http://i1.kym-cdn.com/photos/images/newsfeed/000/591/928/94f.png" class="spot__image">
      <div class="spot__text">Uh yeah!</div>
    </div>
    
    <div class="spot">
      <img src="http://i1.kym-cdn.com/photos/images/newsfeed/000/591/928/94f.png" class="spot__image">
      <div class="spot__text">Gotta love it</div>
    </div>
    
    <div class="spot">
      <img src="http://i1.kym-cdn.com/photos/images/newsfeed/000/591/928/94f.png" class="spot__image">
      <div class="spot__text">Bring it</div>
    </div>
    
  </div>
  
</section>
              
            
!

CSS

              
                // ===============================
// Variables
// ===============================
$development: true; // Show breakpoints
$show-grid: false; // Show grid elements
$grid-x-large: 1600px;
$grid-large: 1200px;
$grid-medium: 1000px;
$grid-small: 800px;
$grid-x-small: 600px;
$grid-padding: 20px;

/// Breakpoints map
/// @prop {String} keys - Keys are identifiers mapped to a given length
/// @prop {Map} values - Values are actual breakpoints expressed in pixels
/// @see {mixin} respond-to
$breakpoints: (
    'xx-small': (min-width: 320px),
    'x-small': (min-width: 480px),
    'small': (min-width: 600px),
    'medium': (min-width: 768px),
    'large': (min-width: 1020px),
    'x-large': (min-width: 1200px),
    'xx-large': (min-width: 1400px),
    'xxx-large': (min-width: 1600px),
    'mega': (min-width: 1900px)
) !default;

// ===============================
// Mixins
// ===============================

/// Responsive manager mixin
/// @param {String} $breakpoint - Breakpoint
/// @requires $breakpoints
/// @link http://sass-guidelin.es/#breakpoint-manager Sass Guidelines - Breakpoint Manager
@mixin respond-to($breakpoint) {
  $query: map-get($breakpoints, $breakpoint);
  @if not $query {
    @error 'No value found for `#{$breakpoint}`. Please make sure it is defined in `$breakpoints` map.';
  }
  @media #{if(type-of($query) == 'string', unquote($query), inspect($query))} {
    @content;
  }
}

// Grid container mixin
@mixin container($max-width) {
  @include center($max-width, $grid-padding);
}

// ===============================
// Helpers
// ===============================

// Show grid
@if $show-grid == true {
  @include edit();
}

// Grid aware helper
@if $development == true {
  body {
    // Grid breakpoints
    &:after {
      background: rgba(#000, 0.6);
      color: #fff;
      content: "implicit < 320px";
      display: block;
      font-size: 12px;
      padding: 5px 12px;
      position: fixed;
      right: 5px;
      bottom: 5px;
      z-index: 9000;

      @include respond-to('xx-small') { content: "xx-small >= 320px"; }
      @include respond-to('x-small') { content: "x-small >= 480px"; }
      @include respond-to('small') { content: "small >= 568px"; }
      @include respond-to('medium') { content: "medium >= 768px"; }
      @include respond-to('large') { content: "large >= 1020px"; }
      @include respond-to('x-large') { content: "x-large >= 1200px"; }
      @include respond-to('xx-large') { content: "xx-large >= 1400px"; }
      @include respond-to('xxx-large') { content: "xxx-large >= 1600px"; }
      @include respond-to('mega') { content: "mega >= 1900px"; }
    }
  }
}

// Grid containers
.grid-container--xsmall {
  @include container($grid-x-small);
}
.grid-container--small {
  @include container($grid-small);
}
.grid-container--medium {
  @include container($grid-medium);
}
.grid-container--large {
  @include container($grid-large);
}
.grid-container--x-large {
  @include container($grid-x-large);
}


// ===============================
// Content
// ===============================

body {
  background: #eee;
  
  img {
    display: block;
    max-width: 100%;
  }
}

section {
  background: #fff;
  margin: 20px auto 50px;
  padding: 20px 0 10px;
}

.spots {
  @include cf();
}

.spot {
  // Basic styles
  @include cf();
  background: #bada55;
  box-sizing: border-box;
  font-size: 16px;
  margin: 0 auto 10px;
  max-width: 300px;
  overflow: hidden;
  position: relative;
  
  // Breakpoint x-small
  @include respond-to('x-small') {
    @include col(1/2, $cycle: 2);
    margin-bottom: 15px;
    max-width: none;
  }
  
  @include respond-to('small') {
    @include col(1/3, $uncycle: 2, $cycle: 3);
    margin-bottom: 18px;
    
    // Advanced grid 1
    .lol & { 
      @include col(1/5, $uncycle: 2, $cycle: 0);

      // Big spot
      &:nth-child(3) {
        @include col(3/5);
        float: right;
        margin-right: 0;
      }
    }
    
     // Advanced grid 2
    .yolo & { 
      @include col(1/2, $uncycle: 2, $cycle: 2);

      // big spot
      &:nth-child(3) {
        @include col(2/2);
        font-size: 26px;
      }
      
      &:nth-child(n+5) {
        @include col(1/2);
      }
    }
  }
  
  // Breakpoint medium
  @include respond-to('medium') {
    @include col(1/3, $uncycle: 2, $cycle: 3);
    margin-bottom: 20px;
    
    // Advanced grid 1
    .lol & { 
      @include col(1/5, $uncycle: 2, $cycle: 0);

      // Big spot
      &:nth-child(3) {
        @include col(3/5);
        float: right;
        margin-right: 0;
      }
    }
    
    // Advanced grid 2
    .yolo & { 
      @include col(1/3, $uncycle: 2, $cycle: 3);
      
      &:nth-child(3) {
        @include col(1/3, $uncycle: 2, $cycle: 3);
        font-size: 16px;
      }

      // big spot
      &:nth-child(4) {
        @include col(3/3);
        font-size: 36px;
      }
      
      &:nth-child(n+5) {
        @include col(1/3);
      }
    }
  }
}

.spot__image {
  float: right;
}

.spot__text {
  position: absolute;
  left: 2%;
  top: 5%;
  padding: 20px;
  width: 50%;
}





.samesame {
  display: none;
  margin: 0 auto 20px;
  
  .lol &,
  .yolo & {
    display: block;
    video {
      display: block;
      max-width: 100%;
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console