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. 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.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <header>CSS Grid Transforms</header>
    <div class="cont">
        <div class="area1">
            <h3>Area 1</h3>
        <div class="area2">
            <h3>Area 2</h3>
        <div class="area3">
            <h3>Area 3</h3>
        <div class="area4">
            <h3>Area 4</h3>
        <div class="area5">
            <h3>Area 5</h3>
        <div class="area6">
            <h3>Area 6</h3>
        <div class="area7">
            <h3>Area 7</h3>
        <div class="area8">
            <h3>Area 8</h3>
        <div class="area9">
            <h3>Area 9</h3>
        <div class="area10">
            <h3>Area 10</h3>
        <div class="area11">
            <h3>Area 11</h3>
        <div class="area12">
            <h3>Area 12</h3>


    <div class="cont2">
        <div class="item1">Lorem, ipsum dolor sit </div>
        <div class="item2">Amet consectetur adipisicing elit</div>
        <div class="item3">Laboriosam ratione</div>
        <div class="item4">Distinctio vitae</div>
        <div class="item5">Dignissimos ad aliquid natus.</div>
        <div class="item6">Voluptatum dolores</div>
        <div class="item7">Quidem quasi tempore eos rem</div>
        <div class="item8">Velit maxime pariatur?</div>


$c-1st: darkslateblue;
$c-2nd: darkred;
$c-3rd: darkturquoise;
$c-4th: mediumslateblue;
$c-5th: olivedrab;
$c-blk: black;
$c-wht: white;
* { padding: 0; margin: 0; box-sizing: border-box; }
header { padding: 1.2rem 1rem; background-color: darken($c-1st, 5%); color: $c-wht; margin-bottom: 5rem;}
.cont {
    display: grid;
    grid-template-rows: repeat(auto-fit, minmax(150px, 1fr));
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    grid-gap: 20px;
    margin: 3rem;

    & > div {
        padding: .5rem;
        background: linear-gradient($c-1st, $c-3rd);

.area1, .area3, .area5, .area7, .area9, .area11 {
    transform: rotate(45deg);
.area2, .area4, .area6, .area8, .area10, .area12 {
    transform: rotate(-45deg);

.cont2 {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 1rem;
    margin-top: 10rem;

    & > div {
        padding: .5rem;
        background: linear-gradient($c-4th, $c-2nd);

    .item1, .item3 { transform: rotate(90deg); }
    .item2, .item4 { transform: rotate(-90deg); }
    .item5, .item7 { transform: rotate(45deg); }
    .item6, .item8 { transform: rotate(-45deg); }