Skip to content

Instantly share code, notes, and snippets.

@srikat
Created November 17, 2013 13:52
Show Gist options
  • Save srikat/7513673 to your computer and use it in GitHub Desktop.
Save srikat/7513673 to your computer and use it in GitHub Desktop.
/*
Featured Pages instead of Featured Posts in Modern Portfolio
--------------------------------------------------------------- */
#portfolio .featuredpage:nth-of-type(3n+0),
#portfolio .featuredpage:nth-of-type(3n+1),
#portfolio .featuredpage:nth-of-type(3n+2) {
width: 29.629629629%; /* 320px / 1080px */
}
#portfolio .featuredpage:nth-of-type(3n+1),
#portfolio .featuredpage:nth-of-type(3n+2) {
float: left;
}
#portfolio .featuredpage:nth-of-type(3n+0) {
float: right;
}
#portfolio .featuredpage:nth-of-type(3n+1) {
margin-right: 5.555555555%; /* 60px / 1080px */
}
.mp-home #portfolio .featuredpage {
margin-bottom: 48px;
margin-bottom: 3rem;
}
#portfolio .featuredpage .entry {
margin-bottom: 0;
}
.featuredpage h2 a {
font-size: 18px;
font-size: 1.125rem;
}
@media only screen and (max-width: 532px) {
#portfolio .featuredpage:nth-of-type(3n+0),
#portfolio .featuredpage:nth-of-type(3n+1),
#portfolio .featuredpage:nth-of-type(3n+2) {
width: 100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment