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.
<header>
<div class="header-container">
<a href=""><h1>Plugins</h1></a>
<span class="dashicons dashicons-arrow-down-alt2"></span>
<nav role="navigation" class="subnav">
<a href="">Favorites</a>
<a href="">Beta Testing</a>
<a href="" class="active">Developers</a>
<span>
<input type="text" class="searchfield" placeholder="Search plugins">
<button class="button button-primary button-search"><i class="dashicons dashicons-search"></i></button>
</span>
</nav>
</div>
</header>
<section>
<article>
<h1>Add Your Plugin</h1>
<p>Once submitted, your plugin will be manually reviewed for any common errors as well as ensuring it complies with all the guidelines.</p>
<p>Even if you’ve submitted a dozen plugins, take the time to refresh your memory with the following information:</p>
<ul>
<li><a href="">How to use SVN</a></li>
<li><a href="">Deploying your plugin</a></li>
<li><a href="">Plugin assets (and how to use them)</a></li>
<li><a href="">Developer FAQ</a></li>
</ul>
</article>
</section>
<div class="container">
<article>
<h1>FAQs</h1>
<h2>How long will the review process take?</h2>
<p>This is in the <a href="">Developer FAQ</a>. It takes anywhere between 1 and 10 days. We attempt to review all plugins within 5 business days of submission, but the process takes as long as it takes, depending on the complexity of your plugin.</p>
<h2>What will my plugin URL be?</h2>
<p>Your plugin’s URL will be populated based on the value of Plugin Name in your main plugin file (the one with the plugin headers). If you set yours as <code>Plugin Name: Boaty McBoatface</code> then your URL will be <code>https://wordpress.org/plugins/boaty-mcboatface</code> and your slug will be <code>boaty-mcboatface</code> for example. If there is an existing plugin with your name, then you will be boaty-mcboatface-2 and so on. It behaves exactly like WordPress post names.</p>
<p>Once your plugin is approved, it <em>cannot</em> be renamed.</p>
<h2>I made a mistake in my plugin name. Should I resubmit?</h2>
<p>Please don’t! Instead email <code>plugins@wordpress.org</code> and we can rename your plugin as long as it’s not approved. Since we check emails first, the odds are we’ll catch it. If we don’t, just email us and explain the mistake. We’ll explain what do to.</p>
<h2>Why was I told my plugin name was unacceptable?</h2>
<p>This is explained in detail in our <a href="">detailed plugin guidelines</a>, but currently we give you the chance to rename yout during the review process if the plugin name violates the guideline. Some terms (like ‘plugin’ and ‘wordpress’) will be removed for you, as those should not be used at all. We get it. You’re a WordPress Plugin.</p>
<p>Regarding other companies and plugins’ names and trademarks, don’t use them to start your plugin name. If you’re not Facebook, you shouldn’t submit a plugin that uses facebook as the first term in your slug. “Facebook Like Sharer” (which would be facebook-like-sharer) is not acceptable, but “Like Sharer for Facebook (which would be like-sharer-for-facebook) would be alright.</p>
</article>
</div>
<div class="container">
<article>
<h1>Submit Plugin</h1>
<p>Use the form below to upload your plugin.</p>
<div class="notification info">Currently there are 4 plugins in the review queue, 2 of which are awaiting their initial review.</div>
<form class="submit-plugin">
<p>Select up to 3 categories</p>
<div class="categories">
<label><input type="checkbox" /> Accessibility</label>
<label><input type="checkbox" /> Advertising</label>
<label><input type="checkbox" /> Analytics</label>
<label><input type="checkbox" /> Arts & Entertainment</label>
<label><input type="checkbox" /> Authentication</label>
<label><input type="checkbox" /> Business</label>
<label><input type="checkbox" /> Calendar & Events</label>
<label><input type="checkbox" /> Communication</label>
<label><input type="checkbox" /> Contact Forms</label>
<label><input type="checkbox" /> Customization</label>
<label><input type="checkbox" /> Discussion & Community</label>
<label><input type="checkbox" /> eCommerce</label>
<label><input type="checkbox" /> Editor & Writing</label>
<label><input type="checkbox" /> Education & Support</label>
<label><input type="checkbox" /> Language Tools</label>
<label><input type="checkbox" /> Maps & Location</label>
<label><input type="checkbox" /> Media</label>
<label><input type="checkbox" /> Multisite</label>
<label><input type="checkbox" /> Performance</label>
<label><input type="checkbox" /> Ratings & Reviews</label>
<label><input type="checkbox" /> Security & Spam Protection</label>
<label><input type="checkbox" /> SEO & Marketing</label>
<label><input type="checkbox" /> Social & Sharing</label>
<label><input type="checkbox" /> Taxonomy</label>
<label><input type="checkbox" /> User Management</label>
<label><input type="checkbox" /> Utilities & Tools</label>
</div>
<div class="upload">
<p>Select your file to upload. Maximum allowed file size is <strong>25MB</strong></p>
<label class="btn-selectfile">
<input type="file" id="zip_file" name="zip_file">
<span>Select file</span>
</label>
<input id="upload_button" class="button button-primary" type="submit" value="Upload">
</div>
</form>
</article>
</div>
<div class="container" style="display:none;">
<article>
<p>Before you can upload a plugin, <a href="">please log in</a>.</p>
</article>
</div>
$max-width: 53rem;
.notification {
padding:.5rem;
background:$color__green;
text-align:center;
font-size:ms(-2);
cursor:pointer;
}
@media ( min-width:67rem ) {
.notification { margin:1rem auto 0; max-width:$max-width; }
}
.notification.info {
background: #E5F5FA;
text-align: left;
cursor: default;
border-left: 3px solid #00A0D2;
}
.submit-plugin {
.upload {
margin-top: 2rem;
label.btn-selectfile input[type="file"] {
position: fixed;
top: -1000px;
}
span {
@extend .button;
vertical-align: top;
@media(min-width: 783px) {
line-height: 1.8;
}
}
}
.categories {
column-count: 1;
@extend .clearfix;
> label {
display: block;
font-size: ms(-2);
margin-bottom: 8px;
}
@media (min-width: 414px) {
column-count: 2;
}
@media (min-width: $ms-breakpoint) {
> label {
margin-bottom: 0;
}
}
}
}
.subpage {
header {
position:absolute;
top:0;
left:0;
width:100%;
padding:1rem 0;
margin-bottom:-1rem;
z-index:1;
background:$color__wp-blue;
overflow:hidden;
h1 {
font-size:ms(4);
text-align:left;
color:#FFF;
margin:0 2rem 0 0;
max-width:50rem; //1050px
display:inline;
line-height:1;
}
&.open {
-webkit-box-shadow:0 1px 8px rgba(0,0,0,.5);
box-shadow:0 1px 8px rgba(0,0,0,.5);
.subnav {
max-height:400px;
padding:1rem 0 0;
a, span {
opacity:1;
-webkit-transition: opacity .3s ease;
transition: opacity .3s ease;
&:last-child { padding-bottom:0; }
}
}
}
}
.container, section {
max-width: $max-width;
margin:0 auto;
padding:3rem 0;
@extend .clearfix;
border-top:2px solid #EEE;
article {
max-width: ms(32);
margin:0 auto;
padding:0 2rem;
h1 {
@extend h3;
}
h2 {
@extend h5;
}
}
}
header + .container {
border-top: none;
padding-top:60px;
}
}
@media ( min-width:$ms-breakpoint ) {
.subpage header + .container {
padding-top: 78px;
}
}
.header-container {
max-width:50rem;
margin:0 auto;
padding:0 2rem;
position:relative;
@extend .clearfix;
[class*='dashicons-arrow-'] {
color:#FFF;
position:absolute;
top:-1rem;
right:0;
display:block;
cursor:pointer;
padding:1.1rem 2rem;
width:auto;
height:auto;
font-size:ms(4);
}
a:hover {
text-decoration: none;
}
}
.subnav {
width:100%;
padding:0;
-webkit-transition: max-height .2s ease;
transition: max-height .2s ease;
max-height:0;
a, span {
display:block;
font-size:ms(-2);
border-top:1px solid rgba(255,255,255,.2);
padding:1rem;
margin:0;
opacity:0;
text-decoration:none;
color:rgba(255,255,255,.8);
position:relative;
&:hover, &.active {
color:#FFF;
}
&.active {
border-color:rgba(255,255,255,.2);
}
}
input.searchfield {
border: 0;
padding: 5px 10px;
position: relative;
border-radius: 2px;
width: 10rem;
}
input + .button.button-search {
display: none;
border-radius: 0 2px 2px 0;
margin-left: -7px;
position: relative;
top: 0;
border-left: none;
&:active {
top: 0;
border-right: 1px solid #006799;
box-shadow: none;
background: #006799;
}
.dashicons {
color: #FFF;
font-size: 1rem;
margin: auto;
}
}
}
@media (min-width:1024px) {
.subpage {
header {
position:relative;
&.open {
-webkit-box-shadow:none;
box-shadow:none;
.subnav {
padding:0;
}
}
}
}
.header-container [class*='dashicons-arrow-'] { display:none; }
.subpage header + .container { padding-top:1rem; }
.subnav {
position:absolute;
top:0rem;
right:0;
z-index:10;
width:auto;
height:auto;
a, span {
margin-right:2rem;
display:inline;
opacity:1;
padding:0;
border:none;
&.active { border-bottom:1px solid #FFF; }
}
input.searchfield {
border-radius: 2px 0 0 2px;
}
input + .button.button-search {
top: 1px;
display: inline-block;
}
}
}
@media (min-width: 67rem) {
.header-container {
padding: 0;
}
.subnav a:last-child, .subnav span:last-child {
margin-right: 0;
}
.subpage header + .container { padding-top:3rem; }
}
header {
padding: ms(4) ms(1);
background:$color__wp-blue;
h1 {
text-align:center;
color:#FFF;
line-height: 1;
}
.subheading {
color:#FFF;
}
form {
margin-bottom:2rem;
input[type="search"] {
width: ms(28);
padding:.5rem;
display:block;
margin:0 auto;
border:none;
}
}
@media (min-width: $ms-breakpoint) {
padding: ms(4);
}
}
// Mobile Subnav open/close
$(document).ready(function() {
$('.header-container .dashicons').click(function() {
$('header').toggleClass('open');
if ($('header').hasClass('open')) {
$('.dashicons').removeClass('dashicons-arrow-down-alt2').addClass('dashicons-arrow-up-alt2');
} else {
$('.dashicons').removeClass('dashicons-arrow-up-alt2').addClass('dashicons-arrow-down-alt2');
};
});
});
// Accordion Tables
$(function() {
$(".table__accordion tr:not(.table__accordion-show)").hide();
$(".table__accordion tr:first-child").show();
$(".table__accordion tr.table__accordion-trigger").click(function(){
$(this).prevAll(".table__accordion tr:not(.table__accordion-show)").fadeToggle(100);
}).eq().trigger('click');
$(".table__accordion-trigger td").click(function() {
$(this).toggleClass('less');
if ($(this).hasClass('less')) {
$(this).children().removeClass('dashicons-arrow-down-alt2').addClass('dashicons-arrow-up-alt2');
} else {
$(this).children().removeClass('dashicons-arrow-up-alt2').addClass('dashicons-arrow-down-alt2');
};
});
});
Also see: Tab Triggers