Pen Settings

HTML

CSS

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

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <ol class="list-unstyled ml-5 timeline">
    <li>
        <h5>test</h5>
        <p>
            asdasd
        </p>
    </li>
    <li>
        <h5>test</h5>
        <p>
            asdasda
        </p>
    </li>
    <li>
        <h5>test</h5>
        <p>
dasdasd
        </p>
        <p>
            asdasd
        </p>
    </li>
    <li>
        <h5>test</h5>
        <p>
          42234
        </p>
    </li>
</ol>
              
            
!

CSS

              
                $primary-bg: white
$primary-text: white
$primary-dark-text: white
$primary-dark-bg: #343a40
$primary-light-text: #343a40
$primary-light-bg: white

$secondary-bg: white
$secondary-text: #343a40
$secondary-dark-text: white
$secondary-dark-bg: #343a40
$secondary-light-text: white
$secondary-light-bg: white

.timeline
  &:before, &:after
    content: ""
    background: white
    width: 5px
    height: 60px
    position: absolute
    z-index: 2
    margin: 0 0 0 -1px

  &:after
    height: 90px
    margin: -80px 0 0 -1px
  >li
    border: 2px solid
    border-color: $primary-dark-bg !important
    margin: 0 0 -2px 0
    padding: 30px
    counter-increment: li
    position: relative
    width: 42rem

    &:nth-child(odd):before, &:nth-child(even):before
      content: counter(li)
      display: flex
      -ms-flex-pack: center!important
      justify-content: center!important
      -ms-flex-align: center!important
      align-items: center!important

      position: absolute
      border-radius: 50%
      height: 50px
      width: 50px
      background-color: $primary-dark-bg
      color: white
      font-weight: bold
      z-index: 3

    &:nth-child(odd):before
      right: 100%
      margin-right: -25px

    &:nth-child(even):before
      left: 100%
      margin-left: -25px

    &:nth-child(odd)
      border-right: none
      border-left: 2px solid
      border-top-left-radius: 10px
      border-bottom-left-radius: 10px
      margin-right: 30px
      padding-right: 0

    &:nth-child(even)
      border-left: none
      border-right: 2px solid
      border-top-right-radius: 10px
      border-bottom-right-radius: 10px
      margin-left: 30px
      padding-left: 0
      text-align: right

    &:first-child
      border-top: none
      border-top-right-radius: 0
      border-top-left-radius: 0

    &:last-child
      border-bottom: none
      border-bottom-right-radius: 0
      border-bottom-left-radius: 0
              
            
!

JS

              
                
              
            
!
999px

Console