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

              
                
<!-- 
give these sections a shared class - 
so you can style them all with base rules
- in this case: .container
-->
<header class='container site-header'>
<div class='inner-w'>

	<nav class='site-navigation'>
		<ul class='item-list'> <!-- what is in an "item"-list? ..."items" -->
			<li class='item'>
				<a class='link' href='#about'>
					<span>About</span><!-- you may need this span for finer styles - think ahead-->
				</a>
			</li>
			<!-- etc. you can copy the li / but in many templating situations, you would iterate over some data and just have the one template-->
		</ul>
	</nav>
	<!--
	<div class="space"></div> don't do this: you can style space without adding elements
	-->
	
	<h1 class='site-title'>Site title: person name etc.</h1>
	
</div>
</header>



<section class='container about' id='about'>
<div class='inner-w'>

	<h1 class='section-title'>About</h1>
	
	<p>About info: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officiis dolor illo ipsa ad minima, est unde labore, similique debitis ut perspiciatis fugiat harum, laborum facere modi repellendus voluptatum incidunt reiciendis!</p>

</div>
</section>



<section class='container skills' id='skills'> <!-- id for hash links mysite.com#section-name -->
<div class='inner-w'>

	<h1 class='section-title'>Skills</h1>
	
	<ul class='type-list'> <!-- 'type' of 'skill' -->
		<li class='type'>
			<h2 class='name'>Skillset name</h2>
			
			<ol class='skill-list'> <!-- these might be 'ordered' -->
				<li class='skill'>Skill one</li>
				<li class='skill'>Skill two</li>
				<li class='skill'>Skill three</li>
			</ol>
		</li>
		<li class='type'>
			<h2 class='name'>Skillset name</h2>
			
			<ul class='skill-list'>
				<li class='skill'>Skill one</li>
				<li class='skill'>Skill two</li>
				<li class='skill'>Skill three</li>
			</ul>
		</li>
		<!-- more types etc. -->
	</ul>

</div>
</section>



<section class='container projects' id='projects'>
<div class='inner-w'>

	<h1 class='section-title'>Projects</h1>

	<ul class='project-list'>
		<li class='project'>
			<h2 class='title'>Project title</h2>
			
			<figure class='poster'>
				<img src='https://placehold.it/1600x900' alt='Project poster' />
			</figure>
			
			<p>Description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius, id inventore ex aspernatur, ipsam ad nihil! Aperiam dolores consequuntur porro beatae nostrum temporibus placeat minus! Sed consequatur fuga eum, reprehenderit.</p>
		</li>
		<!-- more projects etc. -->
	</ul>

</div>
</section>



<footer class='container site-footer'>
<div class='inner-w'> <!-- this is just personal preference to keep this the same indent -->

	<p class='legal'>Legal stuff</p>

</div>
</footer>

              
            
!

CSS

              
                
// $variables
// $color
$black = #000
$white = #fff
$color = lightgreen
$highlight = lightblue


// $space
$pad = 10px // global spacing unit / whatever works for you size wise
$thin = 1px // for borders... thick etc


// $breakpoints
$break-point-1 = '(min-width: 500px)' // arbitrary
$break-point-2 = '(min-width: 900px)'


// $type - well crafted type patterns are easy to drop into mini-themes
whisper-voice()
	font-size: 12px
	line-height: 1.3
	font-weight: normal
	font-family: 'helvetica'

standard-type()
	font-size: 16px
	line-height: 1.3
	font-weight: normal
	font-family: 'helvetica'
	
calm-voice()
	font-size: 19px
	line-height: 1.3
	font-weight: normal
	font-family: 'helvetica'
	@media $break-point-1
		font-size: 20px

strong-voice()
	font-size: 22px
	line-height: 1.3
	font-weight: bold
	font-family: 'helvetica'
	@media $break-point-1
		font-size: 24px
	@media $break-point-2
		font-size: 26px

// https://www.paulirish.com/2012/box-sizing-border-box-ftw/
/* apply a natural box layout model to all elements, but allowing components to change */
html
  box-sizing: border-box
*, *:before, *:after
  box-sizing: inherit
// NOTE: full 'reset' applied in the settings cog above...


// $user reset
a // reset links
	text-decoration: none
	color: inherit

figure
	margin: 0 // use 'max-width' on image parents to control size
	img // let images inside figures respond to their parent size
		display: block
		width: 100%
		height: auto
		
ul, ol // strip lists of default (already done in reset I think)
	list-style: none
	margin: 0
	padding: 0


// $structure
.container
	// border: 1px solid red
	.inner-w
		// border: 1px solid blue
		max-width: 690px // whatever's clever
		margin: 0 auto // center it
		padding: $pad
		

// $decorations
body
	standard-type()
	color: $black

.site-header 
	// takes on the .container rules... specific ones here
	background: $color
	
.site-navigation
	.item-list
		display: flex
		flex-direction: row
	.link
		display: block
		padding: $pad
		background: white
	
.about
	//
	.inner-w
		padding-top: $pad*5
		padding-bottom: $pad*3
	.section-title
		strong-voice()
	p
		margin-top: $pad*2
	
.skills // you can think of each section as a mini website
	background: $highlight
	.inner-w
		padding-top: $pad*3
		padding-bottom: $pad*4
	.section-title
		strong-voice()
	.type-list
		margin-top: $pad*2
		@media $break-point-1
			display: flex
			flex-direction: row
			.type
				padding-right: $pad*3
		.type
			margin-top: $pad*2
		.name
			calm-voice()
			opacity: .5
			// next as least deeply as is reasonable... there is only one skill-list in skills... so you don't need to nest it under .type-list, for example
	.skill-list
		margin-top: $pad
		.skill
			&:before
				content: '- ' // cheap list styles...

.projects
	background: $color
	.inner-w
		padding: $pad*5 $pad $pad*8
	.section-title
		strong-voice()
	.project-list
		margin-top: $pad*2
		.project
			.title
				calm-voice()
			.poster
				max-width: 600px // for example
				padding: $pad 0

.site-footer
	background: $black
	color: $white
	whisper-voice()
	

              
            
!

JS

              
                
              
            
!
999px

Console