HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URL's 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 it's URL and the proper URL extention.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<!-- FONTS -->
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Raleway:100' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
<!-- PAGE STUFF -->
<div class="rela-block page">
<div class="rela-block top-bar">
<div class="caps name"><div class="abs-center">Kyle J Shanks</div></div>
</div>
<div class="side-bar">
<div class="mugshot">
<div class="logo">
<svg viewbox="0 0 80 80" class="rela-block logo-svg">
<path d="M 10 10 L 52 10 L 72 30 L 72 70 L 30 70 L 10 50 Z" stroke-width="2.5" fill="none"/>
</svg>
<p class="logo-text">kj</p>
</div>
</div>
<p>123 My Place Drive</p>
<p>Astoria, New York 11105</p>
<p>1-800-CALLPLZ</p>
<p>emailsareforsquares@gmail.com</p><br>
<p class="rela-block social twitter">Twitter stuff</p>
<p class="rela-block social pinterest">Pinterest things</p>
<p class="rela-block social linked-in">Linked-in man</p>
<p class="rela-block caps side-header">Expertise</p>
<p class="rela-block list-thing">HTML</p>
<p class="rela-block list-thing">CSS (Stylus)</p>
<p class="rela-block list-thing">JavaScript & jQuery</p>
<p class="rela-block list-thing">Killer Taste</p>
<p class="rela-block caps side-header">Education</p>
<p class="rela-block list-thing">Advanced potion making</p>
<p class="rela-block list-thing">Degree in popping and locking</p>
<p class="rela-block list-thing">Knitting game on point</p>
<p class="rela-block list-thing">Culinary af</p>
</div>
<div class="rela-block content-container">
<h2 class="rela-block caps title">Jr Front-End Developer</h2>
<div class="rela-block separator"></div>
<div class="rela-block caps greyed">Profile</div>
<p class="long-margin">Retro DIY quinoa, mixtape williamsburg master cleanse bushwick tumblr chillwave dreamcatcher hella wolf paleo. Knausgaard semiotics truffaut cornhole hoodie, YOLO meggings gochujang tofu. Locavore ugh kale chips iPhone biodiesel typewriter freegan, kinfolk brooklyn kitsch man bun. Austin neutra etsy, lumbersexual paleo cornhole sriracha kinfolk meggings kickstarter. </p>
<div class="rela-block caps greyed">Experience</div>
<h3>Job #1</h3>
<p class="light">First job description</p>
<p class="justified">Plaid gentrify put a bird on it, pickled XOXO farm-to-table irony raw denim messenger bag leggings. Hoodie PBR&B photo booth, vegan chillwave meh paleo freegan ramps. Letterpress shabby chic fixie semiotics. Meditation sriracha banjo pour-over. Gochujang pickled hashtag mixtape cred chambray. Freegan microdosing VHS, 90's bicycle rights aesthetic hella PBR&B. </p>
<h3>Job #2</h3>
<p class="light">Second Job Description</p>
<p class="justified">Beard before they sold out photo booth distillery health goth. Hammock franzen green juice meggings, ethical sriracha tattooed schlitz mixtape man bun stumptown swag whatever distillery blog. Affogato iPhone normcore, meggings actually direct trade lomo plaid franzen shoreditch. Photo booth pug paleo austin, pour-over banh mi scenester vice food truck slow-carb. Street art kogi normcore, vice everyday carry crucifix thundercats man bun raw denim echo park pork belly helvetica vinyl. </p>
<h3>Job #3</h3>
<p class="light">Third Job Description</p>
<p class="justified">Next level roof party lo-fi fingerstache skateboard, kogi tumblr. Shabby chic put a bird on it chambray, 3 wolf moon swag beard brooklyn post-ironic taxidermy art party microdosing keffiyeh marfa. Put a bird on it 3 wolf moon cliche helvetica knausgaard. Mumblecore fingerstache lomo, artisan freegan keffiyeh paleo kinfolk kale chips street art blog flannel.</p>
</div>
</div>
// MIXINS
//Dummy Variable
$x = false;
// The top, left, right, and bottom are optional
setup(display, position, margin, top = null, right = null, bottom = null, left = null)
display display
position position
margin margin
top top
left left
right right
bottom bottom
font(font-family, font-size, letter-spacing, font-weight, line-height = 1)
font-family font-family
font-size font-size
letter-spacing letter-spacing
font-weight font-weight
line-height line-height
// GENERAL FONTS AND CLASSES AND SETUP STUFF
* {box-sizing: border-box; transition: 0.35s ease;}
.rela-block
setup(block, relative, auto)
.rela-inline
setup(inline-block, relative, auto)
.floated
setup(inline-block, relative, $x)
float left
.abs-center
setup($x, absolute, $x, 50%, $x, $x, 50%)
transform translate(-50%, -50%)
text-align center
width 88%
// --- COLORS ---
// --- PAGE STYLINGS ---
body
font('Open Sans',18px,0px,400,28px)
background: url('http://kingofwallpapers.com/leaves/leaves-016.jpg') right no-repeat
background-size: cover
&:before
content ""
setup($x,fixed,0,0,0,0,0)
background-color rgba(255,255,255,0.92)
.caps {text-transform: uppercase;}
.justified {text-align: justify;}
p.light {color: #777;}
h2 {font('Open Sans',30px,5px,600,40px); color: black}
h3 {font('Open Sans',21px,1px,600,28px); color: black}
.page
width 90%
max-width 1200px
margin 80px auto
background-color white
box-shadow 6px 10px 28px 0px rgba(0,0,0,0.4)
.top-bar
height 220px
background-color #848484
color white
.name
setup($x,absolute,$x,$x,0,0,calc(350px + 5%))
height 120px
text-align center
font('Raleway',58px,8px,100,60px)
& div {width: 94%}
.side-bar
setup($x,absolute,$x,60px,$x,0,5%)
width 350px
background-color #F7E0C1
padding 320px 30px 50px
.mugshot
setup($x,absolute,$x,50px,$x,$x,70px)
height 210px
width 210px
& .logo {margin: -23px;}
.logo
$midSize = 250px; // Controls overall size
setup($x,absolute,$x,0,$x,$x,0)
z-index 100
margin 0
color black
height $midSize
width $midSize
& .logo-svg
height 100%
width 100%
stroke black
cursor pointer
& .logo-text
setup($x, absolute, $x, 58%, 16%)
cursor pointer
font("Montserrat", $midSize/5 + $midSize/50, 0px, 400, $midSize/5 + $midSize/30)
.social
padding-left 60px
margin-bottom 20px
cursor pointer
&:before
content ""
setup($x,absolute,$x,-4px,$x,$x,10px)
height 35px
width 35px
background-size cover !important
&.twitter:before{background: url('https://cdn3.iconfinder.com/data/icons/social-media-2026/60/Socialmedia_icons_Twitter-07-128.png') center no-repeat}
&.pinterest:before{background: url('https://cdn3.iconfinder.com/data/icons/social-media-2026/60/Socialmedia_icons_Pinterest-23-128.png') center no-repeat}
&.linked-in:before{background: url('https://cdn3.iconfinder.com/data/icons/social-media-2026/60/Socialmedia_icons_LinkedIn-128.png') center no-repeat;}
.side-header
font('Open Sans',18px,4px,600,28px)
margin 60px auto 10px
padding-bottom 5px
border-bottom 1px solid #888
.list-thing {padding-left: 25px; margin-bottom: 10px}
.content-container
margin-right 0
width calc(95% - 350px)
padding 25px 40px 50px
& > * {margin: 0 auto 25px}
& > h3 {margin: 0 auto 5px}
& > p.long-margin {margin: 0 auto 50px}
.title{width: 80%; text-align: center}
.separator
width 240px
height 2px
background-color #999
.greyed
background-color #DDD
width 100%
max-width 580px
text-align center
font('Open Sans',18px,6px,600,28px)
@media screen and (max-width: 1150px)
.name {color: white; font('Raleway',38px,6px,100,48px)}
// Some assembly required, batteries sold separately
// Inspiration
// https://www.pinterest.com/pin/556687203921295406/
Also see: Tab Triggers