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

              
                <div class="board">

  <header class="board-header">
    <h1>
      <svg aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
        <path d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"></path>
      </svg>
      Arrivals
    </h1>
  </header>

  <div class="version">
    <h2 class="version-title">
      <svg aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
        <path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path>
      </svg>
      Version 3.0</h2>
    <div class="version-status">Released</div>
    <div class="version-date">
      Released on
      <time>May 18, 2017</time>
    </div>
    <div class="version-about">
      A big major release. Cool things. Copy copy.
    </div>
  </div>
  
  <div class="version">
    <h2 class="version-title">
      <svg aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
        <path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path>
      </svg>
      Version 3.1</h2>
    <div class="version-status">Released</div>
    <div class="version-date">
      Released on
      <time>May 18, 2017</time>
    </div>
    <div class="version-about">
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto inventore ipsam, minima quaerat ratione quis praesentium quisquam voluptatum beatae, vero quod eaque corporis aliquam molestiae cumque, libero sint possimus delectus.
    </div>
  </div>

  <div class="version">
    <h2 class="version-title">
      <svg width="24" height="24" viewBox="0 0 24 24">
        <path d="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" />
</svg>
      Version 3.2
    </h2>
    <div class="version-status in-dev">In Development</div>
    <div class="version-date">
      Coming Q4
    </div>
    <div class="version-about">
      New features that you're going to love.
    </div>
  </div>

</div>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
}
html {
  font-size: 13px;
}
body {
  margin: 0;
  background: linear-gradient(
    to bottom, #1B417F, #C8F0FD
  );
  height: 100vh;
  font-family: system-ui, sans-serif;
  color: white;
  padding: 4rem 5%;
}

.board {
  // Seems to thin out the fonts on my retina display. They didn't look right without it.
  -webkit-font-smoothing: antialiased;
  
  // solid color fallback!
  background: #333 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-1/arrivals-backgroundnoise.png);
  border-radius: 1rem;
  
  // nice that overflow doesn't chop the box-shadow. 
  box-shadow: 0 4px 16px rgba(black, 0.25);
  overflow: hidden;
  
  max-width: 700px;
  min-width: 440px; 
  padding-bottom: 2rem;
  margin: 0 auto;
}
.board-header {
  // the little grooves are made from two light lines right next to each other, one transparent black, one transparent white. You have to be much _more_ transparent with the white than black, for whatever reason.
  border-bottom: 1px solid rgba(black, 0.16);
  padding: 0.75rem 1rem;
  
  // I like to be specific when I'm selecting an <svg> element and select it by tag rather than a class alone. I think because there are special CSS properties for SVG, like fill and stroke and such.
  svg {
    fill: white;
    width: 1em;
    height: 1em;
    vertical-align: center;
    position: relative;
    top: 4px;
  }
  h1 {
    text-shadow: black 0 -1px 0;
    margin: 0;
  }
}

.version {
  border-top: 1px solid rgba(white, 0.04);
  border-bottom: 1px solid rgba(black, 0.16);
  padding: 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  
  // I put each row in the HTML source order that seemed to make the most sense to me, which didn't _quite_ match the auto grid layout, so plopping names on the areas to make the layout clear.
  grid-template-areas:
    "title status"
    "about date";
  grid-gap: 0.5rem 1rem;
  
  &:last-child {
    // there is no extra element to complete the grooved look with a top border, so I'm just faking it with a box-shadow
    box-shadow: 0 1px 0 rgba(white, 0.04);
  }
}
.version-title,
.version-status {
  font-size: 1.5em;
  line-height: 2.0rem; // vertical centering when font-size changes
  margin: 0;
  padding: 0.4rem 0.6rem;
  position: relative;
  color: #DDDDDD;
  background: #212121;
  border-radius: 3px;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 
    0 1px 0 rgba(white, 0.07),
    inset 0 -1px 2px rgba(black, 0.5),
    inset 0 3px 5px rgba(black, 0.6);
  svg {
    fill: #8D8D8D;
    vertical-align: middle;
    position: relative;
    top: -2px;
  }
  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: rgba(black, 0.5);
    pointer-events: none;
    border-bottom: 1px solid black;
    opacity: 0.33;
  }
  
  @media (max-width: 600px) {
    font-size: 1.2rem;
  }
}
.version-status {
  font-weight: bold;
  color: #B4D3E7;
  text-align: center;
  &.in-dev {
    color: #DEDEDE;
  }
}
.version-date,
.version-about {
  color: #666;
  a {
    text-decoration: underline;
    color: inherit;
  }
}
.version-about {
  grid-area: about;
}
              
            
!

JS

              
                
              
            
!
999px

Console