css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="progress-bar"></div>
<h1 class="post-title">A Tremendous Post Title</h1>
<p class="post-entry"><strong>June 11th, 2018 by Writerton McWriterpants</strong></p>
<h2 class="post-subtitle">An Inspiring Subtitle</h2>
<p><img class="featured-image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-1/cherry-blossoms-unsplash.jpg" alt="cherry blossoms"></p>
<div class="post-content">
  <p>Spring has sprung! In this tremendous blog article we're going to cover some points. This is where I'm telling you that what I'm going to tell you. Then I'm going to tell you those things. Then, because your special, and I'm to tell you what I told you. <strong>Here comes a blockquote:</strong></p>
</div>
<blockquote>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis fringilla dolor, a sollicitudin turpis posuere elementum.</p>
</blockquote>
<div class="post-content">
  <p>That quote was from the famous latin composer... nope, just kidding. Emmet generated it because that's a feature that it has. In the next section, we're really going to get into the meat of this blog post.</p>
  <h3>All the Good Stuff is in These Paragraphs</h3>
  <p><em>Donec accumsan lacinia blandit</em>. Nunc ornare ante id sapien ullamcorper sollicitudin. Vestibulum vel odio sapien. Nam quis est maximus, cursus nibh at, dictum lorem. Donec vestibulum quam quis lorem egestas semper. Nullam et congue libero, a ultricies urna. Vivamus sed efficitur nisl. Fusce dapibus, lectus vel laoreet mattis, quam tellus fermentum diam, et luctus sem tortor in lorem. Nunc interdum ipsum ligula. Pellentesque sed diam erat.</p>
  <p>Aliquam porta metus nec erat ullamcorper accumsan. Etiam egestas sit amet ante vitae lacinia. Donec ultricies eu nisl vel mattis. Suspendisse vestibulum sed velit lacinia imperdiet. Vivamus in nibh ullamcorper, laoreet arcu ut, gravida nulla. Curabitur in diam tempus, cursus mauris a, posuere tellus. Pellentesque purus orci, commodo non ex eu, porttitor sagittis erat. Vestibulum at orci nec turpis pharetra imperdiet quis ut urna. Donec eget accumsan tortor. In interdum mauris at velit gravida, in euismod lacus sodales. Curabitur pellentesque nunc nulla, id convallis enim eleifend vel.</p>
  <p>Vivamus mollis fringilla dolor, a sollicitudin turpis posuere elementum. Quisque risus dolor, rhoncus sed imperdiet vel, tristique ac nisi. Sed dapibus aliquam nibh, at posuere dolor lobortis ac. Nam quis urna ac magna facilisis blandit. Maecenas vel arcu nec ipsum venenatis malesuada. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam semper ac sem at interdum. Ut massa est, egestas id sem at, commodo consequat velit.</p>
  <h3>Some Key Takeaways</h3>
  <p>After reading this tremendous blog article, these are the salient points:</p>
  <ul>
  <li>A bullet point</li>
  <li>Another one
  <ol>
  <li>Sub point one</li>
  <li>Sub point two</li>
  </ol>
  </li>
  <li>Another one</li>
  <li>How about four?</li>
  </ul>
  <p>In a pellentesque eros. Morbi elementum venenatis est quis cursus. Nunc vitae mi maximus, volutpat enim nec, ultricies libero. Donec pharetra dui arcu, vel sagittis dolor scelerisque nec!</p>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Crimson+Text:400,400i|Work+Sans:300,500');

$bg: #fefefe;
$black: #181a1c;
$gray: #a29a97;
$red: #f46767;

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

body {
  font-family: 'Work Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.7;
  color: $black;
  padding: 1rem;
  background: $bg;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, blockquote {
  font-family: 'Crimson Text', serif;
}

h1, h2, h3 {
  margin: 2rem 0;
}

h1 {
  font-size: 3.75rem;
  line-height: 1.3;
  text-align: center;
  margin: 2rem 0 0.5rem 0;
}

h2, h3 {
  margin: 1rem 0 1rem 0;
}

h2 {
  font-size: 2.625rem;
  text-align: center;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin: 0 0 1.5rem 0;
  strong {
    font-weight: 500;
  }
}

em {
  font-style: italic;
}

.post-content {
  max-width: 50rem;
  width: 100%;
  margin: 0 auto;
}

.post-entry {
  font-size: 0.9375rem;
  letter-spacing: 0.125rem;
  color: $gray;
  text-transform: uppercase;
  text-align: center;
}

blockquote {
  font-family: 'Crimson Text', serif;
  font-size: 2.5rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  margin: 2rem 0;
}

p:nth-of-type(2), blockquote p {
  max-width: 60rem;
  margin: 0 auto;
}

img {
  width: 100%;
  height: 40.63rem;
  vertical-align: middle;
  margin: 1.5rem 0 3rem 0;
}

ul {
  margin: 0 0 1.5rem 0;
}

ol {
  list-style: decimal;
}

ul {
  list-style: disc;
  li {
    margin: 0 0 0 1.5rem;
    padding: 0 0 0 0.75rem;
  }
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 0.375rem;
  background: $red;
  box-shadow: 0 0 0.0625rem $red,0 0 0.25rem $red;
}

@media (max-width: 40rem) {
  h1, h2, h3 {
    line-height: 1.1;
  }
  
  img {
    height: auto;
  }
}
            
          
!
            
              const scrolling = document.querySelector('.progress-bar');

function scrollingFill() {
  const scrollingWidth = (window.scrollY / (document.body.clientHeight - window.innerHeight)) * 100;
  scrolling.style.width = `${scrollingWidth}%`;
}

window.addEventListener('scroll', scrollingFill);
            
          
!
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