Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource


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


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.


Save Automatically?

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.


                <h1>Static grid "tic-tac-toe-like".</h1>
<p>This grid is "static", uses a lot of classes to adapt the :before and :after pseudo elements depending on the position of each item.<br />
    Please visit this <a href="" target="_top">automatic grid</a>, much better, that uses SCSS functions and variables.</p>
<div class="ttt" id="tic-tac-toe">
    <div class="ttt__box ttt__box--left">1</div>
    <div class="ttt__box">2</div>
    <div class="ttt__box ttt__box--right">3</div>
    <div class="ttt__box ttt__box--left">4</div>
    <div class="ttt__box">5</div>
    <div class="ttt__box ttt__box--right">6</div>
    <div class="ttt__box ttt__box--left ttt__box--bottom">7</div>
    <div class="ttt__box ttt__box--bottom">8</div>
    <div class="ttt__box ttt__box--bottom">9</div>
My "Proposition" for a tic-tac-toe-like grid...


                .ttt {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    margin: 10vh auto;
    width: 80vh;
    height: 80vh;
    &__box {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        height: 100%;
        text-align: center;
        &:not(&--left)::before {
            display: block;
            position: absolute;
            left: 0;
            border-left: 1px solid #000;
            width: 0;
            height: 100%;
            content: '';
        &:not(&--bottom)::after {
            display: block;
            position: absolute;
            bottom: 0;
            left: 0;
            border-bottom: 1px solid #000;
            width: 100%;
            height: 0;
            content: '';

     General appearance, nothing related to what you see ;-)
* {
     box-model: border-box;
body {
     line-height: 1.2em;
     font-family: "Segoe UI", sans-serif;