Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource


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


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.


Auto Save

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.


                <div class="container">
  <article class="card">
    <h1 class="card-title">What is Lorem Ipsum?</h1>
    <p class="card-description">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

  <article class="card">
    <h1 class="card-title">Where does it come from and Why do we use it?</h1>
    <p class="card-description">Contrary to popular belief, Lorem Ipsum is not simply random text.</p>


  display grid
  grid-template-columns repeat(auto-fit, minmax(240px, 2fr))
  grid-gap 2rem
  max-width 800px
  margin 20px auto 

  padding 2rem
  border 1px solid #eee
  font-family serif

  font-size 2rem
  margin-bottom 20px
  /* The styles here are meant to truncate titles that are too long. The first line ensures long text doesn't overflow its container. The second one ensures we title gets truncated */
  overflow hidden
  white-space nowrap
  /* Then, we show the three dots if the title is too long to be readable */
  text-overflow ellipsis
  font-size 1.3em
  line-height 140%
   /* Here's where the line-clamp magic begins. First, we need to hide the content that overflows our desired number of text lines to show */
  overflow hidden
  /* Then, we use the old implementation of Flexbox on the paragraph and set its direction to be row */
  display -webkit-box
  -webkit-box-orient vertical
  /* Finally, we set the desired number of lines we want to show */
  -webkit-line-clamp 3