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

              
                `<div class="wrapper">
  <div class="box box--green box--circle"></div>
  <div class="box box--triangle"></div>
  <div class="box box--green box--triangle"></div>
  <div class="box box--green"></div>
  <div class="box box--triangle"></div>
  <div class="box"></div>
  <div class="box"></div>
  <div class="box"></div>
  <div class="box"></div>
  <div class="box"></div>
  <div class="box box--green box--flex">
    <span class="box__letter">G</span>
  </div>
  <div class="box box--green box--flex">
    <span class="box__letter">R</span>
  </div>
  <div class="box box--green box--flex">
    <span class="box__letter">I</span>
  </div>
  <div class="box box--green box--flex">
    <span class="box__letter">D</span>
  </div>
  <div class="box box--mustard box--expanded">
    <blockquote class="box__quote quote">
      <p class="quote__text">&ldquo;<strong>The grid system is an aid, not a guarantee.</strong> It permits a number of possible uses and each designer can look for a solution appropriate to his personal style. But one must learn how to use the grid; it is an art that requires practice.&rdquo;</p>
      <cite class="quote__cite">Josef Müller-Brockmann</cite>
    </blockquote>
  </div>
</div>

<div class="credits">
  <p><em>Not a Guarantee</em> Poster by <a href="http://studiotwentysix2.com/poster/grid.html" target="_blank">Tom Davie</a></p>  
</div>
              
            
!

CSS

              
                /*
  Poster Credit: http://studiotwentysix2.com/poster/grid.html
  Idea Inspirations:
    1. Victoria Ninni Bergquist (https://codepen.io/vicbergquist/pen/ELYpWB)
    2. phild (https://codepen.io/phild/pen/qyYXZG)
*/

@import url('https://fonts.googleapis.com/css?family=Roboto:400,400i,500');
  
/* Lazy Reset */
* {
  padding: 0;
  margin: 0;
}

html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* ~Colours~ */

$mustard: #CBBE0D;
$green: #2E8405;

/* ~ * ~ START THE MAGIC ~ * ~ */

body {
  background-color: #333;
  font-family: 'Roboto', sans-serif;
}

.wrapper {    
  width: 568px;  
  height: 680px;
  margin: 1em auto;  
  border: 17px solid #fff;
  background-color: $mustard;
  
  display: grid;
  grid-template-columns: [col] 1fr [col] 1fr [col] 1fr [col] 1fr;
  grid-template-rows: [row] 138px [row] 138px [row] 138px [row] 138px;
  grid-gap: 7px;
}

.box {
  background-color: #000;
  width: 100%;
  height: 100%;
}

.box--mustard {
  background-color: $mustard;
  color: #000;
  font-style: italic;
}

.box--green {
  background-color: $green;
  color: $mustard;
}

.box--circle {
  width: 81px;
  height: 81px;
  margin: 30px auto 0;
  border-radius: 50%;
}

.box--triangle {
  width: 0;
  height: 0;
  background-color: $mustard;
  border-bottom: 138px solid #000;
  border-left: 128px solid $mustard;
}

.box--green.box--triangle {
  border-bottom-color: $green;
}

.box--flex {
  display: flex;
  align-items: center;
  justify-content: center;  
}

.box__letter {
  font-weight: 500;
  font-size: 130px;
}

.box--expanded {
  grid-column: span 2;  
  grid-row: span 2;
}

.quote {
  height: 100%;  
  display: flex;  
  flex-flow: row wrap;
  align-items: flex-end;
  padding-right: 7px;
  padding-bottom: 55px;
  padding-left: 10px;  
  font-size: 8px;
  line-height: 1.67;
  
  position: relative;
}

.quote__cite {      
  color: $green;    
  font-weight: 700;
  
  position: absolute;
  right: 30px;
}

.credits {
  text-align: center;
  color: $mustard;
}

a {
  color: $green;
  font-weight: 500;
}
              
            
!

JS

              
                
              
            
!
999px

Console