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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 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.

HTML

              
                <div class="wrapper">
  <h1>Fragmentation In Multicol: break-inside</h1>
  <p>Investigating which properties are supported for multicol, and also whether feature queries correctly indicate support. The target in all of these is the bordered box.</p>
  <section class="avoid">
    <h2>break-inside: avoid</h2>
    <p class="note">The box should not break between columns 1 and 2</p>

    <div class="supports"></div>

    <div class="container">
      <p>But almost before the invention of the hot-air balloon had been completed, and before Pilâtre de Rozier had made his ascent, a rival craft had appeared upon the scene, to which we must more specially refer in the next chapter.</p>
<div class="target">
      <p>This box should not break between two columns.</p> 
 </div>

      <p>During the time of which we are speaking there was living in London a famous chemist named Henry Cavendish. He was the son of a nobleman, and a very rich man; but he shut himself up entirely from the world, and devoted his whole time and energies
        to the study of science. So afraid was he of being interrupted in his work that he lived the life of a hermit, commanding his servants to keep out of his sight on pain of dismissal, and ordering his dinner daily by means of a note placed on the
        hall table. In the year 1760—twenty-two years before the Montgolfier brothers began their experiments—this eccentric man had discovered what was then known as “inflammable air,” but what we now call hydrogen gas.</p>

    </div>
  </section>

  <section class="avoid-column">
    <h2>break-inside: avoid-column</h2>
      <p class="note">The box should not break between columns 1 and 2</p>
    <div class="supports"></div>

    <div class="container">
      <p>But almost before the invention of the hot-air balloon had been completed, and before Pilâtre de Rozier had made his ascent, a rival craft had appeared upon the scene, to which we must more specially refer in the next chapter.</p>

      <div class="target">
      <p>This box should not break between two columns.</p> 
 </div>

      <p>During the time of which we are speaking there was living in London a famous chemist named Henry Cavendish. He was the son of a nobleman, and a very rich man; but he shut himself up entirely from the world, and devoted his whole time and energies
        to the study of science. So afraid was he of being interrupted in his work that he lived the life of a hermit, commanding his servants to keep out of his sight on pain of dismissal, and ordering his dinner daily by means of a note placed on the
        hall table. In the year 1760—twenty-two years before the Montgolfier brothers began their experiments—this eccentric man had discovered what was then known as “inflammable air,” but what we now call hydrogen gas.</p>

    </div>
  </section>

 
  
   <section class="avoid-webkit">
    <h2>-webkit-column-break-inside: avoid</h2>
         <p class="note">The box should not break between columns 1 and 2</p>
    <div class="supports"></div>

    <div class="container">
      <p>But almost before the invention of the hot-air balloon had been completed, and before Pilâtre de Rozier had made his ascent, a rival craft had appeared upon the scene, to which we must more specially refer in the next chapter. </p>

      <div class="target">
      <p>This box should not break between two columns.</p> 
 </div>

      <p>During the time of which we are speaking there was living in London a famous chemist named Henry Cavendish. He was the son of a nobleman, and a very rich man; but he shut himself up entirely from the world, and devoted his whole time and energies
        to the study of science. So afraid was he of being interrupted in his work that he lived the life of a hermit, commanding his servants to keep out of his sight on pain of dismissal, and ordering his dinner daily by means of a note placed on the
        hall table. In the year 1760—twenty-two years before the Montgolfier brothers began their experiments—this eccentric man had discovered what was then known as “inflammable air,” but what we now call hydrogen gas.</p>

    </div>
  </section>
  
   
  <section class="avoid-page">
    <h2>page-break-inside: avoid</h2>
      <p class="note">The box should not break between columns 1 and 2 in browsers that have implemented page-break-inside for multicol.</p>
    <div class="supports"></div>

    <div class="container">
      <p>But almost before the invention of the hot-air balloon had been completed, and before Pilâtre de Rozier had made his ascent, a rival craft had appeared upon the scene, to which we must more specially refer in the next chapter. </p>

     <div class="target">
      <p>This box should not break between two columns.</p> 
 </div>

      <p>During the time of which we are speaking there was living in London a famous chemist named Henry Cavendish. He was the son of a nobleman, and a very rich man; but he shut himself up entirely from the world, and devoted his whole time and energies
        to the study of science. So afraid was he of being interrupted in his work that he lived the life of a hermit, commanding his servants to keep out of his sight on pain of dismissal, and ordering his dinner daily by means of a note placed on the
        hall table. In the year 1760—twenty-two years before the Montgolfier brothers began their experiments—this eccentric man had discovered what was then known as “inflammable air,” but what we now call hydrogen gas.</p>

    </div>
  </section>
  
</div>
              
            
!

CSS

              
                body {
  padding: 2em;
  font: 16px/1.5 'Open Sans', sans-serif;
  color: #333;
}

.note {
  font-size: 85%;
}

section {
  border-top: 1px solid #ccc;
  margin-bottom: 2em;
  padding-bottom: 2em;
}

.wrapper {
  width: 800px;
  margin: 0 auto;
}

.target {
  font: 26px 'Berkshire Swash', cursive;
  border: 5px solid #ccc;
  padding: 0 20px;
}

.container {
  column-width: 250px;
  column-gap: 25px;
}

.avoid .target {
  break-inside: avoid;
}

.avoid-column .target {
  break-inside: avoid-column;
}

.avoid-webkit .target {
  -webkit-column-break-inside: avoid;
}

.avoid-page .target {
  page-break-inside: avoid;
}

.supports {
  padding: .5em;
  width: 800px;
  margin: 2em auto;
  border: 1px solid red;
}

.supports::after{
  content: "Feature Queries says NO"
}

@supports (break-inside: avoid) {
  .avoid .supports {
    border: 1px solid green;
  }
  
  .avoid .supports::after {
    content: "Feature Queries says YES"
  }
}

@supports (break-inside: avoid-column) {
  .avoid-column .supports {
    border: 1px solid green;
  }
  
  .avoid-column .supports::after {
    content: "Feature Queries says YES"
  }
}

@supports (break-inside: column) {
  .column .supports {
    border: 1px solid green;
  }
  
  .column .supports::after {
    content: "Feature Queries says YES"
  }
}

@supports (break-inside: always) {
  .always .supports {
    border: 1px solid green;
  }
  
  .always .supports::after {
    content: "Feature Queries says YES"
  }
}

@supports (-webkit-column-break-inside: avoid) {
  .avoid-webkit .supports {
    border: 1px solid green;
  }
  
  .avoid-webkit .supports::after {
    content: "Feature Queries says YES"
  }
}

@supports (-webkit-column-break-inside: always) {
  .always-webkit .supports {
    border: 1px solid green;
  }
  
  .always-webkit .supports::after {
    content: "Feature Queries says YES"
  }
}

@supports (page-break-inside: avoid) {
  .avoid-page .supports {
    border: 1px solid green;
  }
  
  .avoid-page .supports::after {
    content: "Feature Queries says YES"
  }
}

@supports (page-break-inside: always) {
  .always-page .supports {
    border: 1px solid green;
  }
  
  .always-page .supports::after {
    content: "Feature Queries says YES"
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console