css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <!-- in a wrapping section include different containers for each step of the flow: data sources, build, deploy -->
<section class="container">

  <!-- in the sources container show three cards, side by side, or one atop the other on smaller viewports -->
  <div class="container__sources">

    <div class="sources--cms">
      <h3>CMSs</h3>
      <p>Contentful, Drupal, WordPress, etc.</p>
    </div>

    <div class="sources--markdown">
      <h3>Markdown</h3>
      <p>Documentation, Posts, etc.</p>
    </div>

    <div class="sources--data">
      <h3>Data</h3>
      <p>APIs, Databases, YAML, JSON, CSV, etc.</p>
    </div>

  </div>

  <!-- include a simple line to divide the container, and animate it to show a connection between the different containers  -->
  <svg viewbox="0 0 10 100">
    <line x1="5" x2="5" y1="0" y2="100"/>
  </svg>


  <!-- in the build container show two cards, atop of one another and the first of one showing an SVG icon -->
  <div class="container__build">

    <div class="build--powered">
      <svg viewbox="0 0 100 100">
        <circle cx="50" cy="50" r="50"/>
      </svg>
      <p>powered by</p>
      <h3>GraphQL</h3>
    </div>

    <div class="build--stack">
        HTML · CSS · React
    </div>

  </div>

  <!-- repeat the svg line to connect the second and third containers as well -->
  <svg viewbox="0 0 10 100">
    <line x1="5" x2="5" y1="0" y2="100"/>
  </svg>

  <!-- in the deploy container show simply text, without a wrapping card -->
  <div class="container__deploy">
    <h3>Static Web Host</h3>
    <p>Amazon S3, Netlify, GitHub Pages, Surge.sh, Aerobatic, Now.sh, & many more.</p>
  </div>

</section>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Mukta:300,400,700')

font-text = 'Mukta', sans-serif
color-text = #5f39dd
color-card = #fff
color-step = #ffb238
color-bg = color-text

// create a class shared by all pseudo elements depicting a step of the flow (each altering only the content property)
.tooltip
    // position the tooltip in the top right of the container
    position absolute
    right 0
    bottom 100%
    // style the tooltip with the chosen color values
    color color-card
    background color-step
    text-transform uppercase
    font-size 0.9rem
    padding 0.25rem 0.75rem
    border-radius 2.5px

// create a class shared by all cards
.card
    line-height 2
    background color-card
    padding 1.2rem 1rem
    border-radius 4px
    box-shadow 0 2px 10px darken(color-card, 10%)
*
    box-sizing border-box
    margin 0
    padding 0

body
    min-height 100vh
    width 100%
    font-family font-text
    color color-text
    background color-bg

// separate the main container from the surrounding page
.container
    margin 5vh 2.5vw
    padding 15vh 0
    background color-card
    border-radius 5px
    // display the content in a single column layout
    display flex
    flex-direction column
    // center the content
    align-items center
    text-align center

    // for the SVG separating the containers, set a reasonable height
    svg
        height 5rem
        line
            stroke color-bg
            stroke-width 3px
            stroke-linecap round
            // include a stroke-dasharray depicting small dots separated by considerable space
            stroke-dasharray 2px 20px
            // animate the stroke-dashoffset property to move the dotted line downward
            animation animateline 5s linear both infinite

// style all headings and paragraphs with the same values
h3
    font-size 1.1rem
    color darken(color-text, 25%)
p
    font-size 0.95rem
    font-weight 300

.container__sources
    // display the contents of the first container in a single row
    display flex
    border-radius 8px
    padding 1.5rem
    background darken(color-card, 2.5%)
    // position relative for the pseudo element
    position relative

    &:before
        @extends .tooltip
        content 'data sources'

    div
        // beside the properties shared by all cards, move the text to the left and separate the containers horizontally
        @extends .card
        text-align left
        margin 0 1rem

.container__build
    // separate the second container decidedly from the surrounding items
    // notably covering a portion of the page
    padding 10vh 10vw
    border-radius 8px
    background darken(color-card, 2.5%)
    // position relative for the pseudo element
    position relative

    &:before
        @extends .tooltip
        content 'build'

    div
        @extends .card
        margin 2rem 0

        // style the SVG used as icon to be 4rem wide/tall
        svg
            width 4rem
            height auto
            fill color-bg



.container__deploy
    // simply style the last container to share the same background of the other containers
    background darken(color-card, 2.5%)
    padding 1.5rem
    border-radius 8px
    // position relative for the pseudo element
    position relative

    &:before
        @extends .tooltip
        content 'deploy'



// on smaller viewports lay the three cards on top of one another
@media (max-width: 700px)
    .container__sources
        flex-direction column

        div
            margin 1rem 0

// animate the SVG line to show the dotted line moving downward
// 5rem being the height of the SVG
@keyframes animateline
    from
        stroke-dashoffset 0
    to
        stroke-dashoffset -5rem
            
          
!
            
              // no js this time 'round
            
          
!
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