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. 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.
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.
If the stylesheet 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 CSS 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.
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.
.rm_overlay#fundraise
.rm_overlay--modal
.rm_modal--header
h1 Get started
p <b>1,231</b> people have already<br />started raising money for water
ul.rm_header--navigation
li.active.rm_float--left
span 1
span About You
li
span 2
span Project Details
li
span 3
span Create Project
.rm_modal--content
.rm_input-group.split
.rm_input-group--col.w-50
label Your Name
span *
input(type='text', placeholder='First Name', v-model='user.first_name')
.rm_input-group--col.w-50
label
input(type='text', placeholder='Last Name', v-model='user.last_name')
.rm_input-group
label Email Address
span *
input(type='text', placeholder='Your Email', v-model='user.email')
.rm_input-group
label Phone Number
span *
input(type='text', placeholder='(123) 456-7890', v-model='user.phone')
a.rm_button--next(href='#') Continue
.rm_modal--footer
.rm_float--right
| Already have an account?
a.rm_link(href='#') Sign in
a.rm_link(href='#') Register a group
@import 'nib'
*
box-sizing border-box
html,
body
min-height 100%
margin 0
padding 0
body
background linear-gradient(-45deg, #031634, #033649)
background-repeat no-repeat
background-size cover
/*
* Variables
*/
$screenXS = 468px
$screenSM = 768px
$screenMD = 990px
$fn = "Avenir", "Helvetica Neue", "Helvetica", "Arial", sans-serif
$bl = #111
$gr = #E1E1E1
$green = #00B16A
$text = #22313F
.rm_overlay
background rgba(#4F4F4F, 0.15)
fixed top left
height 100%
overflow auto
width 100%
.rm_overlay--modal
absolute top 0 left 0 right 0 bottom 0
font-family $fn
margin 30px auto
padding 0 30px 30px
width 100%
@media (min-width: $screenSM)
max-width 560px
.rm_modal--header
color white
letter-spacing 0.025em
text-align center
& > h1
font-size 36px
font-weight 700
& > p
font-size 16px
font-weight 100
margin 8px 0 0
opacity 0.85
text-transform initial
.rm_header--navigation
list-style none
margin 0 0 24px
padding 0
text-align right
clearfix()
li
display inline-block
transition all 300ms ease
span:first-of-type
border 1px solid white
border-radius 32px
display inline-block
height 32px
line-height 32px
text-align center
width 32px
& + span
display none
&.active span + span
margin-left 10px
display inline-block
&:not(.rm_float--right)
margin-right 5px
&.rm_float--right
margin-left 5px
.rm_modal--content
background white
box-shadow 0 30px 20px -30px rgba(black, 1)
border-radius 2px
font-family $fn
margin 0 auto 15px
max-height 100%
// min-height 200px
overflow auto
padding 30px
.rm_modal--footer
color $text
font-size 12px
margin 15px 0 0
clearfix()
/*
* Form Control
*/
.rm_input-group
border 1px solid $gr
margin-bottom 15px
padding 10px
width 100%
label
color $bl
display inline-block
font-size 12px
font-weight 600
line-height 12px
margin 0
text-transform uppercase
vertical-align top
span
color #CF000F
display inline-block
vertical-align top
input[type="text"],
select
appearance none
border 0
border-radius 0
color lighten($bl, 15%)
font-size 16px
font-weight 300
height 24px
padding 0
width 100%
&.split
clearfix()
.rm_input-group--col
float left
padding-right 10px
input
border-right 1px solid $gr
&:nth-child(n+2)
padding-left 10px
&:last-of-type
padding-right 0
input
border-right 0
&.w-50
width 50%
&.w-33
width 33.33333%
.rm_button--next
appearance none
background-color $green
border-radius 2px
color white
display block
font-size 20px
font-weight 600
letter-spacing 0.15em
padding 15px 20px
text-align center
text-decoration none
text-transform uppercase
width 100%
.rm_link
color $text
font-size 12px
font-weight 300
/*
* Niche Styles
* @gallery, @floats
*/
.rm_float--right
float right
.rm_float--left
float left
$('ul.rm_header--navigation li').on 'click', ->
$this = $(this)
$this
.addClass 'active rm_float--left'
.siblings '.active'
.removeClass 'active'
return false
new Vue(
el: "#fundraise"
data:
user: {}
)
Also see: Tab Triggers