cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              <div class="container">
  
  <div class="document">
    
    <h1>Look, a big ol' curly brace!</h1>
    
    <hr class="brace">
    
    <div class="document__content">
      
      <p>Have you ever wanted to aesthetically group together multiple elements on a page? Have you ever wanted to look classy while you do it? Now you can!</p>
      
      <p>This curly brace uses radial gradient background images to create the "v" at the center of the element, and then :before and :after pseudo selectors to create the branches.</p>
      
      <p>Try resizing the window to see how the brace will resize with it! The best part is that it only requires one element, and it doesn't interfere with any text you place inside. Personally, I like to use it for the &lt;hr&gt; element.</p>
      
    </div>
    
  </div>
  
</div>
            
          
!
            
              @import "nib"

$brace-color = white;

body {
  font-family: "Montserrat", sans-serif;
  font-smoothing: antialiased;
  background-color: #fac564;
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/5908/food.png);
}

.container {
  padding: 25px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.document {
  background-color: rgba(#fac564,.5);
  padding: 40px 20px;
  border-radius: 5px;
}

.document__content {
  column-count: 1;
  @media screen and (min-width:1200px) {
    column-count: 2;
  }
  column-gap: 20px;
  padding: 20px 0;
  margin: 0 100px;
}

h1 {
  text-align: center;
  font-size: 3em;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: bold;
  color: white;
  text-shadow: 0 1px 2px rgba(black,.15);
}

p {
  margin: 0 20px 20px;
  font-size: 16px;
  line-height: 1.5em;
  color: lighten(black,20%);
}

.brace {
  width: auto;
  min-width: 35px;
  padding-bottom: 20px;
  font-size: 2em;
  line-height: 2em;
  position: relative;
  text-align: center;
  vertical-align: middle;
  margin: 0 15px 15px;
  border: none;
  background-color: transparent;
  background-image: 
    radial-gradient(circle at 0 0, rgba($brace-color,0) 14.5px, $brace-color 15.5px, $brace-color 19.5px, rgba($brace-color,0) 20.5px),
    radial-gradient(circle at 35px 0, rgba($brace-color,0) 14.5px, $brace-color 15.5px, $brace-color 19.5px, rgba($brace-color,0) 20.5px);
  background-size: 35px 20px;
  background-position: center bottom;
  background-repeat: no-repeat;
  text-transform: lowercase;
  font-style: italic;
  color: $brace-color;
  filter: drop-shadow(0 1px 1px rgba(black,.15));
  overflow: visible;
  
  &:before {
    width: 50%;
    border-top: 5px solid $brace-color;
    border-left: 1px solid transparent; /* play with this until you like the look of it */
    border-top-left-radius: 20% 30px;
    height: 100%;
    content: "";
    absolute: top @height left -15px;
    box-sizing: border-box;
    margin-top: -5px;
  }
  
  &:after {
    width: 50%;
    border-top: 5px solid $brace-color;
    border-right: 1px solid transparent; /* play with this until you like the look of it */
    border-top-right-radius: 20% 30px;
    height: 100%;
    content: "";
    absolute: top @height right -15px;
    box-sizing: border-box;
    margin-top: -5px;
  }
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console