Pen Settings

HTML

CSS

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

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                // Based on design by Patrick Moriarty https://dribbble.com/shots/4509062-Fleet-Foxes

.container
	.picture-grid
		.corner.corner-left
			.corner-triangle-dark
			.corner-triangle-dark
			.corner-triangle-striped
			.corner-quarter-circle
			.corner-circle
				.inner-circle
				.inner-circle
				.inner-circle
				.inner-circle
			.corner-star
				.star-triangle
				.star-triangle
		.corner.corner-right
			.corner-triangle-dark
			.corner-triangle-dark
			.corner-triangle-striped
			.corner-quarter-circle
			.corner-circle
				.inner-circle
				.inner-circle
				.inner-circle
				.inner-circle
			.corner-star
				.star-triangle
				.star-triangle
		.mountain-large
			.mountain-tip
		.mountain-small
			.mountain-tip
		.fox-tail
			.tail-tip
		.fox-ear-left
		.fox-ear-right
		// Face
		.fox-face-tophalf
			.eye-left
			.eye-right
		.fox-face-bottomhalf
			.snout
			.mouth
		.fox-torso
			.chest-fur
		.fox-stomach
			.stomach-fur
		// Feet
		.fox-backfoot.foot-left
		.fox-backfoot.foot-right
		.fox-frontfoot.foot-left
		.fox-frontfoot.foot-right
		
		each item in [4, 5, 6, 7, 8]
			.tree.left(class="triangle-"+item)
		.tree.middle.triangle-7
		.tree.middle.triangle-8
		each item in [4, 5, 6, 7, 8]
			.tree.right(class="triangle-"+item)
	.letter-grid
		each item in ['f', 'l', 'e', 'e', 't', 'f', 'o', 'x', 'e']
			.letters(class="letter-"+item)
		.letters.letter-s
			.s-middle
.link-container
	span Original artwork by 
	a(href='https://dribbble.com/shots/4509062-Fleet-Foxes' target='_blank') Patrick Moriarty
              
            
!

CSS

              
                $font-size: 9px; // Change to scale

// ------------- Colors --------------
$green-dark: #112f3a;
$green-light: #8fa8a5;
$orange: #a85f56;
$white: #ded7c5;

// ------------- Mixins --------------

// ---- Mixins: Shapes ----

// Circle
@mixin circle($diameter) {
	height: $diameter;
	width: $diameter;
	border-radius: 50%;
}

// Half circles
@mixin half-circle-pointed-left($diameter) {
	height: $diameter;
	width: $diameter/2;
	border-radius: ($diameter/2) 0 0 ($diameter/2);
}

@mixin half-circle-pointed-right($diameter) {
	height: $diameter;
	width: $diameter/2;
	border-radius: 0 ($diameter/2) ($diameter/2) 0;
}

// Isosceles triangle
@mixin isosceles-triangle($height, $width, $color) {
	border-bottom: solid $height $color;
	border-left: solid ($width/2) transparent;
	border-right: solid ($width/2) transparent;
}

@mixin isosceles-triangle-upsidedown($height, $width, $color) {
	border-top: solid $height $color;
	border-left: solid ($width/2) transparent;
	border-right: solid ($width/2) transparent;
}

@mixin isosceles-triangle-pointed-right($height, $width, $color) {
	border-left: solid $height $color;
	border-top: solid ($width/2) transparent;
	border-bottom: solid ($width/2) transparent;
}

@mixin isosceles-triangle-pointed-left($height, $width, $color) {
	border-right: solid $height $color;
	border-top: solid ($width/2) transparent;
	border-bottom: solid ($width/2) transparent;
}

// Right triangle
@mixin right-triangle($height, $width, $color) {
	border-bottom: solid $height $color;
	border-right: solid $width transparent;
}

@mixin right-triangle-upsidedown($height, $width, $color) {
	border-top: solid $height $color;
	border-right: solid $width transparent;
}

@mixin right-triangle-pointed-left($height, $width, $color) {
	border-bottom: solid $height $color;
	border-left: solid $width transparent;
}

@mixin right-triangle-upsidedown-pointed-left($height, $width, $color) {
	border-top: solid $height $color;
	border-left: solid $width transparent;
}

// ---- Mixins: Position ----

@mixin centerAbsolute() {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

@mixin absolute-horizontal-center {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

@mixin absolute-vertical-center {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}


body {
	font-size: $font-size;
	background: $white;
}

.container {
	width: 40em;
	height: 57em;
	background-color: $green-light;	
	@include centerAbsolute();
	padding: 2em;
	box-sizing: border-box;
}

.picture-grid {
	width: 100%;
	height: 36em;
	margin-bottom: 2em;
	
	// Grid
	display: grid;
	grid-template-rows: repeat(8, 4.5em);
	grid-template-columns: 4.5em 4.5em 4.5em 4.5em 4.5em 4.5em 9em;
}

.corner {
	z-index: -1;
	font-size: $font-size;
	height: 15em;
	width: 15em;
	grid-row: 1;
	position: relative;
	
	&.corner-left {
		grid-column-start: 1;
	}
	
	&.corner-right {
		grid-column-start: 5;
		margin-left: 3em;
	}
}

.corner-triangle-dark {
	@include right-triangle(5em, 5em, $green-dark);
	position: absolute;
}

.corner-left .corner-triangle-dark {
	transform: rotate(90deg);
	
	&:nth-of-type(1) {
		top: 0;
		right: 0;
	}
	
	&:nth-of-type(2) {
		top: 5em;
		right: 5em;
	}
}

.corner-right .corner-triangle-dark {
	transform: rotate(-180deg);
	
	&:nth-of-type(1) {
		top: 5em;
		right: 5em;
	}
	
	&:nth-of-type(2) {
		top: 10em;
		right: 0;
	}
}

.corner-triangle-striped {
	width: 5em;
	height: 5em;
	position: absolute;
	
	background: repeating-linear-gradient(
		to right,
		$white,
		$white 0.3em,
		$green-light 0.3em,
		$green-light 0.6em
	);
	
	&:after {
		content: '';
		@include right-triangle(5em, 5em, $green-light);
		position: absolute;
	}
}

.corner-left .corner-triangle-striped {
	bottom: 0;
	left: 0;
	transform: rotate(-90deg);
}

.corner-right .corner-triangle-striped {
	top: 0;
	left: 0;
}

.corner-quarter-circle {
	position: absolute;
	background: $green-dark;
	height: 5em;
	width: 5em;
}

.corner-left .corner-quarter-circle {
	border-top-left-radius: 4.5em;
	left: 0;
	top: 0;
}

.corner-right .corner-quarter-circle {
	border-top-right-radius: 4.5em;
	right: 0;
	top: 0;
}

.corner-circle {
	@include circle(5em);
	background: transparent;
	position: absolute;
	overflow: hidden;
	
	.inner-circle {
		@include circle(5em);
		background: $white;
		position: absolute;
	}
	
	.inner-circle:nth-of-type(1) {
		top: -2.5em;
		left: -2.5em;
	}
	
	.inner-circle:nth-of-type(2) {
		top: -2.5em;
		right: -2.5em;
	}
	
	.inner-circle:nth-of-type(3) {
		bottom: -2.5em;
		right: -2.5em;
	}
	
	.inner-circle:nth-of-type(4) {
		bottom: -2.5em;
		left: -2.5em;
	}
}

.corner-left .corner-circle {
	top: 0em;
	left: 5em;
}

.corner-right .corner-circle {
	top: 5em;
	right: 0em;
}

.corner-star {
	position: absolute;
	width: 5em;
	height: 5em;
	
	&:before {
		content: '';
		@include isosceles-triangle-pointed-right(2.5em, 5em, $white);
		position: absolute;
		top: 0;
		left: 1.25em;
	}
	
	&:after {
		content: '';
		@include isosceles-triangle-pointed-left(2.5em, 5em, $white);
		position: absolute;
		top: 0;
		right: 1.25em;
	}
	
	.star-triangle:nth-of-type(1) {
		@include isosceles-triangle(2.5em, 5em, $white);
		position: absolute;
		bottom: 1.25em;
	}
	
	.star-triangle:nth-of-type(2) {
		@include isosceles-triangle-upsidedown(2.5em, 5em, $white);
		position: absolute;
		top: 1.25em;
	}
}

.corner-left .corner-star {
	top: 5em;
	left: 0;
}

.corner-right .corner-star {
	top: 0;
	right: 5em;
}

.mountain-large {
	@include isosceles-triangle(9em, 18em, $green-dark);
	grid-column: 2;
	grid-row: 2;
	position: relative;
	
	.mountain-tip {
		@include isosceles-triangle((9em/3), (18em/3), $white);
		top: 0;
		@include absolute-horizontal-center;
	}
}

.mountain-small {
	@include isosceles-triangle(4.5em, 9em, $green-dark);
	grid-column: 4;
	grid-row: 1;
	position: relative;
	
	.mountain-tip {
		@include isosceles-triangle((4.5em/3), (9em/3), $white);
		top: 0;
		@include absolute-horizontal-center;
	}
}

// ----- Fox -----
.fox-tail {
	@include isosceles-triangle-pointed-right(9em, 18em, $orange);
	grid-row: 2;
	grid-column: 6;
	position: relative;
	margin-top: 0.056em;
	
	.tail-tip {
		@include right-triangle(3em, 3em, $white);
		position: absolute;
		top: -9em;
		right: 6em;
	}
}

// Fox's head
.fox-ear-left, .fox-ear-right {
	grid-row: 4;
	position: relative;
}

.fox-ear-left {
	@include isosceles-triangle-pointed-right(4.5em, 9em, $orange);
	grid-column: 3;
	
	&:after {
		content: '';
		@include isosceles-triangle-pointed-right(1.8em, 3.5em, $white);
		position: absolute;
		top: -0.6em;
		left: -4.5em;
	}
}

.fox-ear-right {
	@include isosceles-triangle-pointed-left(4.5em, 9em, $orange);
	grid-column: 4;
	
	&:after {
		content: '';
		@include isosceles-triangle-pointed-left(1.8em, 3.5em, $white);
		position: absolute;
		top: -0.6em;
		right: -4.5em;
	}
}

// - - - Face - - - 
.fox-face-tophalf, .fox-face-bottomhalf {
	height: 4.5em;
	width: 9em;
	grid-column: 3;
	z-index: 1;
	position: relative;
}

.fox-face-tophalf {
	grid-row: 5;
	
	&:before {
		content: '';
		@include isosceles-triangle(5.4em, 10.7em, $orange);
		position: absolute;
		bottom: 0.8em;
		@include absolute-horizontal-center;
	}
	
	.eye-left, .eye-right {
		height: 1.4em;
		width: 1.4em;
		background: $green-dark;
		position: absolute;
		top: 1.6em;
	}
	
	.eye-left {
		left: 1.9em;
		border-radius: 0 50%;
	}
	
	.eye-right {
		right: 1.9em;
		border-radius: 50% 0;
	}
}

.fox-face-bottomhalf {
	grid-row: 6;
	
	&:before {
		content: '';
		@include isosceles-triangle-upsidedown(5.4em, 10.7em, $white);
		position: absolute;
		top: -0.8em;
		@include absolute-horizontal-center;
	}
	
	.snout {
		@include isosceles-triangle-upsidedown(2.1em, 4.2em, $orange);
		position: absolute;
		top: -0.8em;
		@include absolute-horizontal-center;
		
		&:before {
			content: '';
			@include isosceles-triangle-upsidedown(1.2em, 2.4em, $green-dark);
			position: absolute;
			top: -1.2em;
			left: -1.2em;
		}
	}
	
	.mouth {
		@include isosceles-triangle(0.8em, 1.4em, $green-dark);
		position: absolute;
		top: 1.2em;
		@include absolute-horizontal-center;
	}
}

.fox-torso {
	height: 9em;
	width: 9em;
	background: $orange;
	grid-column: 3;
	grid-row: 6;
	position: relative;
	
	.chest-fur {
		@include isosceles-triangle(4.5em, 9em, $white);
		transform: rotate(180deg);
		position: absolute;
		bottom: 0;
	}
}

.fox-stomach {
	position: relative;
	@include right-triangle-upsidedown(9em, 9em, $white);
	grid-row: 6;
	grid-column: 5;
	
	.stomach-fur {
		@include right-triangle-pointed-left(4.5em, 4.5em, $orange);
		position: absolute;
		top: -9em;
		left: 0;
	}
}

.fox-backfoot {
	@include right-triangle-pointed-left(4.5em, 4.5em, $green-dark);
	grid-row: 5;
	
	&.foot-left { grid-column: 5; }
	&.foot-right { grid-column: 6; }
}
	
.fox-frontfoot {
	grid-row: 8;
	@include right-triangle-upsidedown(4.5em, 4.5em, $green-dark);
		
	&.foot-left { grid-column: 3; }
	&.foot-right { grid-column: 4; }
}

.tree {
	@include isosceles-triangle(4.5em, 9em, $green-dark);
	
	&.left { grid-column: 1; }
	&.middle { grid-column: 5; }
	&.right { grid-column: 7;	}
}

@for $i from 4 through 8 {
	.tree.triangle-#{$i} {
		grid-row: $i
	}
}

// -------- Letters --------

.letter-grid {
	width: 100%;
	height: 15em;
	
	// Grid
	display: grid;
	grid-template-rows: 6.5em 6.5em;
	grid-template-columns: repeat(5, 6.5em);
	grid-column-gap: 0.875em;
	grid-row-gap: 2em;
}

.letters {
	position: relative;
}

.letter-f {
	border-left: solid 3em $green-dark;

	&:before {
		content: '';
		@include circle(1.6em);
		background: $white;
		position: absolute;
		right: 1.3em;
		@include absolute-vertical-center;
	}
	
	&:after {
		content: '';
		@include right-triangle(3em, 3em, $white);
		position: absolute;
		top: 0;
		right: 0;
		transform: rotate(180deg);
	}
}

.letter-l {
	height: 100%;
	border-left: solid 3em $green-dark;
	display: border-box;
	
	&:after {
		content: '';
		@include right-triangle(3em, 3em, $white);
		position: absolute;
		bottom: 0;
		right: 0;
		transform: rotate(270deg);
	}
}

.letter-e {
	border-left: solid 3em $green-dark;
	background: $white;
	
	&:before {
		content: '';
		@include isosceles-triangle(4em, 7.5em, $green-light);
		transform: rotate(90deg);
		position: absolute;
		top: 1em;
		right: -2.2em;
	}
	
	&:after {
		content: '';
		@include circle(1.6em);
		background: $white;
		position: absolute;
		right: 1.3em;
		@include absolute-vertical-center;
	}

}

.letter-t {
	border-top: solid 3em $green-dark;
	
	&:after {
		content: '';
		background: $white;
		width: 3em;
		height: 3em;
		position: absolute;
		bottom: 0;
		@include absolute-horizontal-center;
	}
}

.letter-o {
	@include half-circle-pointed-left(6.5em);
	background: $green-dark;
	
	&:before {
		content: '';
		z-index: 1;
		width: 0.875em;
		height: 6.5em;
		background: $green-light;
		position: absolute;
		right: (-0.875em / 2);
	}
	
	&:after {
		content: '';
		@include half-circle-pointed-right(6.5em);
		background: $white;
		position: absolute;
		left: 3.25em;
	}
	
}

.letter-x {
	grid-column: 3;
	grid-row: 2;
	@include isosceles-triangle-upsidedown(3.25em, 6.5em, $green-dark);
	
	&:after {
		content: '';
		@include isosceles-triangle(3.25em, 6.5em, $white);
		position: absolute;
		bottom: 0;
		left: -3.25em;
	}
}

.letter-s {
	overflow: hidden;
	height: 6.5em;
	width: 6.5em;
	
	.s-middle {
		background: $green-dark;
		height: 7.5em;
		width: 3.5em;
		transform: rotate(-45deg);
		position: absolute;
		left: 1.5em;
		top: -0.5em;
		border-radius: 3em 2em 3em 0 / 3em 2em;
	}
	
	&:before, &:after {
		content: '';
		@include right-triangle(3em, 3em, $white);
		position: absolute;
	}
	
	&:before {
		bottom: 0;
		left: 0;
	}
	
	&:after {
		transform: rotate(-180deg);
		top: 0;
		right: 0;
	}
}

.link-container {
	position: fixed;
	bottom: 0;
	right: 0;
	width: auto;
	padding: 0.75em;
	font-size: 1.5em;
	color: $green-dark;
	font-family: sans-serif;
	
	a {
		color: $orange;
		font-weight: 600;
	}
}
              
            
!

JS

              
                // ¯\_(ツ)_/¯
              
            
!
999px

Console