123

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.

            
              <div class="folio-filter">
  <h6><a href="#">Filter by role: <span id="filter-type" class="muted">All</span></a></h6>
  <ul class="filter-list">
    <li><a href="#" data-role="all" class="selected">All</a></li>
    <li><a href="#" data-role="ux">UX</a></li>
    <li><a href="#" data-role="fed">Front End</a></li>
    <li><a href="#" data-role="rwd">Responsive</a></li>
    <li><a href="#" data-role="gfx">Visual Design</a></li>
    <li><a href="#" data-role="research">User Research</a></li>
    <li><a href="#" data-role="dev">Full Stack</a></li>
    <li><a href="#" data-role="ia">IA</a></li>
    <li><a href="#" data-role="write">Writing</a></li>
  </ul>
</div>

<ul class="folio">
	<li data-roles="ux fed rwd gfx dev write edit ia ">
		<a href="https://stegrainer.com/portfolio/uxcellence">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/uxcellence/uxcellence-thumb.jpg" alt="UXcellence" />
				<h5>UXcellence</h5>
			</div>
		</a>
	</li>
	<li data-roles="ux fed rwd gfx dev ia ">
		<a href="https://stegrainer.com/portfolio/elespta">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/elespta/elespta-thumb.jpg" alt="Echo Lake Elementary PTA" />
				<h5>Echo Lake Elementary PTA</h5>
			</div>
		</a>
	</li>
	<li data-roles="ux research gfx ">
		<a href="https://stegrainer.com/portfolio/diehappy">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/diehappy/diehappy-thumb.jpg" alt="DieHappy" />
				<h5>DieHappy</h5>
			</div>
		</a>
	</li>
	<li data-roles="ux fed rwd research ">
		<a href="https://stegrainer.com/portfolio/vdot">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/vdot/vdot3.jpg" alt="Virginia Dept of Transportation" />
				<h5>Virginia Dept of Transportation</h5>
			</div>
		</a>
	</li>
	<li data-roles="fed rwd ">
		<a href="https://stegrainer.com/portfolio/dccu">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/dccu/dccu.jpg" alt="DuPont Community Credit Union" />
				<h5>DuPont Community Credit Union</h5>
			</div>
		</a>
	</li>
	<li data-roles="ux fed rwd research gfx dev write edit ia ">
		<a href="https://stegrainer.com/portfolio/gameskinny">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/gameskinny/gs.jpg" alt="GameSkinny" />
				<h5>GameSkinny</h5>
			</div>
		</a>
	</li>
	<li data-roles="ux fed research ia ">
		<a href="https://stegrainer.com/portfolio/snagajob-mobile">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/snagajob-mobile/sajmobile.jpg" alt="Snagajob Mobile" />
				<h5>Snagajob Mobile</h5>
			</div>
		</a>
	</li>
	<li data-roles="ux fed gfx dev write ">
		<a href="https://stegrainer.com/portfolio/vcu-filedrop">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/vcu-filedrop/filedrop.jpg" alt="VCU FileDrop" />
				<h5>VCU FileDrop</h5>
			</div>
		</a>
	</li>
	<li data-roles="fed gfx dev edit ia ">
		<a href="https://stegrainer.com/portfolio/vcu-atoz">
			<div>
				<img src="https://stegrainer.com/-/img/thumbs/vcu-atoz/atoz.png" alt="VCU A-Z Web Directory" />
				<h5>VCU A-Z Web Directory</h5>
			</div>
		</a>
	</li>
</ul>
            
          
!
            
              html {
  background: #ddd;
  font-family: "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body {
  padding: 0 3em;
}
ul[class] {
  margin: 0 0 1.5em;
  padding: 0;
}
ul[class] li {
  margin: 0;
}
h5 {
  font-size: 1.777rem;
	line-height: 1.58;
	margin: 0;
}
h6 {
  font-size: 1.333rem;
	line-height: 1.051;
}
.folio {
	display: grid;
	grid-gap: 1.4em;
	grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
  list-style: none;
}
.folio a div, .folio a::after {
	-webkit-clip-path:url(#folioHex);
	clip-path:url(#folioHex); }
.folio a {
	display: block;
  transition: all 0.25s ease-in-out; }
.folio a::before {
	display: none; }
.folio a div {
	background: hsla(265,64%,52%,1);
	background: linear-gradient(0deg, rgba(78,36,135,1) 0%, rgba(81,116,240,1) 100%);
	overflow: hidden;
	position: relative; }
.folio a img {
	display: block;
	margin: 0;
	transition: all 0.25s ease-in-out;
	width: 100%; }
.folio a h5 {
	color: #fff;
	left: 5%;
	line-height: 1;
	opacity: 0;
	position: absolute;
	text-align: center;
	top: 50%;
	transform: scale(0.9) translateY(-25%);
	transition: all 0.25s ease-in-out;
	width: 90%; }
.folio a::after {
	background: hsla(265,57%,34%,1);
	content: '';
	display: block;
	height: 100%;
	left: 0;
	opacity: 0;
	position: absolute;
	width: 100%;
	top: 0;
	transition: all 0.25s ease-in-out;
	z-index: -1; }
.folio a:hover, .folio a:focus {
	transform: scale(1.1); }
.folio a:hover img, .folio a:focus img {
	filter: grayscale(100%) blur(0.15em);
	opacity: 0.25;
	transform: rotate(-3.25deg) scale(1.25); }
.folio a:hover h5, .folio a:focus h5 {
	opacity: 1;
	text-shadow: 0 0.1em 0.2em hsla(265,57%,34%,1);
	transform: translateY(-50%); }
.folio a:hover::after, .folio a:focus::after {
	opacity: 0.33;
	transform: translate(0.2em, 0.2em); }
.folio-filter h6 {
	margin-bottom: 0; }
.folio-filter h6 a {
	box-shadow: none;
	color: #333;
	cursor: default;
  text-decoration: none; }
.filter-list a.selected {
		color: #333;
		cursor: default;
		font-weight: bold; }
.folio li {
	height: auto;
	opacity: 1;
	transform: scale(1);
	transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out; }
.folio li.hidden {
	opacity: 0;
	order: 1;
	overflow: hidden;
	transform: scale(0);
	transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out; }
.folio li[aria-hidden="true"] a {
	visibility: hidden; }

@media screen and (max-width: 31.95em) {
	.folio-filter {
		background: rgba(255,255,255,0.5);
		border-radius: 0.35em;
		margin-bottom: 1.4em;
		position: relative; }
	.folio-filter::after {
		border-left: 0.5em solid transparent;
		border-right: 0.5em solid transparent;
		border-top: 0.5em solid #333;
		content: '';
		display: block;
		height: 0;
		opacity: 0.5;
		position: absolute;
		right: 0.5em;
		top: 0.75em;
		transition: transform 0.25s ease-in-out;
		width: 0; }
	.folio-filter h6 a {
		display: block;
		padding: 0.263em; }
	.filter-list {
		border-top: 0.05em solid rgba(255,255,255,0.25);
		height: 0;
		opacity: 0;
		transition: opacity 0.25s ease-in-out, height 0.25s ease-in-out; }
	.folio-filter.opened::after {
		transform: rotate(180deg); }
	.folio-filter.opened h6 a {
		border-bottom: 0.05em solid rgba(0,0,0,0.1); }
	.folio-filter.opened .filter-list {
		display: block;
		height: auto;
    list-style: none;
		opacity: 1; }
	.filter-list a {
		color: #333;
		display: block;
		padding: 0.35em; }
	.filter-list a.selected, .filter-list a:hover, .filter-list a:focus {
		background: #fff; }
	.filter-list a:hover, .filter-list a:focus {
		color: #06c; }
	.folio li.hidden {
		height: 0; }
}


@media screen and (min-width: 32em) {
	.page > header nav {
		margin: 0.7em; }
	.folio-filter h6 .muted {
		display: none; }
	.filter-list {
		transform: translateX(-0.7em); }
	.filter-list li {
		display: inline-block;
		margin: 0.35em 0; }
	.filter-list a {
		border-radius: 0.35em;
		display: block;
		padding: 0.35em 0.7em; }
	.filter-list a.selected, .filter-list a:hover, .filter-list a:focus {
		background: rgba(255,255,255,0.5);
		color: #333; }
}
            
          
!
            
              var folioFilter = document.querySelector('.folio-filter');
var filterToggle = document.querySelector('.folio-filter h6 a');
var filterChoice = document.querySelector('.folio-filter h6 span')
var filters = document.querySelectorAll('.filter-list li a');
var folio = document.querySelectorAll('.folio li');

if(folioFilter) {
	filterToggle.addEventListener('click', function(e) {
		folioFilter.classList.toggle('opened');
		e.preventDefault();
	});
	filters.forEach(function(elem) {
		elem.addEventListener('click', function(e) {
			var filterRole = this.getAttribute('data-role');
			var i = 125;
			if(filterRole == "all") {
				var selectedFolio = folio;
			} else {
				var selectedFolio = document.querySelectorAll("[data-roles*='"+ filterRole +"']");
			}
			folioFilter.classList.remove('opened');
			filterChoice.innerHTML = this.text;
			filters.forEach(function(elem) {
				elem.classList.remove('selected');
			});
			folio.forEach(function(elem) {
				elem.classList.add('hidden');
				elem.setAttribute('aria-hidden',true);
			});
			selectedFolio.forEach(function(elem) {
				setTimeout(function() {
					elem.classList.remove('hidden');
					elem.setAttribute('aria-hidden',false);
				}, i);
				i = i + 125;
			});
			this.classList.add('selected');
			e.preventDefault();
		});
	});
}
            
          
!
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.

Console