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

              
                h1 Apple tart
section
  h2 The shell
  aside.oven-instructions Preheat the oven to 400&deg;.
  aside.ingredients
    ul
      li 7 tablespoons frozen butter*
      li 1 cup frozen flour*
      li 3 tablespoons ice-cold water*
      li 1 teaspoon cider vinegar
      li A pinch of kosher salt
    p.note It is important to have these ingredients as cold as possible
  article
    p In a food processor fitted with a steel blade, combine all theingredients until they form a solid mass that rises above the blade. You can add extra water by the tablespoon if the mass does not congeal within the first minute. Tiny pieces of butter should still be visible in the dough when it's done. Remove the dough from the bowl and work it quickly into a ball on a lightly floured surface. Cover with plastic wrap and refrigerate for at least half an hour.
    p After the dough has rested in the refrigerator, roll it out on a lightly floured surface until it forms a circle approximately 13" in diameter. Center the cirlce of dough in a 10-inch tart pan with a removeable bottom. Use your knuckles to make sure that the dough tucks neatly against the edge of the pan and run the rolling pin around the rim to remove the excess. Cover and refrigerate again for at least half an hour.
    p Line the tart shell with aluminum foil, being careful.ingredients to cove the edges. Pierce the aluminum and the dough several times with a fork and fill the shell with dried lentils. Bake for 20 minutes. Remove the aluminum and the lentils and continue baking until the shell is golden brown, about 15 minutes more.
section
  h2 The apples
  aside.ingredients
    ul
      li 6 Granny Smith apples
      li Juice of one lemon
      li Cinnamon to taste
      li Nutmeg to taste
  article
    p Peel, core and halve the apples. Either by hand or with a food processor, cut the apple halves crosswise into thin (less than &frac14;") slices. In a large bowl, toss the apples in the lemon juice, cinnamon and nutmeg. Cover and set aside.
section
  h2 The pastry cream
  aside.ingredients
    ul
      li &frac14; cup sugar
      li 1 tablespoon flour
      li 2 teaspoons cornstarch
      li 1 large egg
      li 1 cup milk
      li 3 tablespoons unsalted butter
      li &frac14; teaspoon vanilla extract
  article
    p Sift the sugar, flour and cornstarch together in a mixing bowl. Add the egg and beat until light. In a heavy-bottomed saucepan, bring the milk to a boil. Stir half the milk into the egg mixture, then pour the whole mixture back into the saucepan. Cook over high heat, stirring constantly, until the center bubbles and the mixture is very thick. Remove from heat and stir in the vanilla and the butter. Pour the pastry cream into a bowl, cover tightly with plastic wrap and refrigerate. (Be sure to press the plastic wrap right onto the cream to prevent a skin from forming.)
section
  h2 The assembly and baking
  p.oven-instructions Preheat the oven to 375&deg;.
  ul.ingredients
    li 2 tablespoons sugar
    li 8 ounces currant jelly
  article
    p Spread the pastry cream over the bottom of the shell. Arrange the apple slices in a circle around the outer edge of the shell, making sure the slices overlap. When the outer circle is completed, make a smaller circle, overlapping about half of the outer circle. If there's room, make a third circle. Fill the hole in the center with pieces of a few slices&mdash;let them stand upright. Cover the tart with a circle of wax paper and bake for 25 minutes. Remove the wax paper and sprinkle the sugar over the apples. Bake uncovered for 5&ndash;10 minutes more, until the sugar melts.
    p Boil the currant jelly until it reduces by one-third. With a pastry brush, paint the top of the tart with the currant glaze. Allow time for the glaze to set before serving (10 minutes).
              
            
!

CSS

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

body {
  box-sizing: border-box;
}

body {
  padding: 3em 6ch;
  margin: 0;
  
  font-family: "Adobe Garamond Pro", Garamond, serif;
  font-weight: 400;
  line-height: calc(1 + 2/3);
}

section {
  display: grid;
  grid-template-columns: 2fr 4fr 1fr;
  grid-column: span 3;
  grid-auto-flow: row;
  margin-top: 1rem;
}

h1, h2, article {
  grid-column: 2;
  margin-bottom: 1rem;
}

h2 {
  font-family: Univers, "Gill Sans", "Myriad Pro", sans-serif;
  font-weight: 700; 
}

p + p {
  margin-top: 1rem;
}

.oven-instructions {
  grid-column: 3;
  grid-row: 2;
  margin-left: 4ch;
}

.ingredients {
  grid-column: 1;
  margin-right: 4ch;
}

.note {
  font-style: italic;
  margin-top: 1rem;
}

.note::before {
  content: "*";
  display: block;
  float:left;
  margin-left: -2ch;
}

@media screen and (max-width: 120ch) {
  body, section {
    grid-template-columns: 1fr 2fr;
  }
  
  section {
    grid-column: span 2;
  }
  
  .oven-instructions {
    grid-column: 2;
    grid-row: initial !important;
    margin-left: 0;
    margin-bottom: 1rem;
  }
}

@media screen and (max-width: 80ch) {
  body {
    padding: 1em 4ch;
    grid-template-columns: 1fr;
  }
  
  section {
    display: block;
  }
  
  h1 {
    grid-column: 1; 
  }
  
  .ingredients {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
}

@media screen and (max-width: 50ch) {
  body {
    font-size: .875em;
  }
}

@media screen and (max-width: 40ch) {
  body {
    font-size: .75em;
  }
}

@media screen and (min-width: 180ch) {
  body {
    font-size: 1.125em;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console