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 id="desktop">
  <div id="window">
  	<header>
      <ul id="window-buttons">
      	<li id="close-button"></li>
        <li id="minimize-button"></li>
        <li id="maximize-button"></li>
      </ul>
    </header>
    <section class="window-body">
    </section>
  </div>
</div>
            
          
!
            
              @import "compass/css3";

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

@mixin radial-gradient($color1, $color2) {
  background: -webkit-radial-gradient($color1, $color2); 
  background: -o-radial-gradient($color1, $color2); 
  background: -moz-radial-gradient($color1, $color2); 
  background: radial-gradient($color1, $color2);
}

@mixin abs-pos($top, $left, $bottom: null, $right: null) {
  position: absolute;
  top: $top;
  botttom: $bottom;
  @if $bottom {
    bottom: $bottom;
  }
  @if $right {
    right: $right;
  }
}

%background-center-cover {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
body, html {
  width: 100%;
  height: 100%;
}


#desktop {
  width: 100%;
  height: 100%;
  background-image: url(http://screenshots.en.sftcdn.net/en/scrn/86000/86268/mac-os-x-snow-leopard-wallpaper-3.jpg);
  @extend %background-center-cover;
}

#window {
  width: 80%;
  height: 50%;
  @include abs-pos(0,0);
  border: 1px solid #FFF;
  box-shadow: 0 0 3px 1px rgba(0, 0, 0, .6);
  border-radius: 5px;
  & > header {
    height: 2em;
    background-color: rgba(255, 255, 255, .85);
    & > ul > li {
      cursor: pointer;
    }
  }
  & > .window-body {
    background-color: #FFF;
    height: calc(100% - 2em);
  }
}
#window-buttons {
  float: left;
  margin: .625em 2%;
  & > li {
    margin: 0 .15em;
    height: .75em;
    width: .75em;
    border-radius: 50%;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6);
    float: left;
  }
}

#close-button {
  @include radial-gradient(darken(red, 10), lighten(red, 20));
}
#minimize-button {
  @include radial-gradient(orange, lighten(orange, 10));
}
#maximize-button {
  @include radial-gradient(lighten(green, 10),lighten(green, .9));
}
            
          
!
            
              var Window = (function(Wind, Head){
  var priv = {};
  
  var pub = {
    init: function() {
      Wind.draggable({ addClasses: false });
    }
  };
  
  
  
  return pub;
})($('#window'), $('#window > header'))

$(document).ready(function(){
  Window.init();
})
            
          
!
999px
Loading ..................

Console