Pen Settings

HTML

CSS

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

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

              
                .inner-fabs
	#fab4.fab.round(data-tooltip='Create')
		i.material-icons create
	#fab3.fab.round(data-tooltip='Move to inbox')
		i.material-icons move_to_inbox
	#fab2.fab.round(data-tooltip='Send')
		i.material-icons send
#fab1.fab.round
	i#fabIcon.material-icons add
              
            
!

CSS

              
                $background-color: #3F51B5
$fab-color: #FF4081

*
	box-sizing: border-box
	margin: 0px
	padding: 0px

html, body
	width: 100%
	heigth: 100vh
	background-color: $background-color

.round
	border-radius: 50%

.fab
	transition: all 300ms ease-in-out
	width: 56px
	height: 56px
	background-color: $fab-color
	display: flex
	align-items: center
	justify-content: center
	position: absolute
	right: 30px
	bottom: 15px
	user-select: none
	cursor: pointer
	color: white
	font-size: 2em
	box-shadow: 0px 3px 10px rgba(0,0,0,.16), 0px 3px 10px rgba(0,0,0,.16)

.fab i
	transition: all 300ms ease-in-out
	will-change: transform

.inner-fabs .fab
	width: 40px
	height: 40px
	right: 38px
	bottom: 23px
	font-size: 1.5em
	will-change: bottom

// from 0 through ${number of inner fabs}
@for $i from 0 through 5
	.inner-fabs.show .fab
		&:nth-child(#{$i + 1})
			bottom: #{$i * 50 + 80}px

//Did that so the box-shadow doesn't rotate too
.inner-fabs.show + .fab i
	transform: rotate(135deg)

.fab:before
	content: attr(data-tooltip)
	transition: opacity 150ms cubic-bezier(.4,0,1,1)
	position: absolute
	visibility: hidden
	opacity: 0
	box-shadow: 0 1px 2px rgba(0,0,0,.15)
	color: #ececec
	right: 50px
	top: 25%
	background-color: rgba(70,70,70,.9)
	font-size: .5em
	line-height: 1em
	display: inline-block
	text-align: center
	white-space: nowrap
	border-radius: 2px
	padding: 6px 8px
	max-width: 200px
	font-weight: bold
	text-overflow: ellipsis
	vertical-align: middle

.inner-fabs.show .fab:hover:before
	content: attr(data-tooltip)
	visibility: visible
	opacity: 1
              
            
!

JS

              
                let fab1 = document.getElementById('fab1');
let innerFabs = document.getElementsByClassName('inner-fabs')[0];

fab1.addEventListener('click', function() {
	innerFabs.classList.toggle('show')
})

document.addEventListener('click', function(e) {
	switch(e.target.id) {
		case "fab1":
		case "fab2":
		case "fab3":
		case "fab4":
		case "fabIcon":
			break
		default:
			innerFabs.classList.remove('show')
			break
	}
})
              
            
!
999px

Console