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.

            
              <section class="movie">
  <img
    alt="His Girl Friday."
    class="movie__poster"
    src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/11907/download-movie-poster.jpg" />
  <div class="movie__instructions">
    <p>
      <a download href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/11907/His%20Girl%20Friday%20%7C%20Public%20Domain%20Movies.webloc">Download movie</a>
    </p>
    <p class="movie__download-duration">
      <small>1.2 <abbr title="Gigabytes">GB</abbr>. A download of this size typically takes 15&ndash;25 minutes on an average connection for your area.</small>
    </p>
  </div>
</section>
            
          
!
            
              // Variables
$breakpoint-wide: 30em;
$color-green-light: #d7f69e;
$transition-fast: 125ms;
$transition-slow: 500ms;
$transparancy-slight: 0.35;


// Download styling
a[download] {
  background-color: transparent;
  border-bottom: 1px solid transparentize($color-green-light, $transparancy-slight);
  box-shadow: inset 0 -0.4rem 0 transparentize($color-green-light, $transparancy-slight);
  color: $color-green-light;
  font-size: 1.25em;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-decoration: none;
  transition: box-shadow ease-in-out $transition-fast; 

  // States
  &:focus,
  &:hover {
    border-bottom: none;
    box-shadow: none;
    transition: box-shadow ease-in-out $transition-fast;
  }
  
  // Media Queries
  @media screen and (min-width: $breakpoint-wide) {
    font-size: 1.5em;
  }
}




// Additional page styling
body {
  align-items: center;
  background-color: #495057;
  background: radial-gradient(ellipse at center, #495057 0%, #33383d 50%,#1b1e21 100%);
  color: #dee2e6;
  display: flex;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 400;
  height: 100vh;
  justify-content: center;
}

abbr[title] {
  cursor: help;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.movie {
  display: flex;
  width: 90vw;

  // States
  &:hover {
    .movie__poster {
      transform: rotate(0);
      transform: scale(1.15);
      transition: transform ease-in-out $transition-slow;
      
      // Feature queries
      @media screen and (prefers-reduced-motion: reduce) {
        transform: initial;
        transition: none;
      }
    }
  }

  // Media Queries
  @media screen and (min-width: $breakpoint-wide) {
    width: 80vw;
  }
  
  p {
    margin: 0;    
  }

  &__poster {
    box-shadow: 0 10px 30px -15px rgba(30, 33, 36, 0.85);
    height: 8rem;
    width: auto;
    transform: rotate(-3deg);
    transition: transform ease-in-out $transition-fast;

    // Media Queries
    @media screen and (min-width: $breakpoint-wide) {
      height: 14rem;
    }

    // Feature Queries
    @media screen and (prefers-reduced-motion: reduce) {
      transform: initial;
      transition: none;
    }
  }
  
  &__instructions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.25;
    margin-left: 1.5rem;
    max-width: 30ch;
     
    // Media Queries
    @media screen and (min-width: $breakpoint-wide) {
      margin-left: 2rem;
    }
  }

    
  &__download-duration {
    padding-top: 0.75em;
  }

  small {
    font-size: 0.85em;
  }
}


            
          
!
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