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.

            
              // _settings.scss
$breakpoints: (
    large: 1024px,
    medium: 768px,
    small: 400px
);

// _mixins.scss
@mixin respond-to($breakpoint) { 
    @if map-has-key($breakpoints, $breakpoint) {
        @media (max-width: #{map-get($breakpoints, $breakpoint)}) { @content; }
    }
    @else {
        @warn "No value exists for this breakpoint."
            + "Please make sure it is defined in $breakpoints map.";
    }
}

html, body {
    height: 100%;
}

body {
    background: #F4E4C7;
    box-sizing: border-box;
    color: #4a4a4a;
    display: block;
    font-size: 40px;
    height: 100%;
    padding: 100px;
    text-align: center;
    width: 100%;
    
    /*
     * IMPORTANT
     * 
     * You must ensure that these are loaded in the correct resizing order
     * Otherwise it will not load the queries for that size
     */
    @include respond-to(large) {
        background: #CFDBF0;
    }
    @include respond-to(medium) {
        background: #F4E0EC;
    }
    @include respond-to(small) {
        background: #D4CECB;
    }
    
    span:after {
        content: " Large than 1024px";
        
        @include respond-to(large) {
            content: " 1024px";
        }
        @include respond-to(medium) {
            content: " 768px";
        }
        @include respond-to(small) {
            content: " 400px";
        }
    }
}
            
          
!
999px
Loading ..................

Console