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.

            
              .flex-container
	.unit
		.heart
			- for (var i = 0; i < 9; i++)
				div(class='heart-piece-'+[i])
		p| love is love

            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Lato:100')

size(w=100%,h=100%)
	width w
	height h

html
body
	size()

.flex-container
	size()
	position relative
	display flex
	flex-wrap wrap 
	justify-content center
	align-items center

// -------- Variables --------//

$background = #262e6f

$red = #ec2d73
$orange = #eb5324
$yellow = #fdc800
$green = #47b264
$blue = #1470bd
$purple = #76469a

// -------- Style --------//

body
	background-color $background

.unit
	text-align center
	p
		margin-top 100px
		font-family 'Lato', sans-serif
		font-weight 100
		text-transform uppercase
		letter-spacing 2px
		color white

.heart
	position relative
	font-size 0
	width 138px
	
[class*="heart-piece-"]
	position absolute
	top -5px
	size(10px,10px)
	border-radius 5px
	
$Colors = $red, $orange, $yellow, $green, $blue, $purple, $red, $orange, $yellow 
		
.heart-piece-4
	animation piece-4 3.2s infinite

.heart-piece-3
.heart-piece-5
	animation piece-3 3.2s infinite

.heart-piece-2
.heart-piece-6
	animation piece-2 3.2s infinite

.heart-piece-1
.heart-piece-7
	animation piece-1 3.2s infinite

.heart-piece-0
.heart-piece-8
	animation piece-0 3.2s infinite
		
for num in (0 .. 8)
	.heart-piece-{num}
		left 16px * num
		animation-delay 0.15s * num
		background-color $Colors[num]

@keyframes piece-4 {
  0%, 10%, 90%, 100%{
	height 10px
	top -5px
 }
 45%, 55%{
	height 94px
	top -23px
 }
}

@keyframes piece-3 {
 0%, 10%, 90%, 100%{
	height 10px
	top -5px
 }
 45%, 55%{
	height 90px
	top -31px
 }
}

@keyframes piece-2 {
 0%, 10%, 90%, 100%{
	height 10px
	top -5px
 }
 45%, 55%{
	height 80px
	top -37px
 }
}

@keyframes piece-1 {
 0%, 10%, 90%, 100%{
	height 10px
	top -5px
 }
 45%, 55%{
	height 60px
	top -31px
 }
}

@keyframes piece-0 {
 0%, 10%, 90%, 100%{
	height 10px
	top -5px
 }
 45%, 55%{
	height 30px
	top -15px
 }
}
            
          
!
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