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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <div class="u-wrapper">
  <section class="c-category-browser">
    <nav class="c-category-nav">
      <div class="c-category-nav__header">
        <h1>Category 1</h1>
        <div class="nav-controls"></div>
      </div>
    
      <ul class="c-category-projects__project-list">
        <li class="c-category-project current">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li>
        <li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li><li class="c-category-project">
          <a href=""><img src="http://demo.patternlab.io/images/fpo_square.png" alt="" />
          <h2 class="c-category-project__title">Project Title</h2>
            </a>
        </li>
<!--         <li class="c-category-end-message">
          <h2 class="c-category-project__title">NO MORE</h2>
        </li> -->
      </ul>
    </nav>


  </section>
</div>
            
          
!
            
              $grey: rgb(157, 146, 130);
$text-color: black;

@mixin clearfix(){
 &:before,
 &:after {
    content: " "; /* 1 */
    display: table; /* 2 */
 }
 &:after {
    clear: both;
 }
}

img {
  width: 100%;
  height: auto;
}

.u-wrapper {
    padding: 0 1em;
    max-width: 70em;
    margin: 0 auto;
}

body {
   // stop negative margin hack on .c-category-browser creating massively scrolling page
    overflow: hidden;
    font-family: verdana;
}

.c-category-browser {
  background: $grey;
  
  // Negative margins to stretch beyond wrapper
  margin: 0 -9999rem;
  padding: 0 9999rem;
  
  // hide scrollbars
  width: 100%;
  height: 100%;
  overflow: hidden;
  
  h1 {
    margin: 0;
    font-size: 1.2em;
    color: $text-color;
  }
  
}

.c-category-nav {
  overflow-x: scroll;
  
  //hide-scrollbars
  padding-bottom: 1em;
  margin-bottom: -1em;
}

.c-category-nav__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  
  // for alignment of absolutely positioned .c-category-list
  position: relative;
}

.c-category-projects__project-list {
  //border: solid 1px red;
  @include clearfix;
  
  list-style: none;
  padding: 0;
  margin: 0.5em 0 0;
  
  // This is only necessary as a non js fallback, and should be moved to a seperate class to be stripped on js load
  //width: 5000px;
 
  //display: flex;
}

.c-category-project {
  display: block;
  width: 100px;
  float: left;
  
  margin-right: 1em;
  
  // counter for project numbering
  counter-increment: step-counter;
  
  a {
    text-decoration: none;
    color: $text-color;
  }

  &.current {
    border-bottom: solid 5px rgb(255, 255, 255);
    padding-bottom: 0.5em;
  }
  
  &.current:hover {
    border-bottom: solid 5px rgb(255, 255, 255);
    padding-bottom: 0.5em;
  }
  
  &:hover {
    border-bottom: solid 5px rgba(255, 255, 255, 0.5);
    padding-bottom: 0.5em;
  }
  
}

.c-category-project__title {
  font-size: 0.5em;
  margin-bottom: 0;
  
  // add numbers before each new project
  &::before {
    content: counter(step-counter);
    margin-right: 5px;
}
}

.nav-controls {
    //background: rgb(255, 0, 0);
    //height: 40px;
    //width: 180px;
    //position: relative;
    //top: -30px;
    //float: right;
}

// .c-category-list {
//   list-style: none;
//   padding-left: 0;
//   position: absolute;
//   left: 0;
//   top: 1.5em;
//   z-index: 10;
//   background: rgb(128, 128, 128);
//   padding: 1em;
// }

.slick-disabled {
  opacity: 0.5;
}
            
          
!
            
              $(document).ready(function(){
  $('.c-category-projects__project-list').slick({
    mobileFirst: true,
    infinite: false,
    slidesToShow: 3,
    slidesToScroll: 1,
    appendArrows: '.nav-controls',
    nextArrow: '<button type="button" class="slick-next">></button>',
    prevArrow: '<button type="button" class="slick-prev"><</button>',
    respondTo: 'min',
    responsive: [
    {
      breakpoint: 1024,
      settings: {
        slidesToShow: 8
      }
    },
    {
      breakpoint: 600,
      settings: {
        slidesToShow: 6
      }
    },
    {
      breakpoint: 400,
      settings: {
        slidesToShow: 4
      }
    }
  ]
  });
});
            
          
!
999px
Loading ..................

Console