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 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.

Quick-add: + add another resource

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.

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.

            
              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
Loading ..................

Console