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 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.
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 esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM 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.
<div class="template-wrap">
<div class="ep-flowchart" id="ep-flowchart">
<div class="ep-svg-wrap">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600">
<g id="Page-1" fill="none" fill-rule="evenodd">
<g id="Course-Template">
<g id="arrows" transform="translate(163 98)">
<g id="arrows/arrow-1.2" transform="rotate(90 69.5 70)">
<g id="arrow-1.2">
<path id="Line" stroke="#89969F" stroke-linecap="square" d="M.336 2.5h38.46"/>
<polygon id="Triangle" fill="#89969F" points="37 5 37 0 40 2.5"/>
</g>
</g>
<g id="arrows/arrow-1.2-copy" transform="rotate(90 27.5 112)">
<g id="arrow-1.2">
<path id="Line" stroke="#89969F" stroke-linecap="square" d="M.336 2.5h38.46"/>
<polygon id="Triangle" fill="#89969F" points="37 5 37 0 40 2.5"/>
</g>
</g>
<g id="arrows/arrow-4" transform="rotate(90 53 220.5)">
<g id="arrow-4">
<path id="Path-4" stroke="#89969F" d="M87 3H38.009C32.48 3 28 7.48 28 13v247c0 5.523 4.483 10 10.009 10H87"/>
<path id="Path-5" stroke="#89969F" d="M28.5 137H.996"/>
<polygon id="Triangle-2-Copy-2" fill="#89969F" points="87 6 87 0 90 3"/>
<polygon id="Triangle-2-Copy-4" fill="#89969F" points="87 273 87 267 90 270"/>
</g>
</g>
<g id="arrow-2" transform="translate(3 335)">
<path id="Path-2" stroke="#89969F" d="M0 0v73.009C0 78.527 4.485 83 9.992 83H70"/>
<polygon id="Triangle-2" fill="#89969F" points="70 86 70 80 73 83"/>
</g>
<g id="arrow-2-copy" transform="matrix(-1 0 0 1 271 335)">
<path id="Path-2" stroke="#89969F" d="M0 0v73.009C0 78.527 4.485 83 9.992 83H70"/>
<polygon id="Triangle-2" fill="#89969F" points="70 86 70 80 73 83"/>
</g>
</g>
<g id="ep-content" class="ep-svg-block"
@click="{{ display = true; selected = 'ep-content' }}"
transform="translate(229 56)">
<rect id="Rectangle" width="141" height="40" fill="#8BE5AD" rx="20"/>
<text id="Content" fill="#586075" font-family="Roboto-Regular, Roboto" font-size="18" letter-spacing="1">
<tspan x="27.022" y="25">CONTENT</tspan>
</text>
</g>
<g id="ep-form" class="ep-svg-block"
@click="{{ display = true; selected = 'ep-form' }}"
transform="translate(244 140)">
<rect id="Rectangle" width="112" height="40" fill="#8BE5AD" rx="20"/>
<text id="Content" fill="#586075" font-family="Roboto-Regular, Roboto" font-size="18" letter-spacing="1">
<tspan x="29.964" y="25">FORM</tspan>
</text>
</g>
<g id="ep-media" class="ep-svg-block"
@click="{{ display = true; selected = 'ep-media' }}"
transform="translate(239 224)">
<rect id="Rectangle" width="122" height="40" fill="#8BE5AD" rx="20"/>
<text id="Content" fill="#586075" font-family="Roboto-Regular, Roboto" font-size="18" letter-spacing="1">
<tspan x="31.49" y="25">MEDIA</tspan>
</text>
</g>
<g id="ep-unity" class="ep-svg-block"
@click="{{ display = true; selected = 'ep-unity' }}"
transform="translate(241 496)">
<rect id="Rectangle" width="118" height="40" fill="#8BE5AD" rx="20"/>
<text id="Content" fill="#586075" font-family="Roboto-Regular, Roboto" font-size="18" letter-spacing="1">
<tspan x="31.589" y="25">UNITY</tspan>
</text>
</g>
<g id="ep-elements" class="ep-svg-block"
@click="{{ display = true; selected = 'ep-elements' }}"
transform="translate(66 357)">
<rect id="Rectangle" width="200" height="74" fill="#8BE5AD" rx="37"/>
<text id="Elements-of-Design" fill="#586075" font-family="Roboto-Regular, Roboto" font-size="18" letter-spacing="1">
<tspan x="36.046" y="33">ELEMENTS OF </tspan> <tspan x="65.559" y="54">DESIGN</tspan>
</text>
</g>
<g id="ep-principles" class="ep-svg-block"
@click="{{ display = true; selected = 'ep-principles' }}"
transform="translate(335 357)">
<rect id="Rectangle" width="200" height="74" fill="#8BE5AD" rx="37"/>
<text id="Principles-of-Organi" fill="#586075" font-family="Roboto-Regular, Roboto" font-size="18" letter-spacing="1">
<tspan x="30.707" y="33">PRINCIPLES OF </tspan> <tspan x="30.196" y="54">ORGANIZATION</tspan>
</text>
</g>
</g>
</g>
</svg>
</div>
<transition name="pop-details">
<div class="ep-detail-wrap" v-show="selected != ''"
@click="{{selected = ''}}">
<div class="ep-detail" v-show="selected == 'ep-content'">
<h3>Content</h3>
<p>The Message. What we are trying to say.</p>
</div>
<div class="ep-detail" v-show="selected == 'ep-form'">
<h3>Form</h3>
<p>How you will express the message.</p>
</div>
<div class="ep-detail" v-show="selected == 'ep-media'">
<h3>Media</h3>
<p>The tools and materials you use to convey the message</p>
</div>
<div class="ep-detail" v-show="selected == 'ep-elements'">
<h3>Elements of Design</h3>
<p>Line, Shape, Value, Texture, Color, Illusion of Depth, Illusion of Movement</p>
</div>
<div class="ep-detail" v-show="selected == 'ep-principles'">
<h3>Principles of Organization</h3>
<p>Balance, Movement, Emphasis/Dpminance/Focal Point, Rhythm (through repetition), Economy, Variety</p>
</div>
<div class="ep-detail" v-show="selected == 'ep-unity'">
<h3>Unity</h3>
<p>Both a guiding principle and the end-result of a well-considered design.</p>
</div>
</div>
</transition>
</div>
</div>
$c-primary: #586075
$c-secondary: #8BE5AD
$c-accent: #F5F5F0
html, body
font-family: 'Roboto', 'Helvetica', sans-serif
padding: 0
margin: 0
div
box-sizing: border-box
.template-wrap
width: 600px
height: 100%
border: 1px solid #767676
margin: 0 auto
padding: .5em
figure
margin: 1em auto
// default
.ep-flowchart
width: 100%
position: relative
.ep-svg-wrap
.ep-svg-block
cursor: pointer
rect, text
transition: all .3s ease
&:hover rect, &:hover text
transform: translateY(-5px)
text-shadow: 0 1px 0 #fff, 0 -1px 0 #000
.ep-detail-wrap
position: absolute
background-color: rgba(0,0,0,.5)
top: 0
bottom: 0
left: 0
right: 0
.ep-detail
position: relative
font-size: 1.2me
background-color: $c-accent
color: $c-primary
transform: translateY(-50%)
margin: 50% auto
width: 60%
height: auto
padding: 1em 2em
border-radius: 15px
border: 5px solid $c-secondary
box-shadow: 0 15px 20px rgba(0,0,0,.2)
&::after
content: "\2716"
color: $c-secondary
position: absolute
top: -20px
right: -20px
display: inline-block
font-size: 15px
line-height: 20px
height: 20px
width: 20px
padding: 5px
text-align: center
background-color: $c-accent
border-radius: 50%
border: 5px solid
cursor: pointer
box-shadow: 0 3px 15px rgba(0,0,0,.2)
.pop-details-enter-active, .pop-details-leave-active
transition: all .3s ease-in-out
.pop-details-enter
opacity: 0
.pop-details-leave-to
opacity: 0
var ep = new Vue({
el: '#ep-flowchart',
data: {
selected: ''
},
methods: {
}
})
Also see: Tab Triggers