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

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

              
                <section id="container">
  <select id="apply-style">
    <option value="">Browser Default Style
    <option value="flush-left">Flush Left, Ragged Right
    <option value="block-justified">Block Justified
    <option value="indent-boundary">1em Indent with Boundary, Flush Left, Ragged Right
    <option value="indent-2lead-boundary">2lead Indent with Boundary, Flush Left, Ragged Right
    <option value="indent-2lead">2lead Indent without Boundary, Justified
    <option value="outdent">Outdent, Flush Left, Ragged Right
    <option value="continuous">Continuous Text, Pilcrow Divided
    <option value="versal-up">Elevated Cap / Versal with Bold Opening
    <option value="versal-down">Drop Cap / Versal with Bold Opening
    <option value="outdent-versal">Outdent Cap / Versal with Bold Small Caps Opening
    <option value="initial-outdent-block">Initial Outdent Block with Section / Midpoint Dividers
  </select>
  
  <hr>
  
  <p> Much of the material for this volume was collected during the time that I was preparing for the press the Evolution of Woman, or while searching for data bearing on the subject of sex-specialization. While preparing that book for publication, it was my intention to include within it this branch of my investigation, but wishing to obtain certain facts relative to the foundations of religious belief and worship which were not accessible at that time, and knowing that considerable labor and patience would be required in securing these facts, I decided to publish the first part of the work, withholding for the time being that portion of it pertaining especially to the development of the God-idea.

  <p> As mankind construct their own gods, or as the prevailing ideas of the unknowable reflect the inner consciousness of human beings, a trustworthy history of the growth of religions must correspond to the processes involved in the mental, moral, and social development of the individual and the nation.

  <p> By means of data brought forward in these later times relative to the growth of the God-idea, it is observed that an independent chain of evidence has been produced in support of the facts recently set forth bearing upon the development of the two diverging lines of sexual demarcation. In other words, it has been found that sex is the fundamental fact not only in the operations of Nature but in the construction of a god.

  <p> In the Evolution of Woman it has been shown that the peculiar inheritance of the two sexes, female and male, is the result of the bias given to these separate lines of development during the earliest periods of sex-differentiation; and, as this division of labor was a necessary step in the evolutionary processes, the rate of progress depended outdent-caply on the subsequent adjustment of these two primary elements or forces. A comprehensive study of prehistoric records shows that in an earlier age of existence upon the earth, at a time when woman’s influence was in the ascendancy over that of man, human energy was directed by the altruistic characters which originated in and have been transmitted through the female; but after the decline of woman’s power, all human institutions, customs, forms, and habits of thought are seen to reflect the egoistic qualities acquired by the male.
</section><!-- #container -->
              
            
!

CSS

              
                #container {
  margin: 0 auto;
  padding: 2ex 5em;
  max-width: 50em;
  
  font-family: Georgia, serif;
}

#apply-style {
  font-size: 4em;
}

p {
  font-size: 1em;
  line-height: 1em;
  margin: 1em 0;
}

.flush-left {
  p {
    line-height: 1.25em;
    margin: 1.25em 0;      
  }
}

.block-justified {
  @extend .flush-left;
  
  p {    
    text-align: justify;
  }
}

.indent-boundary {
  @extend .flush-left;
  
  p {
    margin: 0.625em;   
    
    + p {
      text-indent: 1em;
    }
  }
  
  
}

.indent-2lead-boundary {
  @extend .indent-boundary;
  
  p {
    margin: 0;
    
    + p {
      text-indent: 2.5em;
    }
  }
  
}

.indent-2lead {
  @extend .indent-2lead-boundary;
  
  p { 
    text-align: justify;
  }
}

.outdent {
  @extend .flush-left;
  
  p {
    text-indent: -1em;
  }
}

.continuous {
  text-align: justify; // on the `#container` itself
  
  @extend .flush-left;
  
  p {
    display: inline;
    // `text-align: justify` invalid b/c `display: inline`
    
    &::before {
      content: "\b6";
      font-weight: bold;
    }
    
    + p::before {
      padding-left: 1em;
    }
  }
}

.versal-up {
  @extend .flush-left;
  
  p:first-of-type {
    &::first-line {
      font-weight: bold;
    }
    &::first-letter {
      font-size: 3.5em;
      font-weight: normal;
      line-height: 1em;
    }
  }
}

.versal-down {
  @extend .indent-2lead;
  @extend .versal-up;
  
  p:first-of-type {
    &::first-letter {
      float: left;
    }
  }
}

.outdent-versal {
  @extend .versal-up;
  
  p {
    padding-left: 8em;
  }
  p:first-of-type {
    &::first-line {
      font-variant: small-caps;
    }
    &::first-letter {
      font-size: 8em;
      
      float: left;
      margin-left: -1em;
      margin-top: -1rem; // vertical alignment
    }
  }
}

.initial-outdent-block {
  @extend .flush-left;
  
  p {
    text-align: justify;
    
    &::before {
      font-weight: bold;
      content: '\2767';
    }
    + p {
      padding-left: 8em;
    }
    
    &:first-of-type {
      font-size: 1.2em;
      
      &::before {
        content: "\a7";
      }
    }
  }
  
}
              
            
!

JS

              
                document.getElementById('apply-style')
  .addEventListener('change', function(){
    document.getElementById('container').className = this.value;
  });

              
            
!
999px

Console