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.

            
              mixin grid-item(name, img)
	a.staffgrid__item(href="javascript:void(0)", style=img)
		h3.staffgrid__item-title #{name}

.staffgrid
	.staffgrid__descriptor
		h1 This is who we are
		p Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci soluta deleniti quisquam veritatis minus reprehenderit doloremque consequuntur porro accusantium reiciendis illo assumenda saepe cupiditate, nam libero et quae nemo. Eaque!
		p Mollitia sunt voluptates debitis quaerat, nostrum illum vitae omnis unde fugit numquam tenetur, provident a ipsa ullam animi sint cumque est labore id expedita dolores explicabo culpa aliquid. Labore, veniam.
		p Dolorem, magnam magni. Impedit, corrupti, sapiente. Esse atque, praesentium officiis nobis nulla corporis delectus accusamus officia dicta enim vel quia deserunt aliquid ad quod alias, vero velit ut hic eligendi.
	+grid-item('Phoenix Wright', 'background-image: url(http://vignette3.wikia.nocookie.net/aceattorney/images/b/bd/Phoenix_Wright_Portrait_AA6.png/revision/latest/scale-to-width-down/240?cb=20160407184259)')
	+grid-item('Athena Cykes', 'background-image: url(https://vignette.wikia.nocookie.net/aceattorney/images/6/69/Bg_01.png/revision/latest?cb=20160407180220)')
	+grid-item('Apollo Justice', 'background-image: url(http://vignette3.wikia.nocookie.net/aceattorney/images/c/c6/Apollo_portrait.png/revision/latest?cb=20160407181832)')
	+grid-item('Trucy Wright', 'background-image: url(http://vignette3.wikia.nocookie.net/aceattorney/images/7/70/Trucy_Wright_Portrait.png/revision/latest?cb=20140620171239)')
	+grid-item('Maya Fey', 'background-image: url(http://vignette4.wikia.nocookie.net/aceattorney/images/0/02/Maya_Fey_Portrait_AA6.png/revision/latest/scale-to-width-down/240?cb=20160407182727)')
	+grid-item('Ema Skye', 'background-image: url(http://vignette2.wikia.nocookie.net/aceattorney/images/9/96/Ema_AA6_Portrait.png/revision/latest/scale-to-width-down/230?cb=20160407040510)')
	+grid-item('Franziska Von Karma', 'background-image: url(http://vignette4.wikia.nocookie.net/aceattorney/images/2/27/Franziska_von_Karma_Portrait.png/revision/latest?cb=20140706175640)')
	+grid-item('Diego Armando', 'background-image: url(http://vignette3.wikia.nocookie.net/aceattorney/images/3/38/Godot_Portrait.png/revision/latest?cb=20140622043708)')
	+grid-item('Mia Fey', 'background-image: url(http://vignette1.wikia.nocookie.net/aceattorney/images/c/cf/Mia_Fey_Portrait.png/revision/latest/scale-to-width-down/220?cb=20140625121032)')
	+grid-item('Miles Edgeworth', 'background-image: url(http://vignette2.wikia.nocookie.net/aceattorney/images/e/ef/Edgyprof.png/revision/latest?cb=20160627075729)')
	+grid-item('Kay Faraday', 'background-image: url(http://vignette4.wikia.nocookie.net/aceattorney/images/5/5c/Kay_Faraday_Portrait_3.png/revision/latest?cb=20160308054722)')
	+grid-item('Dick Gumshoe', 'background-image: url(http://vignette3.wikia.nocookie.net/aceattorney/images/6/6e/Dick_Gumshoe_Portrait_3.png/revision/latest?cb=20160308054706)')
	+grid-item('Pearl Fey', 'background-image: url(http://vignette3.wikia.nocookie.net/aceattorney/images/b/be/Pearl_Fey_Portrait.png/revision/latest/scale-to-width-down/220?cb=20140625122748)')
	+grid-item('Simon Blackquil', 'background-image: url(http://vignette2.wikia.nocookie.net/aceattorney/images/2/2b/Simon_Blackquill_Portrait.png/revision/latest/scale-to-width-down/220?cb=20160626124012)')
	+grid-item('Klavier Gavin', 'background-image: url(http://vignette2.wikia.nocookie.net/aceattorney/images/d/dc/Klavier_Gavin_Portrait.png/revision/latest?cb=20140625154035)')
	+grid-item('Nahyuta Sahdmadhi', 'background-image: url(http://vignette3.wikia.nocookie.net/aceattorney/images/2/21/Sadmadhi_Portrait.png/revision/latest/scale-to-width-down/240?cb=20160407183735)')
            
          
!
            
              
$staffgrid__breakpoint-sm: 319px;
$staffgrid__breakpoint-md: 640px;

$staffgrid__light-color: rgba(185, 185, 255, 1);
$staffgrid__dark-color: rgba(5, 5, 125, 1);

$staffgrid__spacing: 1rem;
$staffgrid__spacing-small: 0.5rem;

$staffgrid__item-bg: rgba(180, 180, 210, 1);
$staffgrid__item-border: 1px solid rgba(15, 15, 155, 1);
$staffgrid__item-height: 275px;
$staffgrid__item-transition: 0.5s;

$staffgrid__item-title-bg: $staffgrid__light-color;
$staffgrid__item-title-font-color: $staffgrid__dark-color;

$staffgrid__descriptor-bg: $staffgrid__dark-color;
$staffgrid__descriptor-font-color: $staffgrid__light-color;

.staffgrid {
	position: relative;
	max-width: 1000px;
	margin: 0 auto;
}

.staffgrid:after {
  content: '';
  display: block;
  clear: both;
}

.staffgrid__item {
  position: relative;
  float: left;
  width: 100%;
  height: $staffgrid__item-height;
  box-sizing: border-box;
  overflow: hidden;
	
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top center; 
  border: $staffgrid__item-border;
	
	&:nth-of-type(odd) {
		height: $staffgrid__item-height * 1.2;
	}
	
	&:nth-of-type(3n + 5) {
		height: $staffgrid__item-height * 0.9;
	}
	
  &:hover .staffgrid__item-title {
	  
	  transition: $staffgrid__item-transition;
	  bottom: 0;
  }

  @media (min-width: $staffgrid__breakpoint-sm) {
    width: 50%;
  }
	
  @media (min-width: $staffgrid__breakpoint-md) {
    width: 25%;
  }
}

.staffgrid__item-title {
	transition: $staffgrid__item-transition;
	position: absolute;
	right: 0;
	bottom: -100%;
	left: 0;

	padding: $staffgrid__spacing $staffgrid__spacing-small;
	margin: 0;

	color: $staffgrid__item-title-font-color;
	text-align: center;
	
	border-top: $staffgrid__spacing-small solid $staffgrid__dark-color;
	background-color: $staffgrid__item-title-bg;
}

.staffgrid__descriptor {
  position: absolute;
  left: 0;
  top: $staffgrid__item-height;
  width: 100%;
  box-sizing: border-box;
	
  padding: $staffgrid__spacing;

  color: $staffgrid__descriptor-font-color;
	
  background: $staffgrid__descriptor-bg;
  border: 1px solid hsla(0, 0%, 0%, 0.5);
	
  @media (min-width: $staffgrid__breakpoint-md) {
	 left: 25%;
    width: 50%;
  }
}
            
          
!
            
              $('.staffgrid').packery({
  itemSelector: '.staffgrid__item',
  stamp: '.staffgrid__descriptor'
});

            
          
!
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