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.


                <p>💚 All Kudos to <a href="">Ana Tudor</a> who built this UI component and <a href="">Chris Coyier</a> for <a href="">sharing how they used this approach in the CSS Tricks redesign</a>! 💚</p>

<div class="container">
  <div class="elem">Hello world</div>


                * {
  &, &:before, &:after {
    background-color: #fff;
    box-sizing: border-box;
    font-family: sans-serif;

body {
  margin: 0;
  padding: 1em;
  --width: 50vw;
  --small-radius: 1.875em;
  --big-radius: 2.5em;
  --blue-bright: #cbe1ef;
  --blue: #4aa9e8;
  --blue-dark: #0887a6;
  --border-width: 5px;

.container {
  display: flex;
  flex-direction: column;
  align-items: flex-end; 

p {
  display: block;
  text-align: center;
  margin: 0 auto;
  max-width: 60ch;

.elem {
  position: relative;
  width: var(--width);
  margin: 3em calc(var(--width) / 2) 1em 0;
  border: solid var(--border-width) transparent;
  color: #444;
    /* gray gradient inside of the box */
    linear-gradient(#f1f1f1, #ccc) padding-box,
    /* blue gradient coming from the left 50% wide */
    linear-gradient(90deg, var(--blue-dark), var(--blue)) 
      0 0 / 50% 100% no-repeat border-box,
    /* bright blue gradient coming from the right 50% wide and 75% heigh */
    linear-gradient(-90deg, var(--blue-bright), var(--blue)) 
      100% 100% / 50% 75% no-repeat border-box;
  border-radius: var(--small-radius) 0 var(--big-radius) var(--small-radius);
  height: calc(2 * var(--small-radius));
  display: grid;
  place-items: center;
  &::after {
    position: absolute;
    left: 100%; 
    bottom: 75%;
    width: calc(var(--width) / 2); 
    height: var(--big-radius);
    border: inherit;
    border-color: var(--blue-bright);
    border-width: var(--border-width) 0 0 var(--border-width);
    border-radius: var(--small-radius) 0 0 0;
    content: ''