Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                <svg class="svg">
  <clipPath id="my-clip-path" clipPathUnits="objectBoundingBox"><path d="M0.5,0.957 L0.462,1,0.431,0.951,0.386,0.988,0.363,0.935,0.313,0.965,0.298,0.909,0.245,0.931,0.238,0.874,0.182,0.887,0.184,0.829,0.127,0.834,0.138,0.777,0.08,0.773,0.1,0.719,0.044,0.706,0.072,0.655,0.018,0.633,0.053,0.588,0.003,0.558,0.045,0.518,0,0.482,0.048,0.448,0.009,0.405,0.061,0.38,0.029,0.331,0.085,0.314,0.061,0.262,0.118,0.253,0.102,0.197,0.16,0.197,0.153,0.14,0.211,0.149,0.212,0.091,0.268,0.109,0.278,0.052,0.33,0.078,0.349,0.023,0.397,0.057,0.424,0.006,0.465,0.046,0.5,0,0.535,0.046,0.577,0.006,0.604,0.057,0.651,0.023,0.671,0.078,0.722,0.052,0.733,0.109,0.788,0.091,0.79,0.149,0.847,0.14,0.84,0.197,0.898,0.197,0.883,0.253,0.94,0.262,0.916,0.314,0.971,0.331,0.94,0.38,0.992,0.405,0.953,0.448,1,0.482,0.956,0.518,0.997,0.558,0.948,0.588,0.983,0.633,0.929,0.655,0.957,0.706,0.901,0.719,0.92,0.773,0.863,0.777,0.874,0.834,0.816,0.829,0.819,0.887,0.762,0.874,0.756,0.931,0.702,0.909,0.687,0.965,0.638,0.935,0.614,0.988,0.57,0.951,0.539,1"></path></clipPath>
</svg>

<div class="wrapper">
  <div class="container">
    <div class="header">
      <h1>Cakes & drinks</h1>
    </div>

    <img 
      class="img img--cakes"
      src="https://yoksel.github.io/Sandbox/img/demo/cake-jennifer-pallian.jpeg" 
     alt="">

    <p>
      Quis viverra nibh cras pulvinar mattis. Varius vel pharetra vel turpis. Orci ac auctor augue mauris augue neque. Dolor sed viverra ipsum nunc. Proin fermentum leo vel orci porta non. Velit dignissim sodales ut eu. Neque laoreet suspendisse interdum consectetur libero id.
    </p>

    <p>
      Duis ultricies lacus sed turpis tincidunt id aliquet. Ornare aenean euismod elementum nisi quis eleifend quam adipiscing. Vitae justo eget magna fermentum iaculis eu non. Orci eu lobortis elementum nibh tellus molestie nunc. Purus in massa tempor nec. Orci dapibus ultrices in iaculis nunc. Vestibulum morbi blandit cursus risus at ultrices mi tempus imperdiet.
    </p>

    <p>
  Vulputate eu scelerisque felis imperdiet proin fermentum leo vel. Ornare quam viverra orci sagittis eu volutpat odio. Et leo duis ut diam quam nulla porttitor. Erat velit scelerisque in dictum non. Facilisis leo vel fringilla est. 
    </p>

    <img 
      class="img img--drinks"
      src="https://yoksel.github.io/Sandbox/img/demo/iсed-tea-jennifer-pallian.jpeg" 
     alt="">

    <p>
      Nibh praesent tristique magna sit amet purus gravida. Diam sollicitudin tempor id eu nisl nunc. Augue mauris augue neque gravida in fermentum. Ut aliquam purus sit amet luctus venenatis lectus magna. Pulvinar pellentesque habitant morbi tristique senectus.
    </p>

    <p>
      Ornare aenean euismod elementum nisi quis eleifend quam adipiscing. Vitae justo eget magna fermentum iaculis eu non. Orci eu lobortis elementum nibh tellus molestie nunc. Purus in massa tempor nec. Orci dapibus ultrices in iaculis nunc. Vestibulum morbi blandit cursus risus at ultrices mi tempus imperdiet.
    </p>

    <p>
      Proin fermentum leo vel orci porta non. Velit dignissim sodales ut eu. Neque laoreet suspendisse interdum consectetur libero id. Duis ultricies lacus sed turpis tincidunt id aliquet.
    </p>  
  </div>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Pacifico&display=swap');

HTML, BODY {
  height: 100%;
  font-size: 16px;
  line-height: 1.5;
  font-family: Trebuchet MS, Helvetica, Arial, sans-serif;
}

BODY {
  background-color: #222;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,.025) 10%, transparent 0),
    linear-gradient(to bottom, rgba(255,255,255,.025) 10%, transparent 0),
    linear-gradient(#111, #000);
  background-size: .75em 100%, 100% .75em, 100% 100%;
  background-attachment: fixed;
  display: flex;
  align-items: center;
}

.svg {
  position: absolute;
  width: 0;
  height: 0;
}

.wrapper {
  margin: auto;
  padding: 7rem 7rem 2rem;
}

.container {
  min-width: 500px;
  max-width: 900px;
  padding: 2rem;
  background: #FFF;
  hyphens: auto;
}

P {
  margin: 0;
  
  & + & {
    margin-top: 1rem;
  }
}

.header {
  float: left;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem;
  margin-top: calc(400px / -2.25 + 2rem);
  margin-left: calc(400px / -2.25 + 2rem);
  width: 400px;
  height: 400px;
  background-color: steelblue;
  background-image: 
    linear-gradient(to right top, rgba(255,255,255,.2) 50%, transparent 0),
    linear-gradient(hotpink, tomato);
  background-size: 2rem 100%, 100% 100%;
  
  // clip-path: polygon(100% 0%, 95% 50%, 100% 100%, 0% 100%, 5% 50%, 0% 0%);
  // shape-outside: polygon(89% -45%, 86% -18%, 92% 56%, 0% 56%, -0% -45%);
  clip-path: url(#my-clip-path);
  shape-outside: polygon(-10% -10%, 87% -11%, 92% 14%, 88% 44%, 74% 71%, 51% 83%, 18% 92%, -11% 90%);
  shape-margin: 1rem;
  text-align: center;
  color: #FFF;
}

H1 {
  font-family: 'Pacifico', cursive;
  font-weight: normal;
  font-size: 5rem;
  line-height: 1.2;
  text-shadow: 2px 2px 0 rgba(0,0,0,.25);
}

.img {
  display: block;
  max-width: 50%;
  height: auto;
  shape-margin: 2rem;
}

.img--cakes {
  float: right;
  clear: right;
  margin-top: -4rem;
  margin-right: -4rem;
  clip-path: polygon(36% 16%, 45% 0%, 100% 0%, 99% 100%, 72% 100%, 65% 92%, 56% 75%, 57% 62%, 43% 56%, 33% 42%, 37% 26%);
  shape-outside: polygon(36% 16%, 45% 0%, 100% 0%, 99% 100%, 72% 100%, 65% 92%, 56% 75%, 57% 62%, 43% 56%, 33% 42%, 37% 26%) border-box;
}

.img--drinks {
  float: left;
  clear: left;
  max-width: 25%;
  margin-top: 1rem;
  margin-left: -4rem;
  clip-path: polygon(0% 0%, 30% 0%, 54% 5.14%, 76% 18%, 81% 60%, 64.79% 83%, 35% 99.29%, 0% 100%);
  shape-outside: polygon(0% 0%, 30% 0%, 54% 5.14%, 76% 18%, 81% 60%, 64.79% 83%, 35% 99.29%, 0% 100%) border-box;
}
              
            
!

JS

              
                // Images: https://unsplash.com/@foodess
              
            
!
999px

Console