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>MQ-less</h1>
<p>Original idea from <a href="https://medium.com/@hteumeuleu">Rémi Parmentier</a> (I'm just duplicating styles one level up), see:</p>
<ul>
  <li>
    <a href="https://medium.freecodecamp.com/the-fab-four-technique-to-create-responsive-emails-without-media-queries-baf11fdfa848#.vuk56496i">The Fab Four technique to create Responsive Emails without Media Queries</a>
  </li>
  <li>
    <a href="http://www.hteumeuleu.fr/wp-content/uploads/2016/02/cq-usecases.html">Element Queries with calc(), width, min-width and max-width</a>
  </li>
</ul>
<p>A convention could be to write the 3 declarations in this order (to help understand which value will be applied in relation to the "BP"):</p>
<pre>
  min-width: /* value to be used above the "breakpoint" */
  width:     /* calc() func containing the "breakpoint" */
  max-width: /* value to be used below the "breakpoint" */
</pre>

<!-- markup from http://www.hteumeuleu.fr/wp-content/uploads/2016/02/cq-usecases.html -->
<div class="grid">
  <div class="column">
    <div class="media">
      <div class="media-img">
        <img src="https://placeholdit.imgix.net/~text?w=130&h=90" alt="" />
      </div>
      <div class="media-body">
        <h1>Lorem Ipsum Dolor Sit Amet</h1>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero corporis quia eos temporibus.
        </p>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="media">
      <div class="media-img">
        <img src="https://placeholdit.imgix.net/~text?w=130&h=90" alt="" />
      </div>
      <div class="media-body">
        <h1>Lorem Ipsum Dolor Sit Amet</h1>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero corporis quia eos temporibus.
        </p>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="media">
      <div class="media-img">
        <img src="https://placeholdit.imgix.net/~text?w=130&h=90" alt="" />
      </div>
      <div class="media-body">
        <h1>Lorem Ipsum Dolor Sit Amet</h1>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero corporis quia eos temporibus.
        </p>
      </div>
    </div>
  </div>
  <div class="column">
    <div class="media">
      <div class="media-img">
        <img src="https://placeholdit.imgix.net/~text?w=130&h=90" alt="" />
      </div>
      <div class="media-body">
        <h1>Lorem Ipsum Dolor Sit Amet</h1>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero corporis quia eos temporibus.
        </p>
      </div>
    </div>
  </div>
</div>
            
          
!
            
              /* 99.99% CSS from http://www.hteumeuleu.fr/wp-content/uploads/2016/02/cq-usecases.html */

body {
  font: 1em/1.25 sans-serif;
  background: #fff;
}

.title,
.intro {
  margin: 0;
  padding: 5px 5px 0;
}

.title small {
  font-size: 0.5em;
  font-weight: normal;
  color: #aaa;
}

.grid {
  margin-top: 20px;
  font-size: 0;
  text-align: center;
}

.column {
  display: inline-block;
  vertical-align: top;
  min-width: 25%;  /* value to use above 900px */
  width: calc((900px - 100%) * 900); /* 900px "breakpoint" */
  max-width: 100%; /* value to use below 900px */
  text-align: left;
  padding: 5px;
  box-sizing: border-box;
}

.media {
  padding: 0 0 10px;
  font-size: 0;
  background: #fbfbfb;
  border: 1px solid #cfcfcf;
}

.media img {
  display: block;
  width: 100%;
  height: auto;
}

.media h1 {
  margin: 0 0 10px;
  font-size: 1.125rem;
}

.media p {
  margin: 0;
  font-size: 1rem;
}

.media-body,
.media-img {
  display: inline-block;
  min-width: 50%; /* value to use above 400px */
  width: calc((400px - 100%) * 400); /* 400px "breakpoint" */
  max-width: 100%; /* value to use below 400px */
  vertical-align: top;
  padding: 10px 10px 0;
  box-sizing: border-box;
}
            
          
!
999px
Loading ..................

Console