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>
  <div class="container">
    <section class="grid hero">
      <div class="column-xs-12 column-md-6">
        <div class="image-holder">
          <div class="image-block"></div>
          <img src="https://source.unsplash.com/n49BjsFf5dI">
        </div>
      </div>
      <div class="column-xs-12 column-md-6">
        <div class="intro">
          <h1>Kato Bakery</h1>
          <p class="lead">An artisan bakery specializing in pastries and desserts. Made fresh daily.</p>
          <a class="main-button" href="#menu-section">View our menu</a>
        </div>
      </div>
    </section>
  </div>
</header>
<main id="menu-section">
  <div class="container">
    <section class="grid menu">
      <div class="column-xs-12">
        <h2>Menu</h2>
        <section class="grid menu-list">
          <div class="column-xs-12">
            <h3>Cakes</h3>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Cheesecake</h4>
            <p>Thin base made from crushed biscuits, with a thicker top layer of soft cheese, eggs and sugar</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Tiramisu</h4>
            <p>Made of ladyfingers dipped in coffee, layered with a whipped mixture of eggs, sugar, and mascarpone cheese, flavored with cocoa</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Chiffon</h4>
            <p>Light, airy cake made with vegetable oil, eggs, sugar, flour</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Tres Leches</h4>
            <p>Sponge cake soaked with evaporated milk, condensed milk, and heavy cream or sour cream</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Black Forest</h4>
            <p>Several layers of chocolate sponge cake sandwiched with whipped cream and cherries</p>
          </div>
        </section>
        <section class="grid menu-list">
          <div class="column-xs-12">
            <h3>Pastries</h3>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Cinnamon Roll</h4>
            <p>Sweet roll made from flour, cinnamon, sugar, and butter  with cream cheese icing</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Éclair</h4>
            <p>Oblong pastry made with choux dough filled with a cream and topped with icing</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Croissant</h4>
            <p>Buttery flaky bread made of a layered yeast-leavened dough</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Kouign-amann</h4>
            <p>Round crusty cake containing layers of butter and sugar folded in</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Pain au Chocolat</h4>
            <p>Sweet roll consisting of yeast-leavened laminated dough pieces of dark chocolate in the centre</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Apple Tart</h4>
            <p>Consisting of apple filling over a pastry base with an open top not covered with pastry</p>
          </div>
        </section>
        <section class="grid menu-list">
          <div class="column-xs-12">
            <h3>Breads</h3>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Baguette</h4>
            <p>Thin elongated loaf, made of water, flour, yeast, and salt</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Ciabatta</h4>
            <p>Italian white bread made from wheat flour, water, olive oil, salt, and yeast</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>Whole Wheat</h4>
            <p>Made using flour which is entirely made from whole wheat grains</p>
          </div>
          <div class="column-xs-12 column-md-4">
            <h4>White</h4>
            <p>Made from wheat flour from which the bran and the germ have been removed through a process known as milling</p>
          </div>
        </section>
      </div>
    </section>
  </div>
</main>
<footer>
  <div class="container">
    <section class="grid">
      <div class="column-xs-12">
        <p class="copyright">&copy; Copyright 2018 Katherine Kato</p>
      </div>
    </section>
  </div>
</footer>
              
            
!

CSS

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

$white: #fff;
$black: #302a2b;
$bg: #f2f2f0;
$text: #877a7a;
$button: #bc8364;

* {
  box-sizing: border-box;
  &::before, &::after {
    box-sizing: border-box;
  }
}

body {
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: $text;
  background: $bg;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: 'Lora', serif;
  color: $black;
}

h2, h3 {
  color: $black;
  font-weight: 400;
  letter-spacing: 0.125rem;
  text-transform: lowercase;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

h2 {
  font-size: 1.85rem;
  margin: 0 0 -0.75rem 0;
}

h3 {
  font-size: 1.625rem;
  margin: 1rem 0;
  border-bottom: 0.125rem solid $black;
}

h4 {
  font-size: 1.325rem;
  margin: 1rem 0;
}

.intro {
  width: 100%;
  margin: 1rem 0 2rem 0;
}

a {
  text-decoration: none;
}

.main-button {
  font-size: 1rem;
  font-weight: 700;
  padding: 1rem 1.325rem;
  border: 0;
  color: $white;
  background: $button;
  transition: all 0.3s ease;
  &:hover {
    background: $black;
  }
}

.lead {
  font-size: 1rem;
  margin: 1rem 0 3rem 0;
}

.container {
  margin: auto;
  padding: 0 1rem;
  max-width: 82rem;
  width: 100%;
}

header {
  background: linear-gradient(-8deg, $bg 0%, $bg 50%, $white 50%, $white 50%);
}

main {
  padding: 0 0 3rem 0;
}

.grid {
  > [class*="column-"] {
    padding: 1rem;
  }
  .menu-list {
    margin: 0 0 1.5rem 0;
    padding: 0 1rem 2rem 1rem;
    background: $white;
    > div {
      &:nth-child(1) {
        padding: 0.5rem 1rem;
      }
      &:not(:nth-child(1)) {
        padding: 0 1rem;
      }
    }
  }
}

.hero {
  height: 100%;
  align-content: center;
  align-items: center;
  justify-content: center;
  > div:nth-of-type(1) {
    order: 1;
  }
}

section {
  display: block;
}

img {
	width: 100%;
  height: 25rem;
	object-fit: cover;
}

.image-holder {
  position: relative;
  .image-block {
    position: absolute;
    z-index: 1;
    display: block;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 25rem;
    background: $black;
    transform-origin: 0% 100%;
    animation: revealBottom 1s 0.7s cubic-bezier(0.23, 1, 0.75, 1) forwards;
  }
  img {
    opacity: 0;
    animation: hideItem 0s 0.5s forwards;
  }
}

footer {
  text-align: center;
  background: $black;
}

@media (min-width: $md) {
  body {
    font-size: 1.125rem;
  }

  header {
    background: linear-gradient(-8deg, $bg 0%, $bg 25%, $white 25%, $white 25%);
  }

  .hero {
    height: 100vh;
    > div:nth-of-type(1) {
      order: 0;
    }
  }
  
  .intro {
    width: 80%;
    margin: auto;
  }
  
  .main-button {
    font-size: 1.125rem;
  }
  
  h1 {
    font-size: 3.125rem;
  }
  
  .lead {
    font-size: 1.25rem;
  }
  
  h2 {
    font-size: 2.75rem;
    margin: 0 0 -1.125rem 0;
  }

  h3 {
    font-size: 2.25rem;
  }
  
  h4 {
    font-size: 1.5rem;
  }
  
  img {
    height: 75vh;
  }
  
  .image-holder {
    .image-block {
      height: 75vh;
    }
  }
}

@keyframes revealBottom {
  0% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(0);
  }
}

@keyframes hideItem {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console