#overlay {
  display:none;
  background-color:rgba(0, 0, 0, 0.1);
  position:fixed;
  z-index:100;
  left:0;
  top:0;
  width:100%;
  height:100%;
}
div.layer {
  display:none;
  position:fixed;
  z-index:101;
  margin-left:-30%;
  left:50%;
  top:15%;
  width:60%;
  min-width:300px;
  min-height:300px;
  padding:30px;
  background-color:#FFF;
  box-shadow: 0 0 20px 1px #888;
  &.small {
    margin-left:-15%;
    width:30%;
  }
}

#overlay {
  display:none;
  background-color:rgba(0, 0, 0, 0.1);
  position:fixed;
  z-index:100;
  left:0;
  top:0;
  width:100%;
  height:100%;
}
div.layer {
  display:none;
  position:fixed;
  z-index:101;
  margin-left:-30%;
  left:50%;
  top:15%;
  width:60%;
  min-width:400px;
  min-height:300px;
  padding:30px;
  background-color:#FFF;
  box-shadow: 0 0 20px 1px #888;
  &.small {
    margin-left:-15%;
    width:30%;
  }
}

Fix display of overlay on small window
Fix display of overlay on small window
