cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              <header class="site-header">
  <h1 class="site-title">Entirely Div-less Blog</h1>
  <nav class="site-navigation">
    <ul class="menu site-menu">
      <li class="meni-item list-item site-menu__item"><a href="#article1" class="menu-link site-menu__link">Article 1</a></li>
      <li class="meni-item list-item site-menu__item"><a href="#article2" class="menu-link site-menu__link">Article 2</a></li>
      <li class="meni-item list-item site-menu__item"><a href="#article3" class="menu-link site-menu__link">Article 3</a></li>
    </ul>
  </nav>
</header>
<main class="site-main">
  <section class="articles__wrapper">
    <section class="articles" id="articles_july">
      <header class="article-section__header">
        <h2 class="title article-section__title">July</h2>
      </header>
      <article class="article" id="article1">
        <header class="article__header">
          <h3 class="title article__title">Article 1</h3>
        </header>
        <p class="article__content">Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat numquam repellendus molestias cumque, impedit corporis similique pariatur asperiores vero quae optio, totam possimus blanditiis facere atque dignissimos. Tenetur, sit incidunt!</p>
        <footer class="article__footer">
          <p class="article__publish-date">Published <time datetime="2018-07-06">July 6th, 2018</time></p>
        </footer>
      </article>
    </section>
    <section class="articles" id="articles_june">
      <header class="article-section__header">
        <h2 class="title article-section__title">June</h2>
      </header>
      <article class="article" id="article2">
        <header class="article__header">
          <h3 class="title article__title">Article 2</h3>
        </header>
        <p class="article__content">Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat numquam repellendus molestias cumque, impedit corporis similique pariatur asperiores vero quae optio, totam possimus blanditiis facere atque dignissimos. Tenetur, sit incidunt!</p>
        <footer class="article__footer">
          <p class="article__publish-date">Published <time datetime="2018-06-20">June 20th, 2018</time></p>
        </footer>
      </article>
    </section>
    <section class="articles" id="articles_may">
      <header class="article-section__header">
        <h2 class="title article-section__title">May</h2>
      </header>
      <article class="article" id="article3">
        <header class="article__header">
          <h3 class="title article__title">Article 3</h3>
        </header>
        <p class="article__content">Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat numquam repellendus molestias cumque, impedit corporis similique pariatur asperiores vero quae optio, totam possimus blanditiis facere atque dignissimos. Tenetur, sit incidunt!</p>
        <footer class="article__footer">
          <p class="article__publish-date">Published <time datetime="2018-05-01">May 1st, 2018</time></p>
        </footer>
      </article>
    </section>
  </section>
  <aside class="site-aside">
    <header class="aside-header">
      <h4 class="aside-title">Table of Contents</h4>
    </header>
    <nav class="toc-navigation">
      <ul class="menu toc-menu">
        <li class="menu-item list-item toc-menu__item"><a href="#articles_july" class="menu-link toc-menu__link">July</a></li>
        <li class="menu-item list-item toc-menu__item"><a href="#articles_june" class="menu-link toc-menu__link">June</a></li>
        <li class="menu-item list-item toc-menu__item"><a href="#articles_may" class="menu-link toc-menu__link">May</a></li>
      </ul>
    </nav>
  </aside>
</main>
<footer class="site-footer">
  <p class="site-footer__content">
    <span class="copy">&copy; Copy <time class="copy-date" datetime="2018">2018</time></span> <a href="http://danieljauch.com/" class="site-by-link">Daniel Jauch</a>
  </p>
</footer>
            
          
!
            
              // Vars
$black: #000
$white: #fff

$blue: #4285f4

$header-bg: #f8fafb
$body-bg: darken($header-bg, 10%)
$footer-bg: #2c3e50

$body-color: #2c3e50
$heading-color: darken($blue, 10%)
$link-color: darken($blue, 10%)

$theme-primary: $blue

$cubic: cubic-bezier(0.73, 0.2, 0.43, 1)

$default-weight: 400

$body-font: "Lato", arial, sans-serif
$heading-font: "Montserrat", arial, sans-serif

$space-unit: 0.5rem

$double-unit: $space-unit * 2

$heading-spacing: 0 0 $space-unit
$paragraph-spacing: 0 0 $space-unit

$base-font-unit: 16px

$small: 0.8rem

// Mixins
=space($padding: 0, $margin: 0 auto)
  padding: $padding
  margin: $margin

=spacer-with-border($direction, $spacer-width, $border-width, $border-color, $border-style: solid)
  padding-#{$direction}: $spacer-width
  border-#{$direction}: $border-width $border-style $border-color
  margin-#{$direction}: $spacer-width
  
=pseudo-list($padding: 0, $margin: 0)
  +space($padding, $margin)

  list-style-type: none

=inline-list($padding: 0, $margin: 0)
  +pseudo-list($padding, $margin)

  .list-item
    display: inline-block

=inline-flex
  display: inline-flex
  justify-content: space-between
  width: 100%

=inline-flex-list($padding: 0, $margin: 0)
  +pseudo-list($padding, $margin)
  +inline-flex

=inline-flex-item($width, $weight: 1, $shrink: 1)
  width: $width
  flex:
    basis: $width
    grow: $weight
    shrink: $shrink
    
// Tag resets
@-ms-viewport
  width: device-width

html
  -webkit-text-size-adjust: 100%
  -ms-text-size-adjust: 100%
  -ms-overflow-style: scrollbar
  -webkit-tap-highlight-color: transparent

body
  position: relative
  width: 100%
  min-height: 100vh
  margin: 0
  overflow: hidden
  overflow-y: auto
  background: $body-bg
  font:
    size: $base-font-unit
    family: $body-font
    weight: $default-weight

*, *:before, *:after
  box-sizing: border-box
  -webkit-font-smoothing: subpixel-antialiased
  -moz-osx-font-smoothing: grayscale
  -webkit-backface-visibility: hidden

*:focus
  outline: none

a
  color: $link-color
  background-color: transparent
  text-decoration: none
  -webkit-text-decoration-skip: objects
  transition:
    property: color
    duration: 0.2s
    timing-function: $cubic

  &:focus,
  &:hover,
  &:active
    color: darken($link-color, 10%)

  &:active
    background: transparent
  
div,
p,
span
  font-family: $body-font

p
  margin: $paragraph-spacing
  
h1,
h2,
h3,
h4
  color: $heading-color
  margin: $heading-spacing
  font:
    family: $heading-font
    weight: $default-weight

h1
  font-size: 2.5em

h2
  font-size: 2.25em

h3
  font-size: 2em

h4
  font-size: 1.8em
  
// Layout
.site-header
  +inline-flex
  +space(1rem, 0 0 $double-unit)
  
  background: $header-bg
  
.site-main
  +inline-flex
  +space($double-unit, 0 0 4rem)
  
.site-footer
  position: fixed
  bottom: 0
  right: 0
  width: 100vw
  color: rgba($white, 0.75)
  background-color: $footer-bg
  padding: $space-unit
  text-align: center
  
// Components
%bubble
  +space($double-unit, 0 0 $double-unit)
  
  background: $white
  border-radius: $space-unit

.site-menu
  +inline-list
    
  &__item
    padding-right: $double-unit
    
.articles
  @extend %bubble

  margin-right: $double-unit
  
.article
  &-section__header
    +spacer-with-border("bottom", $space-unit, 0.125rem, $theme-primary)
    
  &__publish-date
    color: rgba($black, 0.6)
    text-align: right
    font-size: $small
    
    
.site-aside
  @extend %bubble
  
.toc-menu
  +pseudo-list

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console