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.

              @import "compass/css3";

// Define some screen sizes for media queries
$phone:        320px;
$phone-wide:   500px;
$tablet:       600px;
$large-screen: 992px;

@mixin at-least($device-width) {
  @media screen and (min-width: $device-width) {

@mixin until($device-width) {
  @media screen and (max-width: $device-width - 1) {

.mq-test {
  color: #fff;
  text-shadow: #000 0 1px 1px;
  font-family: Helvetica, Arial, sans;
  text-align: center;
  &:before, &:after { display: block; padding: .5em; }
  @include transition(all .3s ease-in-out);

  background: #aaa;
  @include at-least($phone) {
    background: orange;
    &:before { content: "screen is >= #{$phone}"; }
  @include at-least($phone-wide) {
    background: green;
    &:before { content: "screen is >= #{$phone-wide}"; }
  @include at-least($tablet) {
    background: red;
    &:before { content: "screen is >= #{$tablet}"; }
  @include at-least($large-screen) {
    background: blue;
    &:before { content: "screen is >= #{$large-screen}"; }
  margin: 25px auto;
  @include until($tablet){
    margin: 0 auto;
    &:after { content: "screen is < #{$tablet}"; }
  width: 200px; height: 100px;
  @include until($phone-wide){
    width: 100px; height: 200px;
    &:after { content: "screen is < #{$phone-wide}"; }
Loading ..................