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

              
                <div class="[ p-8 w-full h-screen ] [ flex justify-center items-center ] [ bg-gradient-to-b from-[hsl(302,33%,70%)] to-[hsl(302,33%,95%)] ] [ text-[hsl(302,20%,30%)] font-nunito ]">
  <div class="drop-shadow-clay">
    <div class="card [ p-[50px] max-w-lg rounded-[50px] ] [ bg-white shadow-clay-card ] [ flex items-center gap-5 flex-col md:flex-row lg:flex-row ]">
      <img class="object-scale-down max-w-[150px]" src="https://i.ibb.co/C99D91t/New-Project-16.png" alt="Save earth"><!-- Product image -->
      <div class="text-center md:text-left lg:text-left">
        <h3 class="text-xl font-bold mb-5">Charlie Pinkpup</h3><!-- Product title -->
        <p class="text-sm mb-10">A super-cute toy pup for your table-top that reminds you of taking notes at work.</p><!-- Product description -->
        <a href="#" class="[ py-4 px-6 rounded-[50px] in-flex ] [ font-bold text-white ] [ bg-gradient-to-r from-[hsl(227,65%,75%)] to-[hsl(277,50%,65%)] hover:bg-gradient-to-r hover:from-[hsl(277,50%,65%)] hover:to-[hsl(227,65%,75%)] shadow-clay-btn ]">Get this!</a><!-- Order button -->
      </div><!-- Card content -->
    </div><!-- Card -->
  </div><!-- Card wrapper -->
</div><!-- The container -->
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Lora&family=Nunito:wght@400;900&display=swap');

.card {
  --squircle-radius: 50px;
  --squircle-smooth: 1;
  -webkit-mask-image: paint(squircle);
}
              
            
!

JS

              
                tailwind.config = {
  theme: {
    extend: {
      fontFamily: {
        nunito: ["Nunito", "sans-serif"]
      },
      boxShadow: {
        "clay-card":
          "inset -10px -10px 20px hsl(302deg 25% 50% / 70%), inset 0 16px 32px hsl(302deg 25% 95%)",
        "clay-btn":
          "16px 16px 32px 0 hsl(277deg 50% 65% / 50%), inset -16px -16px 32px 0 hsl(277deg 50% 65%), inset 8px 8px 16px 0 hsl(227deg 65% 75% / 45%)"
      },
      dropShadow: {
        'clay': '35px 35px 35px hsl(302deg 25% 50%)',
      }
    }
  }
};

if ("paintWorklet" in CSS) {
  CSS.paintWorklet.addModule(
    "https://www.unpkg.com/css-houdini-squircle@0.1.3/squircle.min.js"
  );
}

              
            
!
999px

Console