Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">  
  <title>Float with extra long title approach for I heart CSS calc() blog post</title>
</head>

<body>


  <main>

    <article class="comment">
      <div class="comment__author-picture ">
        <i class="fa fa-user"></i> 
      </div>
      <h3 class="comment__title">
        My great comment that deserves and extra long comment title with all of the extra important details
      </h3>
      <div class="comment__author-name-date">
        by Jane Marie Doe, Cheif Exective Officer and Founder, Unknown Industries Incorporated, on March 2, 2016
      </div>
      <div class="comment__content">
        <p>“Lorem Ipsum. Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum, nec sais sem.”</p>
      </div>
    </article>

  </main>

</body>

</html>
              
            
!

CSS

              
                @import "bourbon"
@import "neat"

$base-font-family: 'Open Sans', sans-serif
$base-font-color: #888
$base-font-size: 14px
$base-line-height: 1.6em

$medium-screen-up: new-breakpoint(min-width em(600px))

body
  padding: 20px
  color: $base-font-color
  font-family: $base-font-family
  font-size: $base-font-size
  line-height: $base-line-height

main
  max-width: 800px
  margin-right: auto
  margin-left: auto
  
.comment
  background: #EEE
  border: solid 1px #CCC
  padding: 20px

.comment__author-picture
  float: left
  display: inline
  width: 60px
  height: 60px
  margin-right: 20px
  margin-bottom: 0px
  background-color: #FFF
  border: solid 1px #CCC
  border-radius: 50%
  color: #CCC
  font-size: 40px
  line-height: 53px
  text-align: center

.comment__title
  margin-top: 8px
  margin-bottom: 3px
  color: #000
  font-size: 18px
  font-weight: normal

.comment__author-name-date
  margin-bottom: 20px
 
.comment__content
  clear: both
  @include media($medium-screen-up)
    width: calc(100% - 80px)
    margin-left: 80px

  

  
              
            
!

JS

              
                
              
            
!
999px

Console