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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.



<div class="wrapper">
	<div class="flex">
		<div class="info">
			<h2 class="info__title">Paul's Home</h2>
			<div class="info__time">5:21 PM</div>
		<div class="menu">
			<ul class="menu__list">
				<li class="menu__item menu__item--active">Activity</li>			
				<li class="menu__item">Settings</li>
			<div class="flex">
				<div class="menu-border  one-half"></div>
	<div class="statistics">
		<div class="consumption-panel">
			<div class="flex flex--justify-between">
					Total Consumption				
				<a href="/" onclick="return false;">PAY</a>
			<h1 class="consumption">79 KWH ~ $89.90</h1>
			<svg id="visualisation" width="600" height="100"></svg>
			<p class="title">Rooms Consumption</p>
			<div class="bar-chart">
				<div class="progress progress--vertical">
					<div class="progress__fill" style="height: 87%"></div>
					<p class="progress__caption">Study</p>					
				<div class="progress progress--vertical">
					<div class="progress__fill" style="height: 50%"></div>
					<p class="progress__caption">Bedroom</p>					
				<div class="progress progress--vertical">
					<div class="progress__fill" style="height: 64%"></div>
					<p class="progress__caption">Kitchen</p>					
				<div class="progress progress--vertical">
					<div class="progress__fill" style="height: 78%"></div>
					<p class="progress__caption">Living</p>					
				<div class="progress progress--vertical">
					<div class="progress__fill" style="height: 30%"></div>
					<p class="progress__caption">Bathroom</p>					

		<div class="flex-1">
			<ul class="lamps__list">
				<li class="lamps__item  lamps__total">
					<h2 class="lamps__count">15</h2>
					<p class="lamps__description">Total Lamps</p>
				<li class="lamps__item  lamps__active">
					<h2 class="lamps__count">4</h2>
					<p class="lamps__description">Active Lamps</p>
			<div class="temperature">
				<h4 class="title">General Temperature</h4>
				<div class="flex flex--justify-between">
					<div class="one-half">
						<div class="temperature__reading">
							23° C						
						<div class="temperature__description">
						<button class="button">Cooler</button>
					<div class="one-half">
						<div class="temperature__reading">
							21° C						
						<div class="temperature__description">
						<button class="button">Warmer</button>
			</div> <!-- /.temperature -->
		</div> <!-- /.right-column -->
	</div> <!-- /.statistics -->


                @import "bourbon"

// slighter darker blue  
$blue-1: #4577DA
// lighter blue 
$blue-2: #5484E4
// bluish black background 
$background: #17181B
$gray: #E5E5E5
$text__color: lighten(#656D78, 15)

$baseline: 20px
$spacing: 40px

$left-column-width: 60%
$right-column-width: 40%

$bezier: ease-in-out

		transform: scaleY(0)
		transform: scaleY(1)

	box-sizing: border-box
	margin: 0

	$color: rgba(mix(#333, $background), 0.9)
		image: linear-gradient(70deg, $color 40%, darken($color, 4) 42%, #4F6DA7 42%)
		repeat: no-repeat	
	min-height: 100vh
	color: $text__color
	font-family: Montserrat
	font-size: 1rem
	line-height: 1.5
	padding: 50px

	text-decoration: none
	font-size: 0.9rem

	&:link, &:visited
		color: $blue-2

	list-style-type: none
	padding: 0

h1, h2, h3, h4, h5, h6
	font-weight: normal
	margin: 0

	background: linear-gradient(to right, rgba(mix(#333, $background), 0.9) $left-column-width, $background $right-column-width)
	box-shadow: 0 20px 40px 0 rgba(black, 0.18)	
	margin: 0 auto
	max-width: 801px
	min-width: 800px

 * 1. For IE 
	flex-basis: $left-column-width
	max-width: $left-column-width /* [1] */
	padding: 50px 50px

// The title an time 
	font-size: 1.75rem
	font-weight: normal
	color: white
	line-height: 1.25rem
	padding: 0
	margin-bottom: 10px
	width: 100%

	font-size: 1.125rem

	flex: 1
	padding: ($baseline * 2.5) $spacing

	display: flex
	position: relative
	justify-content: space-between

	color: $text__color	
	cursor: pointer
	font-size: 1.25rem !important
	padding-bottom: ($baseline / 2)
	position: relative
	width: 50%
	transition: color 0.2s $bezier

		color: rgba(white, 0.9)
		filter: drop-shadow(1px 1px 8px rgba(white, 0.1))

	$color: mix($blue-2, white, 50)
	transform: translateX(0%)
	transition: transform 0.1s $bezier
	width: 100%

		background-color: $color
		box-shadow: 0 0px 14px 0 $color
		content: ''
		height: 2px
		width: 20px
		+position(absolute, 0)

	$subtract: 20px
	background-color: white	
	box-shadow: 0 20px 70px 4px rgba(black, 0.15)
	display: flex
	transform: translate(-$subtract, -$subtract)
	width: 100%

	width: $left-column-width - 7
	padding: 50px

	color: darken($text__color, 30)

.axis path 
	fill: none
	stroke: #777
	shape-rendering: crispEdges

.axis text
	font-size: 13px

	border-bottom: 1px solid darken($gray, 5)
	max-width: 100%
	min-width: 100%
	margin-bottom: 20px
	width: 100%

	display: flex
	justify-content: space-between

	align-items: flex-end
	background-color: $gray
	display: flex
	height: 150px
	position: relative
	width: 35px

	background-color: $blue-2
	height: 0%
	position: relative
	transform: scaleY(0)
	transform-origin : 50% 100%
	width: 100%
	+animation(bars 1.5s $bezier forwards)
	bottom: -($baseline * 2)
	font-size: 0.75rem
	left: 50%
	position: absolute
	transform: translateX(-50%)

	display: flex
	text-align: center

	padding: 80px 0
	color: rgba(white, 0.9)
	font-size: 4rem
	margin-bottom: 20px
	line-height: 1

	color: rgba(white, 0.6)
	background-color: $blue-1
	flex: 1
	background-color: $blue-2
	flex: 1

	border-left: 1px solid $gray	
	padding: $spacing

	color: darken($text__color, 25)
	font-size: 2rem

	margin-bottom: $baseline

	margin-bottom: $baseline

	background-color: $gray
	border: 0
	border-radius: 2px
	color: darken($text__color, 20)
	display: inline-block
	font-size: 1rem
	outline: 0
	padding: ($baseline / 2.5)
	margin-bottom: $baseline
	min-width: 140px
	text-align: center

// Helper classes
	display: flex

	flex: 1

	justify-content: space-between

	width: 50%


                'use strict';

var menuItems = document.querySelectorAll('.menu__item');, 0)
	.forEach(function (item) {
		item.addEventListener('click', onMenuItemClick)

var menuBorder = document.querySelector('.menu-border');

function onMenuItemClick() {
	var parent = this.parentNode;
	var children = Array
		.prototype, 0);
	var index = children.indexOf(this);
	var transform = `translateX(${index * 100}%)`;
			.forEach((menuItem) => 
	this.classList.add('menu__item--active'); = transform;

var progressBars = document.querySelectorAll('.progress__fill');, 0)
.forEach(function (item) { = item.dataset.fill;

 * Trying to do graph stuff here 
var data = [{
    y: "60",
    x: "1"
}, {
    y: "80",
    x: "2"
}, {
    y: "61",
    x: "3"
}, {
    y: "90",
    x: "4"
}, {
    y: "50",
    x: "5"
}, {
    y: "70",
    x: "6"
}, {
    y: "90",
    x: "7"
}, {
    y: "70",
    x: "8"
}, ];

var svg ='#visualisation');
var WIDTH = 600;
var HEIGHT = 100;
var MARGINS = {
	top: 0,
	right: 0,
	bottom: 0,
	left: 0

var xScale = d3.scale.linear()
		.range([MARGINS.left, WIDTH - MARGINS.right])

var yScale = d3.scale.linear()
		.range([HEIGHT -, MARGINS.bottom])

var xAxis = d3.svg.axis()

var yAxis = d3.svg.axis()

var lineGen = d3.svg.line()
  .x(function(data) {
    return xScale(data.x);
  .y(function(data) {
    return yScale(data.y);

var path = svg.append('svg:path')
  .attr('d', lineGen(data))
  .attr('stroke', 'gray')
  .attr('stroke-width', 1)
  .attr('fill', 'none');

var totalLength = path.node().getTotalLength();

		.attr("stroke-dasharray", totalLength + " " + totalLength)
		.attr("stroke-dashoffset", totalLength)
			.attr("stroke-dashoffset", 0);