Pen Settings



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


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.


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.



  <div class="some-text">
      This is a <span class="pure">pure</span> CSS Popup.
    <a class="button" href="#popup">I am a Popup<a />

  <div class="popup" id="popup">
    <div class="popup__content">
        <h2 class="heading-secondary">Start booking now</h2>
        <h3 class="heading-tertiary">Important &ndash; Please read these terms before booking</h3>
        <p class="popup__text">
          Godard health goth green juice +1, helvetica taxidermy synth. Brooklyn wayfarers hoodie twee, keffiyeh XOXO microdosing fashion axe iPhone bespoke vape. Affogato brooklyn offal meditation raclette aesthetic heirloom post-ironic iPhone venmo leggings.
        <a href="#" class="button">Close Popup</a>



                // 3rd Party Imports
@import url(',300,400,500,600,700,800,900&display=swap');

// Variables

// Mixins
@mixin absCenter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

* {
  margin: 0;
  padding: 0;
  font-family: 'Poppins';
  box-sizing: border-box;

html {
  height: 100vh;

body {
  min-height: 100vh;

.some-text {
  @include absCenter;
  max-width: 800px;
  text-align: center;
  font-weight: 500;
  font-size: 24px;

.pure {
  color: #e75480;
  text-decoration: underline;
  font-weight: 600;

.button {
  background-color: #4CAF50; /* Green */
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border-radius: 100px;
  margin-top: 25px;

.popup {
  height: 100vh;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(black, .8);
  backdrop-filter: blur(10px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;

  // The url changes when the anchor is triggered and CSS can watch that
  &:target {
    opacity: 1;
    visibility: visible;
  &__content {
    @include absCenter; // Our mixin to center horizontally and vertically

    width: 75%;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2rem 4rem rgba(black, .2);
    border-radius: 10px;
    overflow: hidden; // This will keep the images sharp corners from protruding past the border-radius


  &__text {
    font-size: 1.4rem;
    margin-bottom: 4rem;



                // console.log(`Running...`)