cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - 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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <h1>Container Queries with <a href=https://tomhodgins.github.io/reprocss>reproCSS</a></h1>

<section class=waterfall>
  <aside>
    <img src=https://staticresource.s3.amazonaws.com/user.png>
    <h2>Headline</h2>
    <h3>Subheadline goes here</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
  </aside>
  <aside>
    <img src=https://staticresource.s3.amazonaws.com/user.png>
    <h2>Headline</h2>
    <h3>Subheadline goes here</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
  </aside>
  <aside>
    <img src=https://staticresource.s3.amazonaws.com/user.png>
    <h2>Headline</h2>
    <h3>Subheadline goes here</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
  </aside>
  <aside>
    <img src=https://staticresource.s3.amazonaws.com/user.png>
    <h2>Headline</h2>
    <h3>Subheadline goes here</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
  </aside>
</section>

<footer>Built with <a href=https://tomhodgins.github.io/reprocss/>reproCSS</a></footer>

<script>
  var narrow = 'this.offsetWidth < 200'
  var wide = 'this.offsetWidth > 600'
</script>

<style process=auto>
  .waterfall,
  .waterfall * {
    box-sizing: border-box;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-kerning: auto;
  }
  .waterfall {
    color: #333;
    font-size: 10pt;
    line-height: 1.4;
    font-weight: 400;
    font-family: 'Source Sans Pro', sans-serif;
    -webkit-text-size-adjust: 100%;
  }
  .waterfall aside {
    padding: 1em;
  }
  .waterfall aside:nth-child(even) {
    background: rgba(0,0,0,.1)
  }
  .waterfall aside:after {
    content: '';
    display: block;
    clear: both;
  }
  .waterfall h2,
  .waterfall h3 {
    color: #555;
    font-family: 'Fira Sans', sans-serif;
    margin: 0 auto;
    letter-spacing: -.02em;
    line-height: 1.2;
    text-align: center;
  }
  .waterfall h2 {
    font-size: 240%;
    font-weight: 700;
  }
  .waterfall h3 {
    font-size: 180%;
    font-weight: 400;
  }
  .waterfall img {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 1em auto;
    border-radius: 100%;
  }
  .waterfall p {
    color: #333;
    font-size: 120%;
    margin: .5em 0;
  }

  /* narrow: .waterfall < 200 */
  ${container('.waterfall', narrow, 'h2, h3, p', `
    text-align: center;
  `)}
  ${container('.waterfall', narrow, 'h2', `
    font-size: 200%;
  `)}
  ${container('.waterfall', narrow, 'h3', `
    font-size: 140%;
  `)}
  ${container('.waterfall', narrow, 'p', `
    font-size: 100%;
  `)}

  /* wide: .waterfall > 600px */
  ${container('.waterfall', wide, 'h2', `
    font-size: 280%;
    text-align: left;
  `)}
  ${container('.waterfall', wide, 'h3', `
    font-size: 220%;
    text-align: left;
  `)}
  ${container('.waterfall', wide, 'p', `
    font-size: 140%;
  `)}
  ${container('.waterfall', wide, 'img', `
    float: left;
    margin: 0 2em 0 0;
  `)}
  ${container('.waterfall', wide, 'aside', `
    margin: 2em 0;
    padding: 2em;
  `)}
  ${container('.waterfall', wide, 'aside:nth-child(even) img', `
    float: right;
    margin: 0 0 0 2em;
  `)}
</style>
            
          
!
999px
Loading ..................

Console