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

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

              
                <div class="flex-container">
	<div class="unit">
		<div class="pole-unit mono">
			<div class="pole-top">
	<!-- 			<div class="ball"></div> -->
				<div class="cover"></div>
				<div class="band"></div>
				<div class="thin-band"></div>
			</div>
			<div class="pole-middle">
				<div class="container">
					<div class="pole"></div>
				</div>
			</div>
			<div class="pole-bottom">
				<div class="thin-band"></div>
				<div class="band"></div>
				<div class="cover"></div>
	<!-- 			<div class="ball"></div> -->
			</div>
		</div>
		<div class="shadow"></div>
	</div>
	<div class="unit">
		<div class="pole-unit vary">
			<div class="pole-top">
	<!-- 			<div class="ball"></div> -->
				<div class="cover"></div>
				<div class="band"></div>
				<div class="thin-band"></div>
			</div>
			<div class="pole-middle">
				<div class="container">
					<div class="pole"></div>
				</div>
			</div>
			<div class="pole-bottom">
				<div class="thin-band"></div>
				<div class="band"></div>
				<div class="cover"></div>
	<!-- 			<div class="ball"></div> -->
			</div>
		</div>
		<div class="shadow"></div>
	</div>
	
</div>
              
            
!

CSS

              
                // -------- Variables --------//	
$border     = #4B4C4D

$pole-red   = #DF5646
$pole-blue  = #1C78A4
$pole-white = #FFFFFF

$part-base    = #FAFAFA
$left-shadow  = rgba(60,60,60,.1)
$right-shadow = rgba(120,120,120,.1)
	
$gradient-unit = 20px
$base-size     = 80px
$base-spacing  = 8px

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

center-x()
	position absolute
	left 50%
	transform translateX(-50%)

center-center()
	position absolute
	top 50%
	left 50%
	transform translate(-50%, -50%)

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

border(s=4px)
	border s solid $border

shadow(r,l)
	display block
	box-sizing border-box
	size()
	z-index 12
	border-right-style solid
	border-left-style solid
	border-right-width r
	border-right-color $right-shadow
	border-left-width l
	border-left-color $left-shadow

// -------- Basic Styles --------//	
html
body
	size()

body
	background-color #FEF7E5

*
	box-sizing border-box

.flex-container
	size()
	display flex
	flex-wrap wrap 
	justify-content center
	align-items center
	
// -------- Styles --------//	
.unit
	padding 0 60px

.shadow		
	size($base-size, 15px)
	border-radius 40%
	margin 30px auto
	background-color rgba(0,0,0,.05)

.pole-top
.pole-middle
.pole-bottom
	display block
	width 100%
	text-align center

.ball
	position relative
	size(24px,24px)
	margin auto
	border()
	border-radius 50%
	background-color $part-base
	&:after
		content ''
		display block
		width 4px
		height 10px
		center-x()
		background-color $border
	.pole-top &
		margin-bottom 5px
		&:after
			top 18px
	.pole-bottom &
		margin-top 5px
		&:after
			bottom 18px

.cover
	$cover-width = $base-size
	$cover-height = $base-size*0.45
	size($base-size, $cover-height)
	margin 0 auto
	position relative
	border()
	background-color $part-base
	overflow hidden
	&:before
		content ''
		border-radius inherit
		shadow(6px,10px)
	.pole-top &
		margin-bottom - $base-spacing
		border-radius $cover-height $cover-height 0 0 
		border-bottom-width 0
	.pole-bottom &
		margin-top - $base-spacing
		border-radius 0 0 $cover-height $cover-height
		border-top-width 0

.band
	$band-width = $base-size + $base-spacing*2
	$band-height = $base-spacing*3
	position relative
	size($band-width, $band-height)
	margin 0 auto
	z-index 10
	border()
	background-color $part-base
	border-radius $base-spacing*0.75
	&:before
		content ''
		shadow(6px,12px)

.thin-band
	$thinband-width = $base-size + 2px
	$thinband-height = $base-spacing
	size($thinband-width, $thinband-height)
	margin 0 auto
	box-sizing content-box
	border()
	background-color $part-base
	&:before
		content ''
		shadow(6px,12px)
	.pole-top &
		border-radius 0 0 4px 4px
		border-top-width 0
	.pole-bottom &
		border-radius 4px 4px 0 0
		border-bottom-width 0
		

.container
	$container-width = $base-size
	$container-height = $base-size*1.8
	size($container-width, $container-height)
	margin 0 auto
	position relative
	border()
	border-top-width 0
	border-bottom-width 0
	background-color rgba(250,250,255,.5)
	&:before
		content ''
		display block
		position absolute
		top 0
		bottom 0
		right 15%
		left 50%
		z-index 15
		background-image linear-gradient( to left, rgba(255,255,255, .8), rgba(255,255,255, .8) 33.33%,  rgba(255,255,255, .2) 33.33%, rgba(255,255,255, .2) 100%)

.pole
	$pole-width = $base-size - $base-spacing*2
	size($pole-width, 100%)
	margin 0 auto
	background-color $pole-white
	background-repeat repeat-y
	background-size 100% 88px
	background-position 0% 0%
	animation spin 4s linear infinite
	&:before
		content ''
		shadow(10px,14px)
	.mono &
		background-image repeating-linear-gradient( -25deg, $pole-white, $pole-white $gradient-unit, $pole-red $gradient-unit, $pole-red $gradient-unit*2, $pole-white $gradient-unit*2, $pole-white $gradient-unit*3, $pole-blue $gradient-unit*3, $pole-blue $gradient-unit*4)
	.vary &
		background-image repeating-linear-gradient( -25deg, $pole-white, $pole-white $gradient-unit*0.5, $pole-red $gradient-unit*0.5, $pole-red $gradient-unit*2, $pole-white $gradient-unit*2, $pole-white $gradient-unit*2.5, $pole-blue $gradient-unit*2.5, $pole-blue $gradient-unit*4)
	
//------ Animation  ------//
@keyframes spin {
 0% {
	 background-position:0% 0%;
 }
 100% {
	 background-position:0% 176px;
 }
}
	
              
            
!

JS

              
                
              
            
!
999px

Console