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="nintendo-switch">
	<div class="left-controller">
		<div class="minus-button"></div>
		<div class="joystick"></div>
		<div class="buttons">
			<button>X</button>
			<div class="row">
				<button>Y</button><button>A</button>
			</div>
			<button>B</button>
		</div>
		<button class="circle-button">
			<span class="circle"></span>
		</button>
	</div>
	<div class="screen">
		<div class="screen-bezel">
			<div class="screen-inner">
				<div class="content-wrapper">
					<div class="nintendo-logo">
						<div class="left-side"></div>
						<div class="right-side"></div>
					</div>
					<h1>NINTENDO</h1>
					<h2>SWITCH</h2>
				</div>
			</div>
		</div>
	</div>
	<div class="right-controller">
		<div class="plus-button"></div>
		<div class="buttons">
			<button>X</button>
			<div class="row">
				<button>Y</button><button>A</button>
			</div>
			<button>B</button>
		</div>
		<div class="joystick"></div>
		<button class="home-button"><i data-feather="home"></i></button>
	</div>
</div>

<a href="https://twitter.com/ixahmedxii" target="_blank" rel="noopener noreferrer" class="twitter-link"><i data-feather="twitter"></i><br /> Follow me on Twitter!</a>
              
            
!

CSS

              
                html
	height: 100%

body
	height: 100%
	background-color: #8d99ae
	display: flex
	align-items: center
	justify-content: center

.nintendo-switch
	height: calc(259px * 1.5)
	width: calc(596px * 1.5)
	background-color: #303538
	display: grid
	border-radius: 70px
	grid-template-columns: 130px 1fr 130px
	z-index: 2
	.left-controller	
		background-color: #00c3e8
		border-radius: 70px 0 0px 70px
		box-sizing: border-box
		padding: 30px 15px
		position: relative
		&::before
			content: ''
			position: absolute
			height: 100%
			width: 80%
			background-color: #000
			top: -5px
			left: -5px
			border-radius: 70px 0 0 70px
			z-index: -1
		&::after
			content: ''
			position: absolute
			height: calc(100% - 50px)
			width: 100%
			background-color: #8d99ae
			top: 50px
			left: -5px
			z-index: -1
		.minus-button
			width: 30px
			height: 10px
			background-color: #303538
			margin-left: auto
		.joystick
			margin-top: 25px
			margin-bottom: 40px
		.circle-button
			width: 30px
			height: 30px
			background-color: #303538
			border: none
			border-radius: 3px
			margin-left: auto
			display: block
			margin-top: 35px
			display: flex
			align-items: center
			justify-content: center
			.circle
				width: 15px
				height: 15px
				border-radius: 10px
				background-color: #000
				display: inline-block
	.right-controller
		background-color: #ff514a
		box-sizing: border-box
		padding: 30px 15px
		position: relative
		border-radius: 0 70px 70px 0
		&::before
			content: ''
			position: absolute
			height: 100%
			width: 80%
			background-color: #000
			top: -5px
			right: -5px
			border-radius: 0 70px 70px 0
			z-index: -1
		&::after
			content: ''
			position: absolute
			height: calc(100% - 50px)
			width: 100%
			background-color: #8d99ae
			top: 50px
			right: -5px
			z-index: -1
		.plus-button
			width: 30px
			height: 30px
			position: relative
			&::before
				content: ''
				position: absolute
				width: 100%
				height: 10px
				background-color: #414045
				top: 10px
			&::after
				content: ''
				position: absolute
				height: 100%
				width: 10px
				background-color: #414045
				left: 10px
		.home-button
			width: 35px
			height: 35px
			background-color: #414045
			border-radius: 35px
			border: none
			margin-top: 30px
			svg
				width: 20px
	.screen
		box-sizing: border-box
		padding: 15px 20px
		.screen-bezel
			background-color: #000
			width: 100%
			height: 100%
			border-radius: 15px
			box-sizing: border-box
			padding: 30px 40px
			.screen-inner
				background-color: #28272c
				height: 100%
				width: 100%
				display: flex
				align-items: center
				justify-content: center
				.content-wrapper
					text-align: center
					.nintendo-logo
						margin: 0 auto 15px auto
						width: 100px
						height: 100px
						display: grid
						grid-template-columns: 1fr 1fr
						gap: 10px
						.left-side
							border: 7px solid #000
							border-radius: 25px 0 0 25px
							position: relative
							&::before
								content: ''
								position: absolute
								width: 18px
								height: 18px
								background-color: #000
								border-radius: 18px
								top: 18px
								left: calc(50% - 9px)
						.right-side
							border: 7px solid #000
							background-color: #000
							border-radius: 0 25px 25px 0
							position: relative
							&::before
								content: ''
								position: absolute
								width: 18px
								height: 18px
								background-color: #28272c
								border-radius: 18px
								bottom: calc(50% - 18px)
								left: calc(50% - 9px)
					h1, h2
						margin: 0
						letter-spacing: 5px
					h1
						font-size: 1rem
					h2
						font-size: 1.5rem
			

.buttons
	width: 100%
	display: flex
	justify-content: center
	flex-direction: column
	margin-top: 15px
	button
		margin: 0 auto
		display: inline-block
		width: 35px
		height: 35px
		color: #fff
		background-color: #414045
		border: none
		border-radius: 35px
		border: 1px solid #000
	.row
		display: flex
		justify-content: space-between
		button
			margin: 0
			
.joystick
	width: 60px
	height: 60px
	border-radius: 60px
	background-color: #414045
	margin: 40px auto 0 auto
	box-sizing: border-box
	border: 7px solid transparent
	box-shadow: inset 0px 0px 0px 3px #000000

.twitter-link
	position: absolute
	top: 25px
	width: 100%
	text-align: center
	color: #111
	text-transform: uppercase
	z-index: 1
              
            
!

JS

              
                feather.replace();

              
            
!
999px

Console