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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <!-- Check the HTML settings. We load the TypeKit fonts there -->
<section class="main-body">
  <header>
    <div class="logo-wrap">
    <img src="http://res.cloudinary.com/bwt/image/upload/v1500839004/tech-geek-logo_efshzg.jpg" alt="Tech Geek" class="logo"> Tech Geek</div>
    <nav class="mobile-nav">
      <svg width="20" height="13" viewBox="0 0 20 13" xmlns="http://www.w3.org/2000/svg">
  <path d="M1 1C.724 1 .5.776.5.5S.724 0 1 0h18c.276 0 .5.224.5.5s-.224.5-.5.5H1zm0 6c-.276 0-.5-.224-.5-.5S.724 6 1 6h18c.276 0 .5.224.5.5s-.224.5-.5.5H1zm0 6c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h18c.276 0 .5.224.5.5s-.224.5-.5.5H1z" fill-rule="nonzero"/>
</svg><a href="#">Menu</a>
    </nav>
    <nav class="main-nav">
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Technology</a></li>
        <li><a href="#">Web design</a></li>
        <li><a href="#">VR & Gaming</a></li>
      </ul>
    </nav>
  </header>
<article>
  <h1>SpaceX successfully launches reused Dragon spacecraft for ISS resupply</h1>
  <p class="post-meta">June 11, 2017 by Joshua Gunn—<a href="#">Technology</a>, <a href="#"><span class="allsmallcaps">ISS</span></a>, <a href="#">Universe</a>.</p>
  <p>SpaceX’s <span class="allsmallcaps">CRS-11</span> launch on Saturday was a success, bringing a Dragon spacecraft loaded down with nearly 6,000 lbs of supplies and research equipment on board to orbit. The twist was that SpaceX already sent this Dragon capsule up to resupply the International Space Station once before—back in September 2014, when it carried cargo to the <span class="allsmallcaps">ISS</span> prior to being recovered and refurbished post-mission.</p>
  <blockquote class="big-quote">
    &ldquo;SpaceX is working on Dragon 2, a capsule designed to bring crew to and from the <span class="allsmallcaps">ISS</span>&rdquo;.
  </blockquote>
  <p>The successful relaunch of a recycled Dragon is another historic milestone for SpaceX, which is aiming to reuse various parts of its launch and spacecraft equipment in order to help lower the cost of getting stuff to space. This is key to its aim of making launching a lucrative and profitable business, and also to it achieving its goal of flying missions, including crewed operations, to Mars.</p>
  <h2>The goal of the mission</h2>
  <p>After SpaceX’s Falcon 9 (not a reused one, this time) delivered the Dragon to orbit, it decoupled from the craft about 10 minutes after the original liftoff, and then deployed its solar wings to harvest energy for the rest of its trip to the <span class="allsmallcaps">ISS</span>.</p>
  <img src="http://res.cloudinary.com/bwt/image/upload/v1500836264/iss_u5gjli.jpg" alt="ISS">
  <p>The Dragon will attempt to dock with the <span class="allsmallcaps">ISS</span> around 36 hours from launch, when space station crew will attempt to capture the craft using the facility’s 57.7-foot Canadian-made robotic arm. If this Dragon completes the rest of its mission as planned, it’ll be recovered, refurbished and hopefully reused in a future mission.</p>
  <p>SpaceX is working on Dragon 2, a capsule designed to bring crew to and from the <span class="allsmallcaps">ISS</span>, and hopes to run test flights with astronauts on board beginning next year.</p>
</article>
<small>Content adapted from Tech Crunch (<a href="https://techcrunch.com/2017/06/03/spacex-successfully-launches-reused-dragon-spacecraft-for-iss-resupply/">Source</a>)</small>
  </section>
<aside class="sidebar">
  <a href="#" class="twitter-link">@techGeek</a>
  <h1>Popular posts</h1>
  <ul>
    <li><a href="#">Study suggests last-mile drone delivery could lower carbon footprint</a>
      <p><em>2 days ago</em></p>
    </li>
    <li><a href="#">How to price your IPO</a>
      <p><em>3 days ago</em></p>
    </li>
    <li><a href="#">Here are some reasons behind tech’s design shortage</a>
      <p><em>5 days ago</em></p>
    </li>
    <li><a href="#">Here are some reasons behind tech’s design shortage</a>
      <p><em>6 days ago</em></p>
    </li>
  </ul>
  <img src="http://res.cloudinary.com/bwt/image/upload/v1500835373/ad_gfyhbx.jpg" class="carbon">
</aside>
            
          
!
            
              // The SCSS is enabled as the CSS preprocessor

// Enable small caps
.allsmallcaps {
  font-feature-settings: "c2sc", "smcp";
 }

// Responsive variables
$phablet-breakpoint: 37em;
$tablet-breakpoint: 48em;
$desktop-breakpoint: 64em;
$large-desktop-breakpoint: 80em;

// Layout variables & mixins
$column: 6.25%;

@mixin width($number) {
  width: #{ $number * $column };
}

@mixin offset($number) {
  margin-left: #{ $number * $column };
}

// Fonts
$font-meta: "ff-meta-serif-web-pro", Georgia, serif;
$font-korolev: "korolev", sans-serif;

// Colours
$red: #F7412D;

// Variables
$base-font-size: 112.5; // Gets used as %, converts to 18px
$line-height: 1.45;
$base: ($base-font-size / 100); // We'll need this for some calculations

// Modular scale
$ratio: 1.5; // Perfect Fifth

// pow and ms functions 
@function pow($number, $exponent) {
  $value: 1;

  @if $exponent > 0 {
    @for $i from 1 through $exponent {
      $value: $value * $number; //Multiply by $number if exponent less than zero
    }
  } @else if $exponent < 0 {
    @for $i from 1 through -$exponent {
      $value: $value / $number; //Divide by $number if exponent less than zero
    }
  }

  @return $value;
}

@function ms($value, $ms-ratio: $ratio, $ms-base: $base){
  $size: pow($ms-ratio, $value) * $ms-base;
  @return #{ $size + "rem" };
}

// Vertical rhythm mixins
@mixin line-height($number) {
  line-height: #{ $number * $line-height + 'rem'};
}

@mixin margin-top($number) {
  margin-top: #{ $number * $line-height + 'rem'};
}

@mixin margin-bottom($number) {
  margin-bottom: #{ $number * $line-height + 'rem'};
}

html {
  font-size: 100%; // = 16 pixels
  
  @media screen and (min-width: $tablet-breakpoint){
    font-size: #{$base-font-size + '%'}; // 112.5% = 18 pixels
  }
  font-family: $font-meta;
  color: #333;
}

// Set line-height and margins for all elements
* {
  @include line-height(1);
  @include margin-bottom(1);
  @include margin-top(0);
}

// [ h1: font-size: [x value from scale], line-height: 2 * 30px, margin-top: 2 * 30px, margin-bottom: 1 * 30px ]
$headings: (
  h1: (1, 1.5, 1, 1),
  h2: (1, 1.5, 2, 0.5),
  h3: (0, 1.5, 2, 0.5),
  h4: (0, 1, 0.25, 0),
  h5: (0, 1, 0.5, 0),
  h6: (0, 1, 0.5, 0)
);

// Set line-heights and margins for headings
@each $heading, $properties in $headings {
  #{$heading} {
    font-size: ms(nth($properties, 1));
    @include line-height(nth($properties, 2));
    @include margin-top(nth($properties, 3));
    @include margin-bottom(nth($properties, 4));
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: $font-korolev;
  font-weight: 500;
}

.main-body {
  @include width(14);
  @include offset(2);
  
  @media screen and (min-width: $desktop-breakpoint){
    @include width(9);
    @include offset(2);
    float: left;
  }
}

.post-meta {
  color: #999;
  
  a {
    color: #999;
    text-decoration: underline;
  }
}

.sidebar {
  @include width(13);
  @include offset(2);
  
  @media screen and (min-width: $desktop-breakpoint){
    @include width(3);
    @include margin-top(2);
    @include offset(1);
    float: left;  
  }
  
  h1 {
    text-transform: uppercase;
    font-size: ms(0);
    @include margin-top(2);
    @include margin-bottom(0);
  }
  
  ul {
    list-style: none;
    padding: 0;
  }
  
  a {
    font-family: $font-korolev;
    display: block;
    @include margin-bottom(0);
  }
  
  .carbon {
    max-width: 265px;
  }
}

header {
  @include margin-top(2);
  @include margin-bottom(1);
  font-family: $font-korolev;
  
  &:after {
    content: "";
    display: table;
    clear: both;
  }
  
  @media screen and (min-width: $tablet-breakpoint){
    margin-bottom: 0;
  }
}

.mobile-nav {
  float: right;
  margin-right: 10%;
  
  svg {
    margin-bottom: 0;
    margin-right: 10px;
    fill: $red;
  }
  
  @media screen and (min-width: $tablet-breakpoint){
    display: none;
  }
}

.main-nav {
  display: none;
  
  @media screen and (min-width: $tablet-breakpoint){
    display: inline-block;
  }
  
  ul {
    list-style: none;
    margin-bottom: 0;
  }
  
  li {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 0;
  }
}

.logo-wrap {
  text-transform: uppercase;
  font-size: ms(0);
  display: inline;
  float: left;
  margin-right: 40px;
  margin-bottom: 0;
  
  img {
    margin-bottom: 0;
  }
}

.logo {
  max-width: 48px;
  float: left;
}

small, figcaption {
  font-size: ms(-1);
}

.big-quote {
  font-family: $font-korolev;
  font-size: ms(0);
  max-width: 90%;
  font-weight: 300;
  font-style: italic;
  margin-left: 0;
  @include line-height(1);
  text-indent: -0.4em;
  
  @media screen and (min-width: $phablet-breakpoint){
    float: right;
    max-width: 10em;
    margin-left: 2em;
    @include margin-bottom(0.5);
  }
  
  @media screen and (min-width: $large-desktop-breakpoint){
    font-size: ms(1);
    @include line-height(1.5);
  }
}

article {
  
  h1 {
    font-style: normal;
    @include offset(-1);
    max-width: 100%;
    
    @media screen and (min-width: $phablet-breakpoint){
      font-size: ms(2);
      @include line-height(2);
    }
    @media screen and (min-width: $tablet-breakpoint){
      font-size: ms(3);
      @include line-height(3);
      max-width: 95%;
    }
    @media screen and (min-width: $desktop-breakpoint){
      @include offset(-2);
      max-width: 13em;
    }
  }
  
  p {
    max-width: 90%; 
    
    @media screen and (min-width: $tablet-breakpoint){
      max-width: 33em;
    }
  }
  
  img {
    max-width: 100%;
  }
}

a {
  color: $red;
  text-decoration: none;
  
  &:hover {
    color: lighten($red, 10%);
  }
  
  &:active {
    color: lighten($red, 20%);
  }
}

.twitter-link {
  font-family: $font-korolev;
}

// Apply the baseline grid as background
.grid {
  background-image: linear-gradient(to bottom, hsla(200, 100%, 50%, 0.3) 1px, transparent 1px);
  background-repeat: repeat;
  background-position: left top;
  background-size: 100% #{($base-font-size / 100 * 16) * $line-height + "px"};
}

.double-grid {
  @extend .grid;
  background-image: linear-gradient(to bottom, hsla(200, 100%, 50%, 0.3) 1px, transparent 1px), linear-gradient(to bottom, hsla(200, 100%, 50%, 0.3) 1px, transparent 1px, transparent #{ 0.5 * ($base-font-size / 100 * 16) * $line-height + "px"}, hsla(200, 100%, 50%, 0.2) #{ 0.5 * ($base-font-size / 100 * 16) * $line-height + "px"}, transparent #{ 0.5 * ($base-font-size / 100 * 16) * $line-height + 1 + "px"}, transparent #{($base-font-size / 100 * 16) * $line-height + "px"});
}
            
          
!
999px
Loading ..................

Console