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="stamp">Dubai Arrival 11.03.2022</div>
              
            
!

CSS

              
                /* Presets */

*, *:before, *:after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {

  /* font */
  --serif: 'Alkalami', serif;

  /* colors */
  --gray: #333;
  --white: #FFFFFF;

  /*dimensions */
  --width: 50vh;
  --height: 50vh;
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #cae3f1 url("https://assets.codepen.io/28337/passport-bg-icon2.png") top left repeat;
  background-position: 50% 50%;
}

div:before, div:after {
  display: block;
  position: absolute;
}

div.stamp {  
    backdrop-filter: grayscale(0%);
    filter: blur(0.1rem);
    width: var(--width);
    height: var(--height);
    display: flex;
    justify-content: center;
    align-items: start;
    padding: 4vh;
    border: solid 3px var(--gray);
    border-radius: 25px;
    transform: rotate(25deg);
    font-face: var(--serif);
    text-transform: uppercase;
    letter-spacing: 1vh;
    text-align: center;
    font-size: 7.25vh;
    line-height: 1.15;
    background:
    /* se */ radial-gradient(ellipse, var(--gray) 1vh, transparent 14vh) -180% -180% / 60vh 60vh no-repeat, 
    /* nw */ radial-gradient(ellipse, var(--gray) 1vh, transparent 14vh) 280% 280% / 60vh 60vh no-repeat; 
  
}

div.stamp:before {  
    width: calc(var(--width) - 2.5vh);
    height: calc(var(--height) - 2.5vh);
    margin: -3vh 1vh 1vh 1vh;
    display: flex;
    justify-content: center;
    align-items: end;
    overflow: hidden;
    border: solid 3px var(--gray);
    border-radius: 25px;
    content: 'International Airport';
    font-face: var(--serif);
    text-transform: uppercase;
    letter-spacing: .25vh;
    font-size: 2.5vh;
    padding-bottom: 5vh;
    padding-right: 3vh;
    padding-left: 10vh;
    text-align: right;
      
  
    /* placements */ 

    --airplane:
    /* 8th-left */ radial-gradient(ellipse, var(--gray) 1.75vh, transparent 1.75vh) 22% 75% / 3.75vh 8vh no-repeat,
    /* stem */ linear-gradient(180deg, var(--gray) 10vh, transparent 10vh) 22% 120% / 3vh 18vh no-repeat,
    /* stem */ linear-gradient(25deg, var(--gray) 4vh, transparent 4vh) 30% 80% / 6vh 8vh no-repeat,
    /* stem */ linear-gradient(-25deg, var(--gray) 4vh, transparent 4vh) 10% 80% / 6vh 8vh no-repeat,
    /* stem */ linear-gradient(25deg, var(--gray) 2vh, transparent 2vh) 28% 95% / 3vh 3vh no-repeat,
    /* stem */ linear-gradient(-25deg, var(--gray) 2vh, transparent 2vh) 16% 95% / 3vh 3vh no-repeat;
  
background: 
  var(--airplane);
}
div.stamp:after {  
    width: 44vh;
    height: 10vh;
    margin-top: 16vh;
    display: flex;
    justify-content: center;
    align-items: center;
    border: dashed 3px var(--gray);
    border-radius: 0px;
    content: '';

}
  
              
            
!

JS

              
                /* This entry is personal as I am taking the family on the first international trip in 3 years next month and am really excited for getting this passport stamp.There is a time-lapse video of making this piece at https://youtu.be/vPW7UJc8dig */
              
            
!
999px

Console