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. 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

JavaScript

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

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <header class="Header">
  <nav class="Header-nav">
    <a href="#" class="Header-nav-link">Back To Article</a>
  </nav><!-- /Header-nav -->
  <section class="Section">
    <div class="Container">
      <h1 class="Header-title">Exploring the CSS Shape Outside Property</h1>
    </div>
  </section><!-- /Section -->
</header><!-- /Header -->

<main class="Main">
  <section class="Section">
    <div class="Container">
      <div class="Content">
        <div class="Shape Shape--left Shape--circle"></div>
        <h2>Hello! Welcome to Section 1</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatem eveniet magnam officiis voluptatibus harum voluptates suscipit aspernatur hic, dicta voluptate quas laborum porro sequi numquam commodi facere natus, adipisci enim! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit laborum repudiandae quia ex numquam! Excepturi, velit similique veritatis laudantium, quis aperiam enim corrupti autem. Ut similique aliquam dolores quisquam. Repellat.</p>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatum officiis laudantium, facere, explicabo eveniet, amet nostrum dolore id ipsa deleniti, illum architecto fuga nisi veniam ut inventore! Sequi, pariatur, iste? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fuga officiis beatae error in, deleniti odit voluptatem magni, quaerat reiciendis ratione facere labore, corporis accusamus, accusantium perspiciatis repellendus eligendi veniam voluptas!</p>
      </div>
      <div class="Content">
        <div class="Shape Shape--right Shape--triangle"></div>
        <h2>Hello! Welcome to Section 2</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatem eveniet magnam officiis voluptatibus harum voluptates suscipit aspernatur hic, dicta voluptate quas laborum porro sequi numquam commodi facere natus, adipisci enim! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit laborum repudiandae quia ex numquam! Excepturi, velit similique veritatis laudantium, quis aperiam enim corrupti autem. Ut similique aliquam dolores quisquam. Repellat.</p>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatum officiis laudantium, facere, explicabo eveniet, amet nostrum dolore id ipsa deleniti, illum architecto fuga nisi veniam ut inventore! Sequi, pariatur, iste? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fuga officiis beatae error in, deleniti odit voluptatem magni, quaerat reiciendis ratione facere labore, corporis accusamus, accusantium perspiciatis repellendus eligendi veniam voluptas!</p>
      </div>
      <div class="Content">
        <div class="Shape Shape--left Shape--diamond"></div>
        <h2>Hello! Welcome to Section 3</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatem eveniet magnam officiis voluptatibus harum voluptates suscipit aspernatur hic, dicta voluptate quas laborum porro sequi numquam commodi facere natus, adipisci enim! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit laborum repudiandae quia ex numquam! Excepturi, velit similique veritatis laudantium, quis aperiam enim corrupti autem. Ut similique aliquam dolores quisquam. Repellat.</p>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatum officiis laudantium, facere, explicabo eveniet, amet nostrum dolore id ipsa deleniti, illum architecto fuga nisi veniam ut inventore! Sequi, pariatur, iste? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fuga officiis beatae error in, deleniti odit voluptatem magni, quaerat reiciendis ratione facere labore, corporis accusamus, accusantium perspiciatis repellendus eligendi veniam voluptas!</p>
      </div>
    </div>
  </section>
</main><!-- /Main -->

<footer class="Footer">
  <div class="Container">
    <small>&copy; 2016, callmenick.com</small>
  </div>
</footer><!-- /Footer -->
              
            
!

CSS

              
                ////////////////////
// Import font
////////////////////

@import url('https://fonts.googleapis.com/css?family=Montserrat:300,400,700');

////////////////////
// Variables
////////////////////

// Neutral (from darker to lighter)
$color-neutral-1: #111111;
$color-neutral-2: #606060;
$color-neutral-3: #909090;
$color-neutral-4: #d9d9d9;

// Theme
$color-theme-main: #28aadc;
$color-theme-dark: darken($color-theme-main, 20%);
$color-theme-light: lighten($color-theme-main, 20%);

$font-primary-safe: Helvetica, Arial, sans-serif;
$font-primary: "Montserrat", $font-primary-safe;

$font-size: (
  xs: 1.2rem,
  sm: 1.6rem,
  md: 1.8rem,
  lg: 2.1rem,
  xl: 2.8rem,
  xx: 3.6rem
);

$line-height: (
  sm: 1.2,
  md: 1.8,
  lg: 2.1
);

$gutter: (
  xs: 0.4rem,
  sm: 0.65rem,
  md: 1.05rem,
  lg: 1.7rem,
  xl: 2.75rem,
  xx: 4.45rem
);

////////////////////
// Mixins
////////////////////

@mixin break($size) {
  $breakpoints: (
    xs: 320px,
    sm: 480px,
    md: 640px,
    lg: 840px,
    xl: 1020px,
    xx: 1200px
  );

  @media (min-width: map-get($breakpoints, $size)) {
    @content;
  }
}

////////////////////
// Generic
////////////////////

*,
*::before,
*::after {
  box-sizing: inherit;
}

////////////////////
// Elements
////////////////////

html {
  box-sizing: border-box;
  font-size: 10px;
}

body {
  color: $color-neutral-2;
  background-color: #fff;
  font-family: $font-primary;
  font-size: map-get($font-size, sm);
  font-weight: 300;
  line-height: map-get($line-height, md);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: $color-neutral-1;
  font-weight: 700;
  line-height: map-get($line-height, sm);
}

a {
  color: $color-theme-main;
  text-decoration: none;
}

a:hover {
  color: $color-theme-dark;
}

b,
strong {
  font-weight: 700;
}

i,
em {
  font-style: italic;
}

img {
  max-width: 100%;
  height: auto;
}

////////////////////
// Objects
////////////////////

.Container {
  margin: 0 auto;
  padding: 0 map-get($gutter, lg);
  max-width: 96rem;

  @include break(sm) {
    padding: 0 map-get($gutter, xl);
  }

  @include break(md) {
    padding: 0 map-get($gutter, xx);
  }
}

.Section {
  margin-bottom: map-get($gutter, xl);

  @include break(md) {
    margin-bottom: map-get($gutter, xx);
  }
}

.Section:last-child {
  margin-bottom: 0;
}

.Main {
  padding: map-get($gutter, xl) 0;

  @include break(md) {
    padding: map-get($gutter, xx) 0;
  }
}

.Header {
  margin: 0;
  padding: 0;
}

.Header-nav {
  display: flex;
  justify-content: space-between;
  background-color: $color-theme-main;
}

.Header-nav-link {
  padding: map-get($gutter, md);
  color: #fff;
}

.Header-nav-link:hover {
  color: #fff;
  background-color: $color-theme-dark;
}

.Header-title {
  margin: map-get($gutter, xl);
  padding: 0;
  color: $color-neutral-3;
  font-size: map-get($font-size, xl);
  font-weight: 300;
  text-align: center;

  @include break(sm) {
    margin: map-get($gutter, xx);
    font-size: map-get($font-size, xx);
  }
}

.SubNav {
  margin: 0;
  padding: 0;
}

.SubNav-items {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.SubNav-item {
  margin: 0;
  padding: map-get($gutter, xs);
}

.SubNav-link {
  display: block;
  margin: 0;
  padding: map-get($gutter, xs) map-get($gutter, xl);
  border: solid 0.2rem $color-theme-main;
}

.SubNav-link:hover,
.SubNav-item.active .SubNav-link {
  color: #fff;
  background-color: $color-theme-dark;
}

.Footer {
  padding: map-get($gutter, sm) 0;
  text-align: center;

  @include break(sm) {
    padding: map-get($gutter, md) 0;
  }

  @include break(md) {
    padding: map-get($gutter, lg) 0;
  }
}

////////////////////
// Demo Specifics
////////////////////

.Shape {
  display: block;
  margin-bottom: map-get($gutter, lg);
  width: 18rem;
  height: 18rem;
  background-color: #eee;

  @include break(sm) {
    width: 24rem;
    height: 24rem;
  }
}

.Shape--left {
  float: left;
  margin-right: map-get($gutter, xx);
}

.Shape--right {
  float: right;
  margin-left: map-get($gutter, xx);
}

.Shape--circle {
  border-radius: 50%;
  shape-outside: circle();
}

.Shape--triangle {
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  shape-outside: polygon(0% 0%, 100% 0%, 50% 100%);
}

.Shape--diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  shape-outside: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
              
            
!

JS

              
                
              
            
!
999px

Console