123

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

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

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.

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.

            
              <div class="container">
  
  <p class="chapter-num"><span>Chapter One</span></p>
  <h1 class="chapter-heading" data-heading="Down the Rabbit-Hole">Down the Rabbit-Hole</h1>
  
<img src="http://www.cssstories.com/1/img/alice2.jpg" alt="Alice" class="alice">
  
  
<div class="part-one">
<p>Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, ‘and what is the use of a book,’ thought Alice ‘without pictures or conversation?’ 
</p>

<p>So she was considering in her own mind (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her. 
</p>
  </div>
  
  <div class="white-rabbit">
    <img src="http://www.cssstories.com/1/img/rabbit.jpg" alt="the White Rabbit" class="rabbit">

    <blockquote>Oh dear! Oh dear! I shall be late!</blockquote>
  </div>

  <div class="part-two">
<p>There was nothing so VERY remarkable in that; nor did Alice think it so VERY much out of the way to hear the Rabbit say to itself, ‘Oh dear! Oh dear! I shall be late!’ (when she thought it over afterwards, it occurred to her that she ought to have wondered at this, but at the time it all seemed quite natural); but when the Rabbit actually TOOK A WATCH OUT OF ITS WAISTCOAT- POCKET, and looked at it, and then hurried on, Alice started to her feet, for it flashed across her mind that she had never before seen a rabbit with either a waistcoat-pocket, or a watch to take out of it, and burning with curiosity, she ran across the field after it, and fortunately was just in time to see it pop down a large rabbit-hole under the hedge. 
</p>


  </div>
  <div class="part-three">
    <blockquote>
     In another moment down went Alice after it, never once considering how in the world she was to get out again. 
    </blockquote>
  </div>
</div>
            
          
!
            
              $bg: #4c8643;

$shadow-light: darken($bg,10%);
$shadow-dark: darken($bg,20%);

@import url('https://fonts.googleapis.com/css?family=Lora');

body {
  background: $bg;
  background-size: 50%;
  color: #fff;
  font-family: Lora, serif;
}

.container {
  width: 95vw;
  margin: 0 auto;
  max-width: 1200px;
}

img.alice {
  float: right;
  max-height: 100vh;
  position: relative;
  z-index: 0;
  @media (min-width:500px) {
    max-height: none;
     height: auto;
    width: 50vw;
    max-width: 600px;
  }
}

.white-rabbit {
  float: left;
  max-height: 100vh;
  position: relative;
  z-index: 0;
  clear: left;
  @media (min-width:500px) {
    max-height: none;
    width: 42vw;
    max-width: 500px;
  }
  img {
    max-width: 260px;
    height: auto;
    float: right;
  }
  
}

blockquote {
    @include fluid-type('font-size', 50rem, 80rem, 1.5rem, 3rem); 
    font-style: italic;
  }

.part-one {
  padding: 0 1rem;
  position: relative;
  z-index: 1;
  
 
  @media (min-width:800px) {
    width: 40vw;
    float: left;
    max-width: 450px;
  }
  
  
  
  p:first-child:first-letter { 
    float: left; 
    color: #d2f1fe; 
    padding-right: 0.75rem; 
    	//@include fluid-type('font-size', 50rem, 80rem, 5rem, 8rem); 
    font-size: 5em;
  line-height: 0.4;
    
			text-shadow: 1px 0px 0px $shadow-light, 0px 1px 0px $shadow-dark, 2px 1px 0px $shadow-light, 1px 2px 0px $shadow-dark, 3px 2px 0px $shadow-light, 2px 3px 0px $shadow-dark, 4px 3px 0px $shadow-light, 3px 4px 0px $shadow-dark, 5px 4px 0px $shadow-light, 4px 5px 0px $shadow-dark, 6px 5px 0px $shadow-light, 5px 6px 0px $shadow-dark, 7px 6px 0px $shadow-light;
  }
}

.part-two {
clear: left;
  @media (min-width:500px) {
    width: 45vw;
    float: right;
    max-width: 600px;
    clear: none;
  }
}

.part-three {
  clear: both;
}

h1, h2, h3, h4, h5, h6 {
	
}

.chapter-num {
  text-align: center;
  text-transform: uppercase;
  margin-bottom: -1em;
  position: relative;
  z-index:1;
  
  span {
    background: $bg;
    display: inline-block;
    padding: 0 0.5em;
  }
}

h1 { 
	@include fluid-type('font-size', 50rem, 60rem, 2rem, 5.063rem); 
  
  &.chapter-heading {
    border-top: 4px double #fff;
        border-bottom: 4px double #fff;
    padding-top:0.2em;
    padding-bottom:0.2em;
    letter-spacing: 0.01em;
    
    margin-top: 0;
    text-align: center;
    position: relative;
    
    text-shadow: -1px -1px 0 $bg, 1px -1px 0 $bg, -1px 1px 0 $bg, 1px 1px 0 $bg;
		
		&:after {
			content: attr(data-heading);
			position: absolute;
      background: transparent;
			left: 0;
			top: 0;
			z-index: 2;
			overflow: hidden;
			color: #fff;
			text-align: center;
			width: 100%;
      padding-top:0.2em;
    padding-bottom:0.2em;
      
			text-shadow: 1px 0px 0px $shadow-light, 0px 1px 0px $shadow-dark, 2px 1px 0px $shadow-light, 1px 2px 0px $shadow-dark, 3px 2px 0px $shadow-light, 2px 3px 0px $shadow-dark, 4px 3px 0px $shadow-light, 3px 4px 0px $shadow-dark, 5px 4px 0px $shadow-light, 4px 5px 0px $shadow-dark, 6px 5px 0px $shadow-light, 5px 6px 0px $shadow-dark, 7px 6px 0px $shadow-light;
		}
	}
}



h2 { 
	@include fluid-type('font-size', 50rem, 80rem, 1.215rem, 3.375rem); 
}

h3 { 
	@include fluid-type('font-size', 50rem, 80rem, 1.138rem, 2.25rem); 
}

h4 { 
	@include fluid-type('font-size', 50rem, 80rem, 1.067rem, 1.5rem); 
}

h5 { 
	@include fluid-type('font-size', 50rem, 80rem, 1rem, 1rem); 
}

h6 { 
	@include fluid-type('font-size', 50rem, 80rem, 1rem, 1rem); 
}


p { 
	@include fluid-type('font-size', 50rem, 80rem, 1rem, 1.25rem); 
  line-height: 1.66;
}
            
          
!
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.

Console