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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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="portrait">
	<div class="structure">
		<div class="roof">
		</div>
		<div class="chimney">
		</div>
		<div class="gutter">
		</div>
		<div class="window-container">
			<div class="window-upper">
				<div class="sill">
				</div>
			</div>
			<div class="window-upper">
				<div class="sill">
				</div>
			</div>
			<div class="window-upper">
				<div class="sill">
				</div>
			</div>
		</div>
		<div class="porch">
			<div class="window">
			</div>
			<div class="window">
			</div>
			<div class="door">
				<div class="door-inner">
				</div>
				<div class="door-inner">
				</div>
			</div>
		</div>
		<div class="porch-columns">
			<div class="column">
			</div>
			<div class="column">
			</div>
			<div class="column">
			</div>
			<div class="column">
			</div>
		</div>
		<div class="footing">
			<div class="trellis">
			</div>
			<div class="trellis">
			</div>
			<div class="trellis">
			</div>
		</div>
	</div>
	<div class="ocean">
	</div>
	<div class="ground">
	</div>
</div>
            
          
!
            
              // color palette

$apricot: #e6a06f;
$gurkha: #9E9C71;
$viridian: #5E8271;
$spruce: #33454E;
$ebony: #242739;

$black: #000;
$white: #fff;

@mixin crossbars {
	&:before {
		background-color: darken($white, 10);
		content: '';
		position: absolute;
		width: 100%;
		height: 1px;
		top: 50%;
	}
	
	&:after {
		background-color: darken($white, 10);
		content: '';
		position: absolute;
		width: 100%;
		height: 1px;
		top: 56%;
	}	
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	background-color: #fafdff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='199' viewBox='0 0 100 199'%3E%3Cg fill='%23242739' fill-opacity='0.4'%3E%3Cpath d='M0 199V0h1v1.99L100 199h-1.12L1 4.22V199H0zM100 2h-.12l-1-2H100v2z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
}

.ground {
	background-color: $viridian;
	bottom: 0;
	position: absolute;
	width: 450px;
	height: 160px;
}

.ocean {
	background-color: lighten($spruce, 15);
background-image: url("data:image/svg+xml,%3Csvg width='100' height='20' viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.184 20c.357-.13.72-.264 1.088-.402l1.768-.661C33.64 15.347 39.647 14 50 14c10.271 0 15.362 1.222 24.629 4.928.955.383 1.869.74 2.75 1.072h6.225c-2.51-.73-5.139-1.691-8.233-2.928C65.888 13.278 60.562 12 50 12c-10.626 0-16.855 1.397-26.66 5.063l-1.767.662c-2.475.923-4.66 1.674-6.724 2.275h6.335zm0-20C13.258 2.892 8.077 4 0 4V2c5.744 0 9.951-.574 14.85-2h6.334zM77.38 0C85.239 2.966 90.502 4 100 4V2c-6.842 0-11.386-.542-16.396-2h-6.225zM0 14c8.44 0 13.718-1.21 22.272-4.402l1.768-.661C33.64 5.347 39.647 4 50 4c10.271 0 15.362 1.222 24.629 4.928C84.112 12.722 89.438 14 100 14v-2c-10.271 0-15.362-1.222-24.629-4.928C65.888 3.278 60.562 2 50 2 39.374 2 33.145 3.397 23.34 7.063l-1.767.662C13.223 10.84 8.163 12 0 12v2z' fill='%23759db1' fill-opacity='0.2' fill-rule='evenodd'/%3E%3C/svg%3E");
	bottom: 160px;
	position: absolute;
	width: 450px;
	height: 50px;
}

.portrait {
	background-color: lighten($spruce, 50);
	border: 5px solid lighten($ebony, 40);
	border-radius: 50%;
	box-shadow: 0px 0px 100px 10px rgba($spruce, 0.2) inset;
	margin: 50px auto;
	overflow: hidden;
	position: relative;
	width: 450px;
	height: 450px;
}

.structure {
	background-color: desaturate(darken($apricot, 2), 2);
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='24' viewBox='0 0 12 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c37b48' fill-opacity='0.2'%3E%3Cpath d='M2 0h2v12H2V0zm1 20c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM9 8c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-1 4h2v12H8V12z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	box-shadow: 0px 0px 100px 10px rgba($black, 0.15);
	border: 2px solid $gurkha;
	width: 150px;
	height: 170px;
	margin: 0 auto;
	left: 0;
	right: 0;
	top: 30%;
	position: absolute;
	z-index: 10;
}

$roof-height: 40px;

.roof {
	border-bottom: $roof-height solid desaturate($gurkha, 10);
	border-left: ($roof-height / 1.2) solid transparent;
	border-right: ($roof-height / 1.2) solid transparent;
	height: 0;
	width: 160px;
	top: -($roof-height + 2px);
	left: -7px;
	position: absolute;
	z-index: 2;
	
	&:before {
		background-color: $gurkha;
		border: 1px solid darken($gurkha, 5%);
		content: '';
		position: absolute;
		width: 94px;
		height: 4px;
		left: -1px;
		top: -4px;
	}
	
	&:after {
		background-color: $gurkha;
		border: 1px solid darken($gurkha, 5%);
		content: '';
		position: absolute;
		width: 160px;
		height: 4px;
		bottom: -41px;
		left: -34px;
	}
}

.chimney {
	background-color: darken($apricot, 5);
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='24' viewBox='0 0 12 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c37b48' fill-opacity='0.2'%3E%3Cpath d='M2 0h2v12H2V0zm1 20c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM9 8c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm-1 4h2v12H8V12z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	border-top: 2px solid darken($apricot, 20);
	position: absolute;
	left: 4px;
	width: 16px;
	height: 60px;
	top: -60px;
	
	&:before {
		background-color: darken($apricot, 10);
		content: '';
		position: absolute;
		width: 18px;
		height: 8px;
		left: -1px
	}
}

.gutter {	
	background-color: $viridian;
	background-image: 
		linear-gradient(
			90deg, 
			transparent 50%, 
			rgba(255,255,255,.2) 50%);
	background-size: 6px 6px;
	border-top: 2px solid darken($viridian, 10);
	border-bottom: 2px solid darken($viridian, 10);
	height: 16px;
	left: 0;
	right: 0;
	top: 0;
	margin: -2px;
	position: absolute;
	width: 150px;
}

.window-container {
	background-color: transparent;
	position: absolute; 
	left: 0;
	right: 0;
	top: 14px;
	margin: 0 auto;
	width: 140px;
	height: 60px;
	display: flex;
	align-items: flex-end;
	justify-content: space-around;
}

.window-upper {
	position: relative;
	margin-bottom: 6px;
	width: 18px;
	height: 40px;
	background-color: lighten($ebony, 40);
	border: 2px solid darken($white, 10);
	box-shadow: 0px 0px 1px 0px $ebony inset,0px 0px 1px 0px;
		
	@include crossbars;
}

.sill {
	background-color: darken($white, 5);
	border: 1px solid darken($white, 10);
	box-shadow: 0px 0px 1px 0px;
	position: absolute;
	width: 20px;
	height: 4px;
	left: -3px;
	top: -6px;
	
	&:before {
		content: '';
		background-color: darken($white, 5);
		border: 1px solid darken($white, 10);
		box-shadow: 0px 0px 1px 0px;
		width: 4px;
		height: 4px;
		left: 6px;
		bottom: -1px;
		position: absolute;
	}
	
	&:after {
		content: '';
		background-color: darken($white, 5);
		border: 1px solid darken($white, 10);
		box-shadow: 0px 0px 1px 0px;
		position: absolute;
		width: 20px;
		height: 2px;
		left: -2px;
		bottom: -45px;	
	}
}

$porch-width: 140px;
$porch-height: 80px;

.porch-columns {
	display: flex;
	height: $porch-height;
	align-items: flex-end;
	justify-content: space-between;
	bottom: 12px;	
	margin: 0 auto;
	padding: 0 2px;
	right: 0;
	left: 0;
	position: absolute;
	width: $porch-width;
	z-index: 2;
}

.column {
	background-color: darken($white, 5);
	border: 1px solid darken($white, 15);
	width: 5px;
	height: 71px;
	position: relative;
	
	&:before {
		background-color: darken($white, 10);
		border: 1px solid darken($white, 15);
		content: '';
		position: absolute;
		top: -1px;
		left: -2px;
		width: 5px;
		height: 3px;
	}
	
	&:after {
		background-color: darken($white, 12);
		border: 1px solid darken($white, 15);
		content: '';
		position: absolute;
		bottom: -1px;
		left: -2px;
		width: 5px;
		height: 3px;
	}
}

.porch {	
	border-top: 3px solid lighten(desaturate($gurkha, 20), 15);
	bottom: 12px;
	display: flex;
	height: $porch-height;
	align-items: flex-end;
	justify-content: space-around;
	margin: 0 auto;
	right: 0;
	left: 0;
	position: absolute;
	width: $porch-width;
	z-index: 1;
	
	&:before {
		background-color: lighten($gurkha, 20);
		border: 1px solid $gurkha;
		content: '';
		width: 138px;
		height: 4px;
		position: absolute;
		top: 0;
	}
	
	&:after {
		background-color: $gurkha;
		content: '';
		width: 150px;
		height: 3px;
		position: absolute;
	}
}

.window {
	background-color: lighten($ebony, 40);
	border: 2px solid darken($white, 10);
	border-top-width: 10px;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	box-shadow: 0px 0px 1px 0px $ebony inset,0px 0px 1px 0px darken($apricot, 50);
	margin-left: 9px;
	position: relative;
	width: 18px;
	height: 65px;
	z-index: 2;
	
	@include crossbars;
}

.door {
	background-color: lighten($ebony, 30);
	border: 2px solid darken($white, 10);
	border-bottom-width: 0px;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	box-shadow: 0px 0px 1px 0px darken($apricot, 50);
	display: flex;
	justify-content: center;
	width: 36px;
	height: 65px;
	z-index: 2;
	
	&:before {
		background-color: darken($white, 10);
		content: '';
		position: absolute;
		width: 30px;
		height: 4px;
		top: 22px;
	}
	&:after {
		background-color: darken($white, 10);
		content: '';
		position: absolute;
		width: 4px;
		height: 8px;
		top: 14px;
	}
}

.door-inner {
	background-color: lighten($ebony, 40);
	border: 2px solid darken($white, 10);
	box-shadow: 0px 0px 1px 0px $ebony inset,0px 0px 1px 0px darken($apricot, 50);
	margin-top: 12px;
	position: relative;
	height: 50px;
	width: calc(50% - 1px);
	
	@include crossbars;
}

.footing {
	background-color: desaturate($gurkha, 15);
	border-top: 3px solid darken(desaturate($gurkha, 15), 10);
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0 -2px -2px;
	width: 150px;
	height: 14px;
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: space-around;
}

.trellis {
	background-color: darken($white, 10);
	box-shadow: 0px 1px 1px 1px rgba($ebony, 0.7) inset;
	width: 24%;
	height: 9px;
	
	&:last-of-type {
		background-color: transparent;
		box-shadow: none;
	}
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console