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

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.

            
              <main class="magazine">
  <section class="text-center magazine-photo">
    <div class="magazine-photo__wrapper">
      <h2 class="text-lowercase magazine-photo__title">
        A Different <span class="text-uppercase">Perspective</span>
      </h2>
      <hr class="magazine-photo__line" />
      <p class="text-lowercase magazine-photo__desc">
        A codepen by <span class="text-uppercase">Raisa Yang</span>
      </p>  
    </div>  
  </section>
  <section class="magazine-content">
    <article class="magazine-article">
      <header class="text-center magazine-article__header">
        <h1 class="text-lowercase magazine-article__title">
          A <span class="text-uppercase">Digital</span> Philosophy
        </h1>  
      </header>
      <div class="magazine-article__image">
        <img src="http://raiscake.me/files/fashion-img.jpg" width="200" height="300" alt="Woman looking over her shoulder" />
      </div>  
      <div class="magazine-article__body">
        <h2 class="text-center text-uppercase magazine-article__body-title">Interview!</h2>
          <p>
          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pellentesque nisi massa, sit amet blandit magna aliquam vel. Maecenas sit amet risus nec odio semper commodo nec id massa. Nam posuere lectus eu aliquet varius. Aenean vestibulum tellus non ornare pretium.
        </p>
          
        <p>
           <strong>Nullam nibh massa, commodo non pulvinar quis, lacinia quis lacus?</strong> 
          Pellentesque sit amet quam consequat, dignissim urna vel, sodales quam. Donec maximus interdum porta. Quisque tincidunt commodo mi. Nunc id enim a odio dapibus malesuada vitae sed ipsum. Donec vestibulum non dolor ut suscipit. Nam ut ultricies ex. Etiam lacus odio, bibendum ac dictum ac, gravida id nibh. Pellentesque faucibus commodo sodales.
        </p>

        <p>
          <strong>Pellentesque eu maximus elit. Mauris suscipit sed nulla nec tincidunt?</strong>
          Praesent elementum viverra porttitor. Donec placerat at odio sit amet cursus. Mauris at sem ex. Fusce sed pharetra mauris, sed placerat eros. Pellentesque congue nibh vel laoreet vulputate. In sagittis ante in tincidunt efficitur.
        <p>

        <p>
          <strong>Integer ac sodales ex. Curabitur cursus, odio ac gravida fermentum, ligula leo blandit urna, eu posuere sem ex luctus libero?</strong>
          Mauris tincidunt odio eu quam cursus, a lobortis lectus fermentum. Nullam purus justo, accumsan et lacus eget, porttitor viverra ante. Quisque bibendum eu leo a porttitor. Cras sit amet mauris vel tellus pharetra semper id quis lectus. Duis euismod ligula lectus, sit amet porttitor eros ornare eget. Fusce congue tristique rhoncus. Suspendisse enim risus, tincidunt sed dictum at, vulputate nec nulla. Donec iaculis porttitor auctor. Ut id sagittis urna. Morbi urna dolor, hendrerit dictum porta sit amet, ultrices at est. Duis commodo condimentum egestas.
        </p>

        <p>
          <strong>Mauris a molestie sapien. Aenean tincidunt, enim maximus vehicula dapibus, nisi tortor auctor justo, quis iaculis est quam ac diam?</strong> 
          Nunc feugiat urna arcu, eu varius urna varius at. Nunc libero mi, posuere quis est et, pretium egestas metus. Duis mauris risus, auctor nec mattis at, tempor eu augue. Vivamus a felis enim. Integer at erat sit amet orci gravida congue in ac erat. Vestibulum bibendum consequat diam.</p>

        <p>
          <strong>Vivamus vulputate urna in egestas aliquet. Nam faucibus viverra erat, vel lobortis erat mollis sed.</strong> 
          Donec vitae rutrum enim. Integer lacinia risus ut diam elementum, non hendrerit lectus sagittis. Aenean nec porta est. Aliquam eu sollicitudin ex. Pellentesque ornare malesuada erat in iaculis. Mauris vitae sollicitudin ante. Curabitur mauris neque, tincidunt sed faucibus id, mollis vitae purus. Cras eget consectetur lectus. Donec ac sem mattis, dictum nibh nec, pellentesque tortor. In non ullamcorper felis. Cras euismod porta ante sit amet congue. Aliquam varius fermentum imperdiet. Aenean ullamcorper tempor justo quis maximus. Suspendisse volutpat id est at fringilla.
        </p>
      </div>  
    </article> 
    <div class="magazine-credits">
      <p>
        <strong>Inspiration:</strong> <a href="http://www.touchey.com/post/15395830073/10-awesome-fashion-magazines-layouts" target="_blank">touchey.com</a>
      </p>
       <p>
          <strong>Images used:</strong> <a href="https://www.pexels.com/photo/adult-attractive-beautiful-beauty-262226/" target="_blank">1</a> and <a href="https://www.pexels.com/photo/adult-art-beautiful-black-and-white-292532/">2</a>
      </p>
    </div> 
    <div class="trapezoid"></div>
  </section>  
</main>  
            
          
!
            
              /* Variables */

$xxs:   415px;
$xs:    620px;
$sm:    768px;
$md:    992px;
$lg:    1240px;
$xlg:   1500px;

$font-size-base: 14px;
$line-height-base: 2;
$serif-font: 'Playfair Display', 'Times New Roman', serif;
$sans-serif-font: 'Droid Sans', 'Arial', sans-serif;
$accent-font: 'Oswald', $sans-serif-font;

$black: #000;
$gray: #666;
$white: #FFF;
$pink: #CF8699;


/* Mixins */

@mixin min($width) {
  @media screen and (min-width: $width) {
    @content;
  }
}


@mixin max($width) {
  @media screen and (max-width: $width) {
    @content;
  }
}

@mixin retina {
  @media
  (-webkit-min-device-pixel-ratio: 2),
  (min-resolution: 192dpi) {
    @content;
  }
}

@mixin circle($size) {
  width: $size;
  height: $size;
  line-height: $size;
}


/* General Styles */

body {
  font-family: $sans-serif-font;
  font-size: $font-size-base;
  line-height: $line-height-base;
}

a {
  color: $black;
  &:hover, &:focus {
    color: $pink;
  }
}

.text-center {
  text-align: center;
}

.text-lowercase {
  text-transform: lowercase;
}

.text-uppercase {
  text-transform: uppercase;
}


/* Magazine Styles */

html, body {
  height: 100%; // for full window height
}

.magazine {
  height: 100%;
  @include min($lg) {
    display: flex;
    min-height: 100%;
    height: auto;
    flex-direction: row-reverse;
  }
}


/* Magazine Photo */

.magazine-photo {
//  @include span(6 last);
  display: flex;
  align-items: center;
  min-height: 500px;
  height: 100%;
  background: $black url('http://raiscake.me/files/fashion-bg.jpg') no-repeat center center;
  background-size: cover;
  @include min($lg) {
    width: 50%;
    min-height: none;
    height: auto;
  }
}

.magazine-photo__wrapper {
  width: 100%;
}

.magazine-photo__title {
  margin: 5em 0 .25em;
  font-family: $serif-font;
  font-size: 2em;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  @include min($xs) {
    font-size: 3em;
  }
  @include min($sm) {
    font-size: 3.43em;
  }
  span {
    display: block;
    font-size: 1.25em;
    font-style: normal;
    letter-spacing: .06em;
    @include min($xxs) {
      font-size: 1.75em;
    }
  }
}

.magazine-photo__line {
  width: 50%;
  border: 0;
  border-bottom: 2px solid black;
  opacity: .25;
}

.magazine-photo__desc {
  margin: 1.5em 0 0;
  color: $gray;
  letter-spacing: .14em;
}


/* Magazine Content */

.magazine-content {
  position: relative;
  overflow: hidden;
  @include min($lg) {
    width: 50%;
  }
}

.magazine-article__image {
  position: absolute;
  bottom: 2em;
  left: 0;
}

.magazine-article__title {
  margin: 8em 0 3em;
  font-family: $serif-font;
  font-size: 1.43em;
  font-style: italic;
  font-weight: normal;
  letter-spacing: .1em;
  @include min($xs) {
    margin-top: 4em;
  }
  span {
    display: block;
    max-width: 330px;
    margin: 0 auto;
    color: $white;
    font-family: $accent-font;
    font-size: 3em;
    font-style: normal;
    letter-spacing: .13em;
    line-height: 1.35;
//    text-decoration: underline;
    background: $black;
    @include min($xxs) {
      font-size: 4em
    }
  }
}

.magazine-article__body {
  position: relative;
  z-index: 1;
  width: 90%;
  margin: 0 auto 20em;
  @include min($xxs) {
    width: 80%;
  }
  @include min($xs) {
    column-count: 2;
    column-gap: 1em;
    padding-left: 5em;
  }
  @include min($xlg) {
    width: 70%;
    margin-bottom: 10em;
    padding-left: 10em;
  }
  p {
    margin: 0;
    padding: .5em .8em;
    background: $white;
    strong {
      display: block;
    }
    &:first-of-type {
      padding: .5em .8em;
      color: $white;
      background: $black;
      text-decoration: underline;
      @include min($xs) {
        margin-top: -8em;
      }
    }
  }
}

.magazine-article__body-title {
  @include circle(150px);
  column-span: all;
  margin: 0 auto 2em;
  color: $white;
  font-family: $accent-font;
  font-weight: 400;
  letter-spacing: .14em;
  background: $pink;
  border-radius: 50%;
  shape-outside: circle();
  transform: rotate(10deg);
  @include min($xxs) {
    float: right;
    margin: .5em;
  }
  @include min($xs) {
    float: none;
    margin: 0 -1em 2em auto;
  }
  @include min(1700px) {
    margin-right: -2em;
  }
}

.trapezoid {
  position: absolute;
  bottom: 14em;
  left: 5em;
  z-index: 0;
  border-bottom: 950px solid $black;
	border-left: 300px solid transparent;
	border-right: 100px solid transparent;
	height: 0;
	width: 400px;
  transform: rotate(-40deg);
}


/* Credits */

.magazine-credits {
  position: absolute;
  top: 2em;
  left: 0;
  padding: .5em .8em;
  color: $white;
  font-size: .86em;
  background: $black;
  a {
    color: $white;
  }
  p {
    padding: 0;
    line-height: 1.35;
  }
}
            
          
!
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