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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

              <div class="site-main">
  <div class="container">
    <div class="content">
      <h1>Sass Media Query Helper for Designers</h1>
      <p>A configurable design helper that displays the current min-width media query in the bottom right corner of your screen and updates as you re-size the browser window. When designing, you'll know exactly which media query you can add styles to when things start to look weird.</p>
      <p><a href="http://joshfry.me/notes/sass-media-query-helper-for-designers/" target="_blank">Read my blog post &rarr;</a></p>
              @import "bourbon";

// -------------------------------------------
// Sass Media Query Helper for Designers
// -------------------------------------------

$max-width: em(1200);
$show_media_queries: true;

@mixin media-query-helper {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 9999;
  padding: .5em .75em;
  font-family: monospace;
  font-size: 1.125em;
  line-height: 1;
  color: #20D832;
  background: rgba(0,0,0,.8);

@if $show_media_queries == true {

  $starting-at: 30em;
  $increment-by: 5em;

  $min: floor($starting-at/$increment-by);
  $max: floor($max-width/$increment-by);

  body {
    &:before {
      @include media-query-helper;

      @for $i from $min through $max {
        @media screen and (min-width: #{$i * $increment-by}) {
          content: "@include media(#{$i * $increment-by})";

// -------------------------------------------
// Demo styles
// -------------------------------------------

body {
  background: #eee;
  color: #444;
  line-height: 1.5;

.site-main {
  padding: 7% 0;

.content {
  max-width: 42em;

h1 {
  margin: 0 0 .5em;
  line-height: 1;
  color: #27ae60;

p {
  margin: 0 0 1em;

.container {
  max-width: $max-width;
  margin: 0 auto;
  padding-left: 7.5%;
  padding-right: 7.5%;

  @media screen and (min-width: 65em) {
    padding-left: 1.5em;
    padding-right: 1.5em;

  @media screen and (min-width: $max-width+1em*3) {
    padding-left: 0;
    padding-right: 0;

Loading ..................