Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <div class="flex-container">
	<div class="unit">
		<div class="hotdog-unit">
			<div class="bread left"></div>
			<div class="hotdog">
				<div class="mustard"></div>
			</div>
			<div class="bread right"></div>
		</div>
		<div class="shadow"></div>
	</div>
</div>
              
            
!

CSS

              
                
	
// -------- Basic Styles --------//	
size(w=100%,h=100%)
	width w
	height h

brace(x=0,y=0)
	position absolute
	top x
	right y
	bottom x
	left y

html
body
	size()

body
	background-color #f4da6b

.flex-container
	size()
	display flex
	flex-wrap wrap 
	justify-content center
	align-items center
	.unit
		margin 0 60px
		text-align center
	h3
		margin 2em 0
		font-family 'Fjalla One', sans-serif
		font-style italic
		color #650818
		
// -------- Mixins --------//	
$hotdog = #f35548
$bread = #EF9B26
$bread_shade = darken($bread, 10%)
$mustard = #FEBE10
$mustard_shade = darken($mustard, 10%)


$size_main = 40px
$shadow_main = 8px

// -------- Styles --------//	
.hotdog-unit
	display flex
	justify-content center
	align-items center
	// transform rotate(-30deg)
	animation floating 2s ease infinite
	
.hotdog
	box-sizing border-box
	position relative
	z-index 10
	overflow hidden
	size($size_main, $size_main*5)
	border-radius 20px
	background-color $hotdog
	border-left solid $shadow_main darken($hotdog, 10%)
	

.bread
	box-sizing border-box
	position relative
	size(36px, 180px)
	background-color $bread
	&.left
		margin-right -6px
		border-radius 50px 0 0 50px
		border-left $shadow_main solid $bread_shade
	&.right
		margin-left -6px
		border-radius 0 50px 50px 0
		border-right $shadow_main solid $bread_shade

.shadow		
	size(100px, 15px)
	border-radius 40%
	margin-top 30px
	margin-left 25px
	background-color rgba(0,0,0,.05)
	animation floating-shadow 2s ease infinite

// -------- Mustard Sauce --------//	
.mustard
	brace()
	left - $shadow_main
	&:before
	&:after
		content ''
		display block
		brace(0%,10%)
		background-repeat repeat-y 
	&:before
		left 48%
		background-size 16px 44px
		background-image radial-gradient(circle at 0px 16px, transparent 6px, $mustard_shade 6px, $mustard_shade 11px, $mustard 11px, $mustard 16px, transparent 16px)
	&:after
		left $shadow_main
		right 48%
		background-size 16px 44px
		background-image radial-gradient(circle at 16px 16px, transparent 6px, $mustard 6px, $mustard 11px, $mustard_shade 11px, $mustard_shade 16px, transparent 16px)
		background-position 0 22px


//------ Animation  ------//
@keyframes floating {
 0% {
	 transform:rotate(-30deg) translateY(2px);
 }
 50% {
	 transform:rotate(-30deg) translateY(15px);
 }
 100% {
	 transform:rotate(-30deg) translateY(2px);
 }
}

@keyframes floating-shadow {
 0% {
	 transform:scaleX(0.75);
 }
 50% {
	 transform:scaleX(1);
 }
 100% {
	 transform:scaleX(0.75);
 }
}
              
            
!

JS

              
                
              
            
!
999px

Console