Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ 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

Auto Save

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

              
                <!--- This is how I make my "OS window" design on my Neocities site (Credit: WolfKat from wolfkat-webdev.neocities.org) --->
<article class="window window--classic">
    <h1 class="window-title">Page/Window Title</h1>
    <div class="inner-window">
        <span id="article-top"></span>
        <section>
            <h2>Heading</h2>
            <p>Content goes here! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi non, quo ab iusto amet animi ipsum dolores natus sapiente mollitia temporibus consequatur qui? Laboriosam natus ullam sed! Rerum, perspiciatis laudantium.</p>
            <p class="back-to-top wolfOS-font--classic">
                <a href="#article-top">Back to Top</a>
            </p>
        </section>
    </div>
</article>

<!--- The window classes can be applied to <aside> elements as well for more windows! Be sure the "h1" window title is changed to "h2" as there shoud only be one h1 on an entire page. --->
<aside class="window window--classic">
    <h2 class="window-title">Another Window Title</h2>
    <a href="#" class="exit-button wolfOS-font--classic wolfOS-button--classic">X</a>
    <div class="inner-window">
        <span id="aside1-top"></span>
        <section>
            <h3>Heading</h3>
            <p>Content goes here! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi non, quo ab iusto amet animi ipsum dolores natus sapiente mollitia temporibus consequatur qui? Laboriosam natus ullam sed! Rerum, perspiciatis laudantium.</p>
            <p class="back-to-top wolfOS-font--classic">
                <a href="#aside1-top">Back to Top</a>
            </p>
        </section>
    </div>
</aside>
              
            
!

CSS

              
                /* This gives the actual visual appearance and functions of my "OS window" design (Credit: WolfKat from wolfkat-webdev.neocities.org) */
*, 
*::before, 
*::after {
    margin: 0;
    padding: 0;
    font: inherit;
    box-sizing: border-box;
}

:root {
    --color-black: #121212;
    --color-white: #ebebeb;
    /* Put in your own colors! */
    --main-color: #323232; /* For backgrounds */
    --aux-color: #232323;
    --contrast-color: #fefefe; /* For text | Should contrast well against the main and aux colors */
    --accent-color: #33ccff; /* Whatever pops out from main and aux! Use --color-white or --color-black for contrast when this is a background color behind text (like in my "window-title" class) */
    --shadow-color: #111111;

    --font-size--base: 20px;
    --font-size--small: 0.9em;
    --font-size--medium: 1.25em;
    --font-size--large: 1.6em;
    --font-size--largest: 2.2em;

    --font-family--general: "Fanwood", Arial, Georgia;
    --font-family--titles: "League Spartan", Helvetica, Tahoma;
    --font-family--bulky-digital: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    --font-family--sleek-digital: "Orbitron", "Agency FB Bold", Arial, Helvetica, sans-serif;

    --window-title-height: 1.5em;
}

body {
    background-color: var(--aux-color);
    color: var(--contrast-color);
    font-family: var(--font-family--general);
    font-size: var(--font-size--base);
    line-height: 1.25em;
}

h1, 
h2, 
h3, 
h4, 
h5, 
h6 {
    display: block;
    margin: 1.3em auto 1rem auto;
    width: 90%;
    font-family: var(--font-family--titles);
    line-height: 1em;
    text-wrap: balance;
    text-align: center;
}

h1 {
    margin: 1rem auto;
    font-size: var(--font-size--largest);
}

h2 {
    font-size: var(--font-size--large); 
}

h3, 
h4, 
h5, 
h6 {
    font-size: var(--font-size--medium);
}

article, 
aside {
    display: block;
    position: relative;
    margin: 2rem auto;
    width: 100%;
    min-height: 8em;
    max-height: 90vh;
}

.window {
    overflow: hidden;
    display: flex;
    /* Flex ensures that the inner-window contents aren't cut off from the overflow, as it won't fit into the scroll space without this. */
    flex-direction: column;
    padding: 0;
    min-width: 45ch;
    max-width: 70vw;
    background-color: var(--main-color);
    border-color: var(--accent-color);
    box-shadow: 0px 0px 6px 0px var(--shadow-color);
}

.window p,
.window blockquote {
    display: block;
    width: 98%;
    height: auto;
    margin: 2em auto;
    text-align: left;
}

.window p {
    max-width: 75ch;
}

.window blockquote {
    padding: 1em 0px;
    max-width: 55ch;
    border-width: 1px 0px;
    border-style: solid;
    border-color: var(--accent-color);
    font-size: var(--font-size--medium);
    font-style: italic;
    letter-spacing: 1px;
    line-height: 1.3em;
}

.window ol, 
.window ul {
    display: block;
    margin: 1rem auto;
    max-width: 45ch;
    text-align: left;
}

.window ul {
    list-style-type: none;
}

.window li {
    margin: 0.9rem 0.2rem;
}

/* The "classic" and "modern" classes are modular properties depending on the window styles you want */
.window--classic {
    border-width: 6px;
    border-style: ridge;
}

.window--modern {
    border-width: 1px;
    border-style: solid;
}

.window .window-title {
    position: relative;
    top: 0px;
    left: 0px;
    right: 0px;
    padding: 0 1ch;
    margin: 0px;
    width: 100%;
    height: var(--window-title-height);
    background-color: var(--accent-color);
    color: var(--color-black);
    line-height: var(--window-title-height);
}

@media (prefers-color-scheme: light) {
    .window .window-title {
        color: var(--color-white);
    }
}

.window--classic .window-title {
    border-width: 0px;
    border-style: ridge;
    border-color: var(--accent-color);
    border-bottom-width: 6px;
    font-family: var(--font-family--bulky-digital);
}

/* Other modular style classes */
.wolfOS-font--classic {
    font-family: var(--font-family--bulky-digital);
}

.wolfOS-font--modern {
    font-family: var(--font-family--sleek-digital);
}

.wolfOS-button--classic {
    border-style: outset;
    border-width: 2px;
}

.wolfOS-button--modern {
    border-style: solid;
    border-width: 1px;
}

/* Screen size adjustments */
@media (max-width: 700px) {
    .window {
        margin: 5px auto;
        min-width: 20ch;
        max-width: 70ch;
    }
}

.inner-window {
    overflow: auto;
    display: block;
    position: relative;
    padding: 1em 2em 0px 2em;
    width: 100%;
    height: 100%;
    flex-grow: 1;
}

.window .back-to-top {
    width: 99%;
    height: 3em;
    text-align: center;
}

.window .back-to-top a:link,
.window .back-to-top a:visited {
    margin: 0px auto;
	color: var(--accent-color);
    font-size: var(--font-size--medium);
}

.exit-button:link,
.exit-button:visited {
    display: block;
    position: absolute;
    top: 0px;
    right: 0px;
    padding: 0.5em 0.6em;
    margin: 2px;
    background-color: var(--main-color);
	color: var(--accent-color);
    font-size: var(--font-size--medium);
    line-height: 0.5em;
    text-decoration: none;
    text-align: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console