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 id="weather-card">
	<div class="header">
		<div class="location-closest">
			<p>Fake Los Angeles</p>
		</div>
		<div class="location-state">
			<p>California, USA</p>
		</div>
		<div class="current">
			<p class="time">Thursday 1:23pm</p>
			<p class="temp">158°F</p>
			<p class="high-low-label">H / L</p>
			<div class="high">
				<p><span class="wi" v-html="i['arrow-up']"></span>264°</p>
			</div>
			<div class="low">
				<p><span class="wi" v-html="i['arrow-down']"></span>43°</p>
			</div>
			<p class="wind-label">Wind</p>
			<div class="speed">
				<p>12 mph</p>
			</div>
			<div class="bearing">
				<p><span class="wi" v-html="i['wind-bearing']"></span>360°</p>
			</div>
		</div>
		<div class="condition">
			<p class="wi" v-html="i['test']"></p>
			<p class="summary">Breezy and Mostly Cloudy</p>
		</div>
	</div>
	
	<div class="body">
		<div class="more-info">
			<div class="humidity">
				<span class="label wi" v-html="i['humidity']"></span>
				<span class="value">90%</span>
			</div>
			<div class="precip">
				<span class="label wi" v-html="i['umbrella']"></span>
				<span class="value">60%</span>
			</div>
			<div class="cloud">
				<span class="label wi" v-html="i['cloud']"></span>
				<span class="value">70%</span>
			</div>
			<div class="sun">
				<span class="label wi" v-html="i['sunset']"></span>
				<span class="value">5:23pm</span>
			</div>
			<div class="feels">
				<span class="label">Feels like:</span>
				<span class="value">125°</span>
			</div>
		</div>
		<div class="forecast">
			<div class="day">
				<p class="name">Friday</p>
				<p class="wi" v-html="i['rain']"></p>
				<p class="high-low">66° / 41°</p>
				<p class="summary">Rain starting in the afternoon, continuing until evening</p>
			</div>
			<div class="day">
				<p class="name">Saturday</p>
				<p class="wi" v-html="i['rain']"></p>
				<p class="high-low">78° / 52°</p>
				<p class="summary">Rain starting in the evening</p>
			</div>
			<div class="day">
				<p class="name">Sunday</p>
				<p class="wi" v-html="i['day-sunny']"></p>
				<p class="high-low">102° / 81°</p>
				<p class="summary">Clear throughout the day</p>
			</div>
			<div class="day">
				<p class="name">Monday</p>
				<p class="wi" v-html="i['day-cloudy']"></p>
				<p class="high-low">12° / -2°</p>
				<p class="summary">Partly cloudy in the morning</p>
			</div>
		</div>
	</div>
</div>
            
          
!
            
              @font-face
	font-family: 'weather'
	src: url('https://raw.githubusercontent.com/erikflowers/weather-icons/master/font/weathericons-regular-webfont.ttf')

@import url('https://fonts.googleapis.com/css?family=Rubik:400,700')

@import url('https://fonts.googleapis.com/css?family=Nunito:400,700')

*, *:before, *:after
	box-sizing: border-box

body, html
	background: #333842
p
	margin: 0

#weather-card
	margin: 10px
	width: 600px
	background-color: #fff
	font-family: 'Rubik', sans-serif
	border-radius: 5px
	// box-shadow: 1px 1px 5px #222
	.wi
		font-family: 'weather'
	.header
		display: grid
		grid-template-columns: 360px 230px
		grid-template-rows: 40px 26px 24px 90px
		grid-gap: 0 10px
		border-radius: 5px 5px 0 0
		padding: 10px 0
		background: linear-gradient(135deg, rgba(4,205,255,1) 0%, rgba(4,205,255,1) 25%, rgba(12,183,230,1) 100%)
		font-size: 0
		.location-closest
			grid-column: 1
			grid-row: 1
			padding: 0 20px
			line-height: 40px
			color: #fff
			font-weight: bold
			font-size: 24px
			overflow: hidden
			text-overflow: ellipsis
			white-space: nowrap
		.location-state
			grid-column: 1
			grid-row: 2
			padding: 0 20px
			line-height: 26px
			color: rgba(255, 255, 255, .8)
			font-weight: bold
			font-size: 18px
			overflow: hidden
			text-overflow: ellipsis
			white-space: nowrap
		.current
			grid-column: 1
			grid-row: 4
			display: grid
			grid-template-columns: 170px 70px 80px
			grid-template-rows: 20px 30px 30px
			grid-gap: 5px 10px
			padding: 0 0 0 20px
			.time
				grid-row: 1
				grid-column: 1
				font-size: 18px
				color: rgba(255, 255, 255, .8)
			.high-low-label
				grid-row: 1
				grid-column: 2
				line-height: 20px
				text-align: center
				font-size: 18px
				color: rgba(255, 255, 255, .8)
			.temp
				grid-row: 2 / span 2
				grid-column: 1
				color: #fff
				font-size: 56px
				line-height: 65px
				// font-weight: bold
				font-family: 'Nunito'
			.high
				grid-column: 2
				grid-row: 2
			.low
				grid-column: 2
				grid-row: 3
			.high, .low
				p
					line-height: 30px
					color: rgba(255, 255, 255, .8)
					font-size: 24px
					vertical-align: sub
					span
						font-size: 28px
						vertical-align: bottom
						padding-right: 6px
			.wind-label
				grid-row: 1
				grid-column: 3
				line-height: 20px
				text-align: center
				font-size: 18px
				color: rgba(255, 255, 255, .8)
			.speed
				grid-column: 3
				grid-row: 2
			.bearing
				grid-column: 3
				grid-row: 3
			.speed, .bearing
				p
					line-height: 30px
					color: rgba(255, 255, 255, .8)
					font-size: 24px
					vertical-align: sub
					span
						font-size: 24px
						vertical-align: bottom
						padding-right: 6px
			.speed p
				font-size: 20px
		.condition
			grid-column: 2
			grid-row: 1 / span 4
			padding: 0 20px 0 0
			display: flex
			justify-content: center
			flex-direction: column
			p.wi
				color: #fff
				font-size: 64px
				text-align: center
				height: 90px
			p.summary
				padding-top: 10px
				text-align: center
				color: #fff
				font-family: 'Nunito'
				font-size: 26px
	.body
		margin: 0
		height: 200px
		background-color: #fff
		border-radius: 0 0 5px 5px
		font-family: 'Nunito'
		.more-info
			background-color: rgba(4, 205, 255, .15)
			display: grid
			grid-template-columns: repeat(3, 95px) 120px 150px
			grid-template-rows: 40px
			justify-items: center
			align-items: center
			justify-content: center
			div
				height: 24px
				span
					font-size: 18px
					color: #04cdff
					font-weight: normal
					&.label
						margin-right: 2px
						&.wi
							display: inline-block
							min-width: 20px
							text-align: center
							margin-right: 2px
							font-size: 18px
							position: relative
							top: 0px
							line-height: 16px
		.forecast
			padding: 10px 20px
			display: grid
			grid-template-columns: repeat(4, 1fr)
			grid-template-rows: 140px
			grid-gap: 0 10px
			justify-items: center
			align-items: start
			.day
				align-self: center
				color: #04cdff
				.name
					font-family: 'Rubik', sans-serif
					// font-weight: 700
					font-size: 22px
					text-align: center
				.wi
					margin: 4px 0 10px
					color: rgba(#04cdff, .9)
					font-size: 40px
					text-align: center
				.high-low
					color: rgba(4, 205, 255, .9)
					font-size: 20px
					text-align: center
				.summary
					display: none
            
          
!
            
              const i = {
	'day-sunny': '&#xf00d;',
	'day-cloudy': '&#xf002;',
	'test': '&#xf01e;',
	'arrow-up': '&#xf058;',
	'arrow-down': '&#xf044;',
	'wind-bearing': '&#xf0b1;',
	'raindrops': '&#xf04e;',
	'umbrella': '&#xf084;',
	'cloud': '&#xf041;',
	'humidity': '&#xf07a;',
	'sunrise': '&#xf051;',
	'sunset': '&#xf052;',
	'rain': '&#xf019;'
}

const app = new Vue({
	el: '#weather-card',
	data() {
		return {
			i
		}
	}
});
            
          
!
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