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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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.

            
              // Inspired By this dribbble post https://dribbble.com/shots/2132841-Day-005-Music-Player

.player
	.image
		img.cover(src="http://fistintheair.com/wp-content/uploads/2016/12/quinn-xcii-straightjacket.jpg", alt="Cover")
		.filter
	.description
		p Quinn XCII
		h1 Straightjacket
	.buttons
		img.playButton(src="https://s29.postimg.org/5pit0vpk7/music_player_play_1.png", alt="PlayButton")
		img.pauseButton(src="https://s29.postimg.org/8nv0wtxef/pause_button.png", alt="pauseButton")
	.time
		p.timePlayed 1:27
		p.timeLeft 1:59
	.lines
		.songLength
		.lengthLeft
	.likeandfav
		.fa.fa-heart
		.fa.fa-star
            
          
!
            
              body
	background-color lighten(#FE5074,10%)
	height 1600px
.player
	height 600px
	width 450px
	position absolute
	top 10%
	left 50%
	transform translateX(-225px)
	background-color #111
	box-shadow 10px 10px 30px 0px rgba(0,0,0,0.5), -0px -0px 40px 0px rgba(0,0,0,0.4)
	.image
		position absolute
		left 0px
		top 0px
		.cover
			position absolute
			width 450px
			left 0px
			top 0px
		.filter
			position absolute
			width 450px
			height 450px
			background linear-gradient(transparent, #111)
	.description
		position absolute
		color #fff
		font-family Open Sans
		top 350px
		left 50px
		p
			margin 0
			color lighten(black, 40%)
		h1
			margin 5px 0px 0px 0px
	.buttons
		height 20px
		width 20px
		position absolute
		right 50px
		top 385px
		cursor pointer
		transition .2s
		.playButton,.pauseButton
			position absolute
			width 20px
			transition .2s
		.pauseButton
			opacity 0
	.buttons.active
		.playButton
			opacity 0
		.pauseButton
			opacity 1
	.time
		position absolute
		color #fff
		.timePlayed
			position absolute
			top 450px
			left 50px
			font-family Open Sans
		.timeLeft
			position absolute
			top 450px
			left 370px
			font-family Open Sans
			color lighten(black, 40%)
	.lines
		position absolute
		.songLength
			position absolute
			width 350px
			height 1px
			background-color lighten(black, 40%)
			top 500px
			left 50px
		.lengthLeft
			position absolute
			width 150px
			height 1px
			background-color #FE5074
			top 500px
			left 50px
	.likeandfav
		position absolute
		color lighten(black, 40%)
		.fa-heart
			position absolute
			top 530px
			left 50px
			font-size 25px
			transition .2s
		.fa-heart.active
			color #FE5074
		.fa-star
			position absolute
			top 530px
			left 375px
			font-size 25px
			transition .2s
		.fa-star.active
			color #FFDF00
            
          
!
            
              $(()=>{
	$('.buttons').on('click', ()=>{
		$('.buttons').toggleClass('active')
	})
	$('.fa-heart').on('click', ()=>{
		$('.fa-heart').toggleClass('active')
	})
	$('.fa-star').on('click', ()=>{
		$('.fa-star').toggleClass('active')
	})
})
            
          
!
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